‹ 首页

alterlab-etetoolkit

@alterlab-ieu · 收录于 1 周前

Manipulate, annotate, and render phylogenetic trees programmatically with the ETE Toolkit (ete3) — parse and edit Newick/NHX, detect duplication/speciation events, infer orthology and paralogy, query NCBI taxonomy, and export PDF/SVG figures. Use when traversing or reformatting tree files, doing phylogenomic comparative analysis, or producing publication tree graphics in Python. Part of the AlterLab Academic Skills suite.

适合你,如果需要在Python中处理系统发育树文件并生成出版级图表。

/ 下载安装
alterlab-etetoolkit.skill双击,或拖进 Claude 桌面版 / Cowork,即完成安装↓ .skill↓ .zip
用别的 agent?下载 .zip 解压,把文件夹放进它的技能目录
Claude Code~/.claude/skills/(项目级 .claude/skills/)
Codex CLI~/.codex/skills/
Cursor自动读取上面两处目录
其他工具见其文档的「skills」目录;两个下载是同一份文件,只是名字不同
/ 通过 npx 安装 校验哈希
npx oh-my-skill add alterlab-ieu/alterlab-academic-skills/alterlab-etetoolkit
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- alterlab-ieu/alterlab-academic-skills/alterlab-etetoolkit
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify alterlab-ieu/alterlab-academic-skills/alterlab-etetoolkit
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
39GitHub stars
~861最小装载
~15.8K含声明引用
~16.7K文本包总量
镜像托管

怎么用

技能原文 SKILL.md作者撰写 · MIT · a0064fd

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.

When to Use
  • Parsing, traversing, or reformatting tree files (Newick / NHX / PhyloXML / NeXML)
  • Pruning, rooting, collapsing, or resolving polytomies in a tree
  • Detecting duplication/speciation events and inferring orthologs/paralogs from gene trees
  • Querying NCBI Taxonomy (taxid/name translation, lineages, taxonomy trees)
  • Producing publication-quality PDF/SVG/PNG tree figures
  • Comparing trees (Robinson-Foulds) or analyzing clustering dendrograms
Core Capabilities

ETE exposes six capability areas. Each has detailed, copy-ready code in the references (see Index below).

  1. Tree manipulation — I/O across formats, traversal (pre/post/levelorder), topology edits (prune, root, collapse), distances, RF tree comparison.
  2. Phylogenetic analysis — alignment linkage, species naming, duplication/speciation detection (Species Overlap or reconciliation), orthology/paralogy.
  3. NCBI Taxonomy — local cached DB, taxid↔name translation, lineage retrieval, taxonomy-tree building, tree annotation.
  4. Visualization — PNG/PDF/SVG export, rectangular/circular layouts, NodeStyle, Face objects, layout functions, interactive GUI.
  5. Clustering analysisClusterTree, data-matrix linking, silhouette/Dunn metrics, heatmap views.
  6. Tree comparison — Robinson-Foulds (raw + normalized), partition/bipartition analysis, batch pairwise distance matrices.
Core Workflow

The canonical minimal pattern — load, edit, save:

from ete3 import Tree

# Load tree from file (format 1 = with internal node names)
tree = Tree("tree.nw", format=1)

# Prune to taxa of interest, preserving branch lengths
tree.prune(["species1", "species2", "species3"], preserve_branch_length=True)

# Midpoint root
tree.set_outgroup(tree.get_midpoint_outgroup())

# Save
tree.write(outfile="rooted_tree.nw")

For class selection: use Tree/TreeNode for generic topology work, PhyloTree for gene trees and evolutionary analysis, ClusterTree for dendrograms with data matrices, and NCBITaxa for taxonomy queries.

Command-Line Scripts
  • scripts/tree_operations.py — stats, format conversion, rerooting, pruning, ASCII view. Example: python scripts/tree_operations.py reroot tree.nw rooted.nw --midpoint
  • scripts/quick_visualize.py — rapid PDF/PNG rendering with circular layout, support coloring, and DPI control. Example: python scripts/quick_visualize.py tree.nw out.pdf --mode c --color-by-support
Reference Index

Load the relevant file when detailed information is needed:

  • references/api_reference.md — Complete API for all ETE classes/methods (Tree, PhyloTree, ClusterTree, NCBITaxa): parameters, return types, code examples.
  • references/workflows.md — Per-task workflow patterns (tree operations, phylogenetic analysis, comparison, taxonomy integration, clustering).
  • references/visualization.md — Full visualization guide: TreeStyle, NodeStyle, Faces, layout functions, advanced rendering.
  • references/use_cases.md — End-to-end worked use cases (phylogenomic pipeline, batch preprocessing, publication figures, automated multi-tree analysis).
  • references/setup_and_troubleshooting.md — Installation, NCBI Taxonomy first-run setup, and troubleshooting (imports, Qt rendering, memory, DB corruption).
  • references/newick_and_best_practices.md — Newick/NHX format specifications (0-100) and best-practice checklist.
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。