etetoolkit

Phylogenetic tree toolkit (ETE). Tree manipulation (Newick/NHX), evolutionary event detection, orthology/paralogy, NCBI taxonomy, visualization (PDF/SVG), for phylogenomics.

Install

Hot:8

Download and extract to your skills directory

Copy command and send to AI Agent for auto-install:

Download and install this skill https://openskills.cc/api/download?slug=k-dense-ai-skills-etetoolkit&locale=en&source=copy

ETE Toolkit - Python Phylogenetic Tree Analysis Toolkit

Overview

ETE Toolkit is a Python package specifically designed for analyzing phylogenetic trees and hierarchical tree structures. It supports a complete workflow ranging from reading tree files, detecting evolutionary events, and identifying orthologous and paralogous genes to creating publication-quality visualizations.

Use Cases

1. Phylogenomic Research

When you need to analyze gene family evolution, identify speciation and gene duplication events, construct species trees, and add taxonomic annotations, ETE provides a complete workflow from gene trees to orthologous group identification. It can directly connect to multiple-sequence alignment files (FASTA/Phylip), automatically detect evolutionary events, and integrate with the NCBI Taxonomy database to annotate species information.

2. Phylogenetic Tree Preprocessing and Format Conversion

When you need to batch-convert tree file formats (Newick, NHX, PhyloXML), reroot tree structures, prune specific branches, or calculate topological distances, ETE provides both command-line tools and a Python API. It supports more than 100 Newick format specifications, enabling rapid processing of large-scale tree datasets.

3. Publication-Quality Figure Creation

When you need to create phylogenetic tree visualizations for scientific publications, ETE supports vector-format output such as PDF and SVG, provides rectangular and circular layouts, allows customization of node styles, supports adding graphical elements such as heat maps and sequence features, and enables interactive browsing and adjustment.

Core Features

1. Tree Manipulation and Topological Analysis

Read, write, and modify phylogenetic tree structures in multiple tree file formats (Newick, NHX, PhyloXML, and NeXML). ETE provides preorder, postorder, and level-order traversal strategies, and supports branch pruning, rerooting, parsing of multifurcating trees, node-distance calculations, and Robinson–Foulds topological distance comparisons.

2. Evolutionary Event Detection and Homolog Identification

Through integrated analysis of gene trees and multiple-sequence alignments, ETE automatically detects gene duplication and speciation events, identifies orthologous and paralogous genes, supports splitting gene families by duplication events, and extracts orthologous groups, making it suitable for gene family evolution studies.

3. NCBI Taxonomy Database Integration

ETE automatically downloads and caches the NCBI Taxonomy database (approximately 300 MB), enables bidirectional conversion between species names and taxonomy IDs, supports evolutionary lineage queries and species-tree construction based on taxonomic groups, and can automatically add taxonomic annotations to phylogenetic tree nodes.

Frequently Asked Questions

What is ETE Toolkit, and what can it do?

ETE (Environment for Tree Exploration) is a Python toolkit for phylogenetic tree analysis, primarily used in phylogenomic research. It can read and manipulate tree files, detect evolutionary events such as duplications and speciations, identify orthologous and paralogous genes, integrate with the NCBI Taxonomy database, create publication-quality tree visualizations, and perform clustering analysis and tree-topology comparisons.

How do I install ETE3?

For a basic installation, simply run uv pip install ete3. If you need GUI support and full visualization capabilities, it is recommended that you install the required system dependencies: on macOS, run brew install qt@5; on Ubuntu/Debian, run sudo apt-get install python3-pyqt5 python3-pyqt5.qtsvg; then run uv pip install ete3[gui]. The first time you use NCBI Taxonomy functionality, the database will be downloaded automatically (approximately 300 MB).

Can ETE handle large-scale phylogenetic trees?

Yes. ETE provides memory-optimized solutions for large trees, supporting the use of iterators such as iter_leaves() instead of loading all nodes into a list, thereby avoiding memory exhaustion. It also provides a content-caching mechanism (get_cached_content()) to accelerate repeated access. For trees with more than 10,000 leaf nodes, it is recommended to use iterator-based traversal and consider copying in Newick format rather than performing a deep copy.