etetoolkit

Manipulate phylogenetic trees programmatically using the Python ete3 library.

33.0k|3.2k|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/K-Dense-AI/scientific-agent-skills --skill etetoolkit-k-dense-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: etetoolkit
Source: https://github.com/K-Dense-AI/scientific-agent-skills/tree/main/scientific-skills/etetoolkit
Command: npx skills add https://github.com/K-Dense-AI/scientific-agent-skills --skill etetoolkit-k-dense-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ete3, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Phylogenetic tree analysis often requires manual, repetitive tasks across data loading, topology manipulation, event detection, and visualization. This skill provides a programmable toolkit to streamline these workflows.

Core Features & Use Cases

  • Tree I/O and traversal: read/write Newick/NHX formats, navigate trees, prune or reroot.
  • Evolutionary event detection & orthology: identify duplications/speciations, extract ortholog groups.
  • Taxonomy integration: connect with NCBI taxonomy for topology building and annotation.
  • Visualization: generate publication-quality figures in PDF/SVG/PNG, with styling options.
  • Clustering and comparisons: perform RF distances, clustering metrics, and consensus analysis.

Use cases include building gene trees with alignments, tracing gene family evolution, annotating trees with taxonomy, and producing figures for publications.

Quick Start

Load a gene tree with PhyloTree and extract ortholog groups for downstream analysis.

Frequently Asked Questions about etetoolkit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract ortholog groups from a phylogenetic tree programmatically?

To extract ortholog groups from a phylogenetic tree, you can load a gene tree using PhyloTree to identify duplications and speciations, then isolate ortholog sequences for downstream analysis. This programmatically detects evolutionary events to streamline orthology inference.

How do I annotate phylogenetic trees with NCBI taxonomy data?

You can annotate phylogenetic trees with NCBI taxonomy data by connecting the tree topology to the NCBI taxonomy database. This integration allows you to build and annotate trees programmatically, mapping species information directly onto your phylogenetic structures.

Can I generate publication-quality phylogenetic tree visualizations in Python?

Yes, you can generate publication-quality phylogenetic tree visualizations using Python by rendering trees into PDF, SVG, or PNG formats. The toolkit provides styling options to produce high-resolution figures suitable for academic publications.

What is the best way to compare phylogenetic tree topologies and calculate distances?

Comparing phylogenetic tree topologies involves calculating Robinson-Foulds distances and applying clustering metrics to evaluate similarities. This approach supports consensus analysis and tree comparisons to determine topological differences across gene trees.

How do I read and manipulate Newick and NHX tree formats for phylogenetic analysis?

Reading and manipulating Newick and NHX formats involves using tree I/O functionalities to load, navigate, prune, and reroot phylogenetic structures. This allows you to programmatically traverse and modify tree topologies for complex phylogenomic workflows.

Does ete3 support tree rerooting and pruning for large-scale phylogenomic workflows?

Yes, ete3 supports tree rerooting and pruning to handle large-scale phylogenomic workflows. You can programmatically navigate loaded tree topologies to prune specific branches or reroot structures, streamlining complex phylogenetic tree manipulation tasks.