etetoolkit
하는 일
이 도구는 계통수(종이나 유전자 사이의 관계를 보여 주는 나무 모양의 도표)를 다루도록 돕습니다. 트리를 읽고, 수정하고, 비교하고, 시각화할 수 있습니다.
사용하는 경우
- ✓관계 나무가 있고 그 세부 내용을 보고 싶을 때.
- ✓두 나무를 비교해 얼마나 다른지 알고 싶을 때.
- ✓나무의 특정 부분에 정보(주석)를 추가하고 싶을 때.
스킬 링크
https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/etetoolkit/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“‘my_tree.nw’ 파일의 계통수를 분석하고, 끝 가지에 있는 종이나 유전자가 무엇인지 알려 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 도구는 Newick 같은 형식의 트리 파일을 읽습니다. 트리의 일부를 선택하고, 정보를 추가하고, 변경 내용을 저장할 수 있습니다. 서로 다른 트리의 구조를 비교할 수도 있습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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 September 30, 2026.
Core, phylogeny, local synthetic taxonomy and helper checks target this released
package, not unreleased upstream changes. See
references/review.md for executed coverage and limitations.
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:
uv pip install "ete4==4.4.0"
Add only the visualization extra required by the workflow:
# SmartView static PNG screenshots
uv pip install "ete4[render-sm]==4.4.0"
# Legacy Qt renderer for PNG, PDF, and SVG
uv pip install "ete4[treeview]==4.4.0"
Confirm the active environment:
uv run --no-project --isolated --with "ete4==4.4.0" python -c "import ete4; print(ete4.__version__)"
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
from pathlib import Path
from ete4 import Tree
# Use an open file object for files; reserve strings for Newick text.
with Path("tree.nw").open(encoding="utf-8") as handle:
tree = Tree(handle, parser=1) # parser 1: internal node names
print(tree.to_str(props=["name", "dist"], compact=True))
print("Leaves:", list(tree.leaf_names()))
# Search and annotate.
focal = tree["species1"]
focal.add_props(host="human", status="focal")
# Keep selected tips while preserving pairwise branch-length distances.
tree.prune(
["species1", "species2", "species3"],
preserve_branch_length=True,
)
# Root and serialize explicitly.
tree.set_midpoint_outgroup()
tree.write(
outfile="processed.nw",
parser=1,
props=["host", "status"],
)
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
from ete4 import Tree
tree = Tree("((A:1,B:1)CladeAB:0.4,C:2)Root;", parser=1)
for node in tree.traverse("preorder"):
label = node.name if node.name is not None else node.id
print(label, node.level, node.is_leaf, node.dist)
tree["A"].add_prop("group", "case")
tree["B"].add_prop("group", "control")
mrca = tree.common_ancestor("A", "B")
print(mrca.name)
tree.write(
outfile="annotated.nhx",
parser=1,
props=["group"],
format_root_node=True,
)
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
from ete4 import Tree
tree_a = Tree("((A,B),(C,D));")
tree_b = Tree("((A,C),(B,D));")
(
rf,
max_rf,
common_leaves,
edges_a,
edges_b,
discarded_a,
discarded_b,
…
자주 묻는 질문
계통수란 무엇인가요?
여러 종, 유전자 또는 다른 대상이 진화 과정에서 서로 어떻게 연결되어 있는지 보여 주는 나무 모양의 도표입니다.
‘Newick’이나 ‘Nexus’는 무엇을 뜻하나요?
계통수를 일반 텍스트로 나타낼 때 쓰는 흔한 파일 형식입니다.
이 도구로 처음부터 트리를 만들 수 있나요?
아닙니다. 이 도구는 다른 프로그램이 이미 만든 트리를 다루기 위한 것입니다. 처음 트리를 만드는 분석은 하지 않습니다.
상세 정보
작성자의 원본 설명
Analyzes, manipulates, compares, annotates, and visualizes phylogenetic or other hierarchical trees with ETE 4. Supports 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. Applies to existing trees after alignment and phylogenetic inference,
인기도
- GitHub 스타
- 51k
- 순위
- #3456
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
13c-metabolic-flux
51k탄소-13 동위원소 추적 데이터를 사용해 대사 흐름(플럭스)을 추정합니다. 세포 대사와 생화학 경로를 분석할 때 유용합니다.
adaptyv
51kAdaptyv API를 사용해 단백질 특성 분석 실험을 설계합니다. 비용을 추정하고, 서열을 제출하며, 실험실 결과를 확인하는 데 도움이 됩니다.
aeon
51k시계열 데이터에 대해 머신러닝 작업을 수행합니다. 순차 데이터를 분류하고, 예측하고, 이상을 탐지하고, 패턴을 찾을 때 유용합니다.
alphagenome
51k유전 변이에 대해 미리 계산된 게놈 영향을 조회합니다. 변이가 게놈에 주는 영향을 이해하도록 점수와 설명을 제공합니다.
비슷한 스킬
add-model-provider
394k에이전트가 안전한 설정 명령으로 새 AI 모델 제공자를 OpenClaw에 연결하고, API 키를 평문으로 두지 않으며, 실시간 테스트를 실행하도록 돕습니다.
acp-router
394k에이전트가 OpenClaw를 통해 Claude Code나 Cursor 같은 코딩 도우미에 작업을 전달해, 작업이 그 도구에서 실행되도록 돕습니다.
browser-automation
394k에이전트가 로그인, 탭, 페이지 응답이 멈췄을 때의 복구를 포함해 웹 페이지를 단계별로 조작하도록 가르칩니다.