kalarislabs/research-agent-skills/etetoolkit
Claude Code and agent skill by kalarislabs/research-agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Analyze, manipulate, compare, annotate, and visualize phylogenetic or other hierarchical trees with ETE 4. Use for Newick/Nexus tree I/O, topology edits and pattern matching, Robinson-Foulds comparisons, gene-tree evolutionary events and reconciliation, NCBI/GTDB taxonomy, SmartView exploration, and publication rendering. Do not use it to infer trees from raw sequences; align sequences and infer a tree first.
Install
npx vskill@latest install kalarislabs/research-agent-skills/etetoolkitSKILL.md
ETE Toolkit 4
Scope
Use ETE 4 to work with an existing tree:
- Read Newick/Nexus, then inspect, annotate, transform, root, prune, and write
Newick trees
- Compare topologies and calculate phylogenetic distances
- Find repeated subtree topologies with
TreePattern - Analyze gene trees with
PhyloTree - Query local NCBI or GTDB taxonomy databases
- Explore large trees interactively with SmartView
- Render PNG with SmartView or PNG/PDF/SVG with the optional Qt treeview
ETE does not replace sequence alignment or phylogenetic inference software. For raw sequences, first use MAFFT or another aligner and IQ-TREE 2, FastTree, or another inference tool; then load the resulting tree into ETE.
Current Target
This skill targets ETE 4.4.0, released September 3, 2025 and verified as the current PyPI release on July 23, 2026.
Use https://etetoolkit.github.io/ete/ for ETE 4 documentation. The etetoolkit.org/docs/latest pages are legacy ETE 3 documentation despite the URL name.
Do not silently translate these examples back to ETE 3:
- Package and import:
ete4, notete3 - File input: pass an open file object; use strings for Newick text and do not
rely on path-string heuristics retained in ETE 4.4.0
- Newick selection:
parser=, notformat= - Node metadata:
props,add_prop(), andadd_props() - Iteration:
leaves(),descendants(), and related methods return iterators - Predicates:
node.is_leafandnode.is_rootare properties, not methods - Node lookup:
tree["name"], nottree & "name"
For porting older code, load `references/migration-ete3-to-ete4.md`.
Installation
Install the pinned base package:
Add only the visualization extra required by the workflow:
Confirm the active environment:
No credentials are required. NCBI and GTDB workflows download public taxonomy data and can consume substantial disk space; see `references/taxonomy.md` before the first update.
Quick Start
Choose the parser deliberately. A parser mismatch is the most common cause of NewickError, lost internal labels, or support values being read as names. See `references/api_reference.md`.
Core Workflows
Inspect and transform a tree
Node names need not be unique. tree["A"] returns the first match; use list(tree.search_nodes(name="A")) and validate the count when duplicates are possible.
Compare two topologies
RF comparison uses shared leaf labels and requires meaningful, preferably unique names. Decide explicitly whether rooted or unrooted comparison is scientifically appropriate.
Detect duplication and speciation events
Species-overlap calls are inferences from the supplied topology and naming function, not independent evidence of orthology. Pass the naming function explicitly, and use a rooted, fully bifurcating gene tree. For strict reconciliation, use a curated species tree and gene_tree.reconcile(species_tree).
Query taxonomy
ETE 4 also provides GTDBTaxa for genome-centric bacterial and archaeal taxonomy. Do not mix NCBI numeric TaxIDs and GTDB string identifiers.
Visualize
Interactive SmartView:
Static SmartView screenshot:
render_sm() produces PNG screenshot data; use the Qt treeview renderer when the deliverable must be vector PDF or SVG. Load `references/visualization.md` for layouts, faces, remote exploration, and renderer selection.
Bundled Scripts
Run from this skill directory. The commands below use a pinned, isolated ETE 4 runtime through uv run --with.
Tree operations
Use --keep-file taxa.txt instead of --keep ... for one taxon per line. The script refuses ambiguous or missing requested names rather than silently producing a partial tree.
Visualization
Quality and Interpretation Checks
Before reporting a result:
- Confirm the parser preserves the intended internal names, support, and
branch lengths.
- Check for empty and duplicate leaf names before name-based lookup or RF
comparison.
- State whether the tree is treated as rooted or unrooted.
- Preserve branch lengths when pruning only if retained pairwise distances
should remain unchanged.
- Treat arbitrary polytomy resolution as a display/algorithmic convenience,
not evolutionary evidence.
- Record ETE version, parser, rooting method, pruning set, and taxonomy
database snapshot in reproducible analyses.
- Prefer iterators for large trees and
get_cached_content()for repeated
descendant-content queries.
Reference Map
Load only the reference needed for the task:
- `references/api_reference.md` — ETE 4 core
classes, parsers, properties, traversal, I/O, topology, and comparison
- `references/workflows.md` — complete analysis
patterns, validation, reconciliation, batching, and large-tree work
- `references/visualization.md` — SmartView,
layouts/faces, PNG screenshots, and Qt vector rendering
- `references/taxonomy.md` — NCBI and GTDB setup,
translation, topology, annotation, and reproducibility
— breaking API changes and porting checklist
Authoritative Upstream Sources
- Documentation: https://etetoolkit.github.io/ete/
- ETE 3 to ETE 4 migration: https://etetoolkit.github.io/ete/3to4.html
- Releases: https://github.com/etetoolkit/ete/releases
- PyPI: https://pypi.org/project/ete4/
- Source: https://github.com/etetoolkit/ete
- Visualization gallery: https://github.com/etetoolkit/ete-gallery
Agent operating procedure
- Check the environment. Confirm tool versions, the reference genome/annotation build and the input formats (FASTQ, BAM, VCF, h5ad).
- Pin down the inputs. Confirm formats, identifiers and parameters from the data or the user. Ask rather than guess any value that changes the result.
- Run a small version first. Run the pipeline on a small subset (one sample, one chromosome, a few thousand cells) first.
- Execute the full task using the instructions and references above.
- Validate the result. Check QC metrics, sample identities, genome build consistency and batch effects before interpreting results.
- Report. State what was run (versions, commands, parameters), what was checked, and what is still uncertain.
| If this happens | Do this | |
|---|---|---|
| Genome builds or identifiers do not match between inputs | Stop and harmonize (liftover, ID mapping) before continuing. | |
| A function, flag or endpoint in these instructions is missing in the installed version | Check the installed version's own documentation (help(), --help, official docs), adapt, and tell the user. Never invent an API. | |
| A required input, identifier or parameter is ambiguous | Ask the user, or state the assumption explicitly before running. |
Integrity rules
- Never fabricate results, parameters, identifiers, citations or statistics. If something cannot be run or verified, say so plainly.
- Do not interpret biological significance beyond what the statistics support; report multiple-testing correction.
- Treat version-specific details here as possibly outdated: confirm them against the official documentation for the installed version.
- Ask before actions that cost money, consume shared GPUs or cloud quota, touch personal or patient data, or cannot be undone.
Related skills
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/etetoolkit/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 8
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kalarislabs/research-agent-skills/etetoolkit)