etetoolkit
Phylogenetic tree toolkit (ETE). Tree manipulation (Newick/NHX), evolutionary event detection, orthology/paralogy, NCBI taxonomy, visualization (PDF/SVG), for phylogenomics.
Profile →npx skills add majiayu000/claude-skill-registry --skill scientific-etetoolkit --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
ETE Toolkit Skill provides tools to load, manipulate, and analyze hierarchical trees in multiple formats, including Newick, NHX, PhyloXML, and NeXML. It supports tree traversal, topology modification, distance calculations, and topological comparisons (e.g., Robinson-Foulds distances). It enables evolutionary event detection (duplication/speciation), orthology/paralogy extraction, and gene family analysis, with workflows showing code snippets for loading trees, pruning taxa, rooting, and saving results.
It integrates with NCBI Taxonomy to build taxonomy-based trees, annotate nodes with taxonomic information, and obtain lineages. It offers extensive tree visualization capabilities to generate PNG, PDF, and SVG outputs with configurable layouts, styling, faces, and interactive features. It includes clustering analysis for dendrograms, calculating silhouette and Dunn indices, and visualizing heatmaps alongside trees. It also provides tree comparison across multiple trees using RF distance and batch processing utilities for preprocessing and formatting tasks.
The skill includes installation steps for the ETE toolkit, including optional GUI dependencies, and notes on first-time NCBI Taxonomy downloads and updates. It presents common use cases for phylogenomic pipelines, tree preprocessing, publication-quality figures, and automated analyses, with example code blocks and shell commands.
How it works
- Load trees with load/parse support for formats: Newick, NHX, PhyloXML, NeXML.
- Traverse trees (preorder, postorder, levelorder) and modify topology (prune, root, collapse, resolve polytomies).
- Compute distances and RF metrics; compare trees and derive consensus or unique partitions.
- Detect evolutionary events using get_descendant_evol_events; classify as Duplication (D) or Speciation (S) and extract ortholog groups via get_speciation_trees.
- Integrate NCBI Taxonomy: instantiate NCBITaxa, translate names to taxids, build minimal trees, annotate leaves with taxid/lineage, and update taxonomy database via update_taxonomy_database().
- Visualize trees with TreeStyle, NodeStyle, Faces; render to PDF/PNG/SVG; support circular layouts, titles, and high-resolution outputs.
- Perform clustering analysis with ClusterTree, link to data matrices, compute silhouette and Dunn indices, and visualize with heatmaps.
- Use batch scripts for preprocessing: convert formats, reroot trees at midpoint, prune to focal taxa, and generate statistics.
When to use it
Use when you need to manipulate phylogenetic trees, detect evolutionary events, identify orthologs/paralogs, annotate with taxonomy, or generate publication-ready visualizations and clustering analyses for phylogenomics. Follow workflows demonstrated in the skill for a phylogenomic pipeline, preprocessing, publication figures, or automated analysis of multiple trees.
What it can touch
- Tools: claude-code
- External scripts: scripts/tree_operations.py, scripts/quick_visualize.py
- Libraries: ete3 (Tree, PhyloTree, NCBITaxa, TreeStyle, NodeStyle, ClusterTree)
- Data formats: Newick, NHX, PhyloXML, NeXML, FASTA alignments in gene-tree workflows
- Outputs: rooted trees, ortholog_group_*.nw, PDFs, SVGs, PNGs, heatmaps
Caveats
- First-time NCBITaxa instantiation downloads the NCBI taxonomy database (~300MB) to ~/.etetoolkit/taxa.sqlite and may require ncbi.update_taxonomy_database() to refresh.
- Rendering may require GUI dependencies (ETE with GUI) such as qt5-related packages on supported platforms.
- Memory considerations for very large trees; advice to use iterators for large datasets.
- License stated in skill metadata is GPL-3.0; usage should comply with licensing of dependencies and data sources.
# ETE Toolkit Skill ## Overview ETE (Environment for Tree Exploration) is a toolkit for phylogenetic and hierarchical tree analysis. Manipulate trees, analyze evolutionary events, visualize results, and integrate with biological databases for phylogenomic research and clustering analysis. ## Core Capabilities ### 1. Tree Manipulation and Analysis Load, manipulate, and analyze hierarchical tree structures with support for: - **Tree I/O**: Read and write Newick, NHX, PhyloXML, and NeXML formats - **Tree traversal**: Navigate trees using preorder, postorder, or levelorder strategies - **Topology modification**: Prune, root, collapse nodes, resolve polytomies - **Distance calculations**: Compute branch lengths and topological distances between nodes - **Tree comparison**: Calculate Robinson-Foulds distances and identify topological differences **Common patterns:** ```python from ete3 import Tree # Load tree from file tree = Tree("tree.nw", format=1) # Basic statistics print(f"Leaves: {len(tree)}") print(f"Total nodes: {len(list(tree.traverse()))}") # Prune to taxa of interest taxa_to_keep = ["species1", "species2", "species3"] tree.prune(taxa_to_keep, preserve_branch_length=True) # Mid
- Overview
- Core Capabilities
- 1. Tree Manipulation and Analysis
- 2. Phylogenetic Analysis
- 3. NCBI Taxonomy Integration
- 4. Tree Visualization
- 5. Clustering Analysis
- 6. Tree Comparison
- Installation and Setup
- Common Use Cases
- Use Case 1: Phylogenomic Pipeline
- Use Case 2: Tree Preprocessing and Formatting
- Use Case 3: Publication-Quality Figures
- Use Case 4: Automated Tree Analysis
Display tree statistics python scripts/tree_operations.py stats tree.nw Convert format python scripts/tree_operations.py convert tree.nw output.nw --in-format 0 --out-format 1 Reroot tree python scripts/tree_operations.py reroot tree.nw rooted.nw --midpoint Prune to specific taxa python scripts/tree_operations.py prune tree.nw pruned.nw --keep-taxa "sp1,sp2,sp3" Show ASCII visualization python scripts/tree_operations.py ascii tree.nw
What does the etetoolkit skill do?
Phylogenetic tree toolkit (ETE). Tree manipulation (Newick/NHX), evolutionary event detection, orthology/paralogy, NCBI taxonomy, visualization (PDF/SVG), for phylogenomics.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill scientific-etetoolkit --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.