[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6QECYSYTMP262ZRDGT91S84":3,"skill-same:01M6QECYSYTMP262ZRDGT91S84":111},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":14,"repositoryHtmlUrl":59,"repositoryHomepageUrl":60,"ownerHtmlUrl":61,"ownerBlogUrl":62,"ownerDescription":63,"updatedAt":64,"install":65,"resources":78},"01M6QECYSYTMP262ZRDGT91S84","etetoolkit",null,"Analyze, manipulate, compare, annotate, and visualize phylogenetic or other hierarchical trees with ETE 4. Use for Newick\u002FNexus tree I\u002FO, topology edits and pattern matching, Robinson-Foulds comparisons, gene-tree evolutionary events and reconciliation, NCBI\u002FGTDB taxonomy, SmartView exploration, and publication rendering. Do not use it to infer trees from raw sequences; align sequences and infer a tree first.","Tashima-Tarsh\u002FDisha6.6","Tashima-Tarsh","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F269906498?v=4","01M6PBH98X03XERH0HFT4PFB1P","NITISH KUMAR","01M6PBH9DA0M6KM3Z12P848F0K",0,"GPL-3.0","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fkal-etetoolkit\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000002","文档处理","SCENARIO","使用场景",[5,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"exploration","static","gene","for","trees","rendering","compare","events","evolutionary biology","phylogenetics","PDF","do","use","edit","write","read","analyze","topology","python","2026-11-10 10:12:30",false,"---\nname: etetoolkit\ndescription: Analyze, manipulate, compare, annotate, and visualize phylogenetic or other hierarchical trees with ETE 4. Use for Newick\u002FNexus tree I\u002FO, topology edits and pattern matching, Robinson-Foulds comparisons, gene-tree evolutionary events and reconciliation, NCBI\u002FGTDB taxonomy, SmartView exploration, and publication rendering. Do not use it to infer trees from raw sequences; align sequences and infer a tree first.\nlicense: GPL-3.0-or-later\ncompatibility: Bundled scripts require Python 3.10+ and ete4 4.4.0 (upstream ete4 supports Python >=3.7). Taxonomy setup and SmartView exploration need network access; static SmartView PNG rendering needs ete4[render-sm], and Qt PDF\u002FSVG rendering needs ete4[treeview].\nallowed-tools: Read Write Edit Bash Python\nmetadata:\n  version: '2.1'\n  category: life-sciences\n  maintainer: Kalaris Labs\n  tags: phylogenetics, phylogenetic trees, Newick, evolutionary biology, bioinformatics\n---\n\n# ETE Toolkit 4\n\n## Scope\n\nUse ETE 4 to work with an existing tree:\n\n- Read Newick\u002FNexus, then inspect, annotate, transform, root, prune, and write\n  Newick trees\n- Compare topologies and calculate phylogenetic distances\n- Find repeated subtree topologies with `TreePattern`\n- Analyze gene trees with `PhyloTree`\n- Query local NCBI or GTDB taxonomy databases\n- Explore large trees interactively with SmartView\n- Render PNG with SmartView or PNG\u002FPDF\u002FSVG with the optional Qt treeview\n\nETE does not replace sequence alignment or phylogenetic inference software. For\nraw sequences, first use MAFFT or another aligner and IQ-TREE 2, FastTree, or\nanother inference tool; then load the resulting tree into ETE.\n\n## Current Target\n\nThis skill targets **ETE 4.4.0**, released September 3, 2025 and verified as the\ncurrent PyPI release on July 23, 2026.\n\nUse `https:\u002F\u002Fetetoolkit.github.io\u002Fete\u002F` for ETE 4 documentation. The\n`etetoolkit.org\u002Fdocs\u002Flatest` pages are legacy ETE 3 documentation despite the\nURL name.\n\nDo not silently translate these examples back to ETE 3:\n\n- Package and import: `ete4`, not `ete3`\n- File input: pass an open file object; use strings for Newick text and do not\n  rely on path-string heuristics retained in ETE 4.4.0\n- Newick selection: `parser=`, not `format=`\n- Node metadata: `props`, `add_prop()`, and `add_props()`\n- Iteration: `leaves()`, `descendants()`, and related methods return iterators\n- Predicates: `node.is_leaf` and `node.is_root` are properties, not methods\n- Node lookup: `tree[\"name\"]`, not `tree & \"name\"`\n\nFor porting older code, load\n[`references\u002Fmigration-ete3-to-ete4.md`](references\u002Fmigration-ete3-to-ete4.md).\n\n## Installation\n\nInstall the pinned base package:\n\n```bash\nuv pip install \"ete4==4.4.0\"\n```\n\nAdd only the visualization extra required by the workflow:\n\n```bash\n# SmartView static PNG screenshots\nuv pip install \"ete4[render-sm]==4.4.0\"\n\n# Legacy Qt renderer for PNG, PDF, and SVG\nuv pip install \"ete4[treeview]==4.4.0\"\n```\n\nConfirm the active environment:\n\n```bash\nuv run --with \"ete4==4.4.0\" python -c \"import ete4; print(ete4.__version__)\"\n```\n\nNo credentials are required. NCBI and GTDB workflows download public taxonomy\ndata and can consume substantial disk space; see\n[`references\u002Ftaxonomy.md`](references\u002Ftaxonomy.md) before the first update.\n\n## Quick Start\n\n```python\nfrom pathlib import Path\n\nfrom ete4 import Tree\n\n# Use an open file object for files; reserve strings for Newick text.\nwith Path(\"tree.nw\").open(encoding=\"utf-8\") as handle:\n    tree = Tree(handle, parser=1)  # parser 1: internal node names\n\nprint(tree.to_str(props=[\"name\", \"dist\"], compact=True))\nprint(\"Leaves:\", list(tree.leaf_names()))\n\n# Search and annotate.\nfocal = tree[\"species1\"]\nfocal.add_props(host=\"human\", status=\"focal\")\n\n# Keep selected tips while preserving pairwise branch-length distances.\ntree.prune(\n    [\"species1\", \"species2\", \"species3\"],\n    preserve_branch_length=True,\n)\n\n# Root and serialize explicitly.\ntree.set_midpoint_outgroup()\ntree.write(\n    outfile=\"processed.nw\",\n    parser=1,\n    props=[\"host\", \"status\"],\n)\n```\n\nChoose the parser deliberately. A parser mismatch is the most common cause of\n`NewickError`, lost internal labels, or support values being read as names.\nSee [`references\u002Fapi_reference.md`](references\u002Fapi_reference.md).\n\n## Core Workflows\n\n### Inspect and transform a tree\n\n```python\nfrom ete4 import Tree\n\ntree = Tree(\"((A:1,B:1)CladeAB:0.4,C:2)Root;\", parser=1)\n\nfor node in tree.traverse(\"preorder\"):\n    label = node.name if node.name is not None else node.id\n    print(label, node.level, node.is_leaf, node.dist)\n\ntree[\"A\"].add_prop(\"group\", \"case\")\ntree[\"B\"].add_prop(\"group\", \"control\")\n\nmrca = tree.common_ancestor(\"A\", \"B\")\nprint(mrca.name)\n\ntree.write(\n    outfile=\"annotated.nhx\",\n    parser=1,\n    props=[\"group\"],\n    format_root_node=True,\n)\n```\n\nNode names need not be unique. `tree[\"A\"]` returns the first match; use\n`list(tree.search_nodes(name=\"A\"))` and validate the count when duplicates are\npossible.\n\n### Compare two topologies\n\n```python\nfrom ete4 import Tree\n\ntree_a = Tree(\"((A,B),(C,D));\")\ntree_b = Tree(\"((A,C),(B,D));\")\n\n(\n    rf,\n    max_rf,\n    common_leaves,\n    edges_a,\n    edges_b,\n    discarded_a,\n    discarded_b,\n) = tree_a.robinson_foulds(tree_b)\n\nnormalized_rf = rf \u002F max_rf if max_rf else 0.0\nprint(rf, max_rf, normalized_rf, sorted(common_leaves))\n```\n\nRF comparison uses shared leaf labels and requires meaningful, preferably\nunique names. Decide explicitly whether rooted or unrooted comparison is\nscientifically appropriate.\n\n### Detect duplication and speciation events\n\n```python\nfrom ete4 import PhyloTree\n\ngene_tree = PhyloTree(\n    \"((Hsa|g1,Ptr|g1),(Hsa|g2,Mmu|g1));\",\n    sp_naming_function=lambda name: name.split(\"|\", 1)[0],\n)\n\nfor event in gene_tree.get_descendant_evol_events(sos_thr=0.0):\n    relationship = \"speciation\u002Forthology\" if event.etype == \"S\" else \"duplication\u002Fparalogy\"\n    print(relationship, sorted(event.in_seqs), sorted(event.out_seqs))\n```\n\nSpecies-overlap calls are inferences from the supplied topology and naming\nfunction, not independent evidence of orthology. Pass the naming function\nexplicitly, and use a rooted, fully bifurcating gene tree. For strict\nreconciliation, use a curated species tree and\n`gene_tree.reconcile(species_tree)`.\n\n### Query taxonomy\n\n```python\nfrom ete4 import NCBITaxa\n\nncbi = NCBITaxa()\nnames = [\"Homo sapiens\", \"Pan troglodytes\", \"Mus musculus\"]\nname_to_taxids = ncbi.get_name_translator(names)\n\nmissing = [name for name in names if name not in name_to_taxids]\nif missing:\n    raise ValueError(f\"Names not resolved by NCBI taxonomy: {missing}\")\n\ntaxids = [name_to_taxids[name][0] for name in names]\ntaxonomy_tree = ncbi.get_topology(taxids)\nprint(taxonomy_tree.to_str(props=[\"sci_name\", \"rank\"]))\n```\n\nETE 4 also provides `GTDBTaxa` for genome-centric bacterial and archaeal\ntaxonomy. Do not mix NCBI numeric TaxIDs and GTDB string identifiers.\n\n### Visualize\n\nInteractive SmartView:\n\n```python\nfrom ete4 import Tree\n\ntree = Tree(\"((A:1,B:1)90:0.2,C:1);\", parser=\"support\")\ntree.explore()\n```\n\nStatic SmartView screenshot:\n\n```python\ntree.render_sm(\"tree.png\", w=1200, h=800)\n```\n\n`render_sm()` produces PNG screenshot data; use the Qt treeview renderer when\nthe deliverable must be vector PDF or SVG. Load\n[`references\u002Fvisualization.md`](references\u002Fvisualization.md) for layouts,\nfaces, remote exploration, and renderer selection.\n\n## Bundled Scripts\n\nRun from this skill directory. The commands below use a pinned, isolated ETE 4\nruntime through `uv run --with`.\n\n### Tree operations\n\n```bash\nuv run --with \"ete4==4.4.0\" python scripts\u002Ftree_operations.py \\\n  stats tree.nw --parser 1\nuv run --with \"ete4==4.4.0\" python scripts\u002Ftree_operations.py \\\n  ascii tree.nw --parser 1 --props name,dist\nuv run --with \"ete4==4.4.0\" python scripts\u002Ftree_operations.py \\\n  convert tree.nw output.nw \\\n  --input-parser 1 --output-parser 1\nuv run --with \"ete4==4.4.0\" python scripts\u002Ftree_operations.py \\\n  reroot tree.nw rooted.nw \\\n  --parser 1 --midpoint\nuv run --with \"ete4==4.4.0\" python scripts\u002Ftree_operations.py \\\n  prune tree.nw pruned.nw \\\n  --parser 1 --keep species1 species2 species3\nuv run --with \"ete4==4.4.0\" python scripts\u002Ftree_operations.py \\\n  compare tree_a.nw tree_b.nw\n```\n\nUse `--keep-file taxa.txt` instead of `--keep ...` for one taxon per line.\nThe script refuses ambiguous or missing requested names rather than silently\nproducing a partial tree.\n\n### Visualization\n\n```bash\n# Interactive SmartView\nuv run --with \"ete4==4.4.0\" python scripts\u002Fquick_visualize.py \\\n  tree.nw --parser 1\n\n# SmartView PNG (requires ete4[render-sm])\nuv run --with \"ete4[render-sm]==4.4.0\" python scripts\u002Fquick_visualize.py \\\n  tree.nw tree.png \\\n  --parser support --mode circular --show-support --color-by-support\n\n# Vector output via Qt treeview (requires ete4[treeview])\nuv run --with \"ete4[treeview]==4.4.0\" python scripts\u002Fquick_visualize.py \\\n  tree.nw tree.svg \\\n  --parser 1 --engine treeview --title \"Species phylogeny\"\n```\n\n## Quality and Interpretation Checks\n\nBefore reporting a result:\n\n1. Confirm the parser preserves the intended internal names, support, and\n   branch lengths.\n2. Check for empty and duplicate leaf names before name-based lookup or RF\n   comparison.\n3. State whether the tree is treated as rooted or unrooted.\n4. Preserve branch lengths when pruning only if retained pairwise distances\n   should remain unchanged.\n5. Treat arbitrary polytomy resolution as a display\u002Falgorithmic convenience,\n   not evolutionary evidence.\n6. Record ETE version, parser, rooting method, pruning set, and taxonomy\n   database snapshot in reproducible analyses.\n7. Prefer iterators for large trees and `get_cached_content()` for repeated\n   descendant-content queries.\n\n## Reference Map\n\nLoad only the reference needed for the task:\n\n- [`references\u002Fapi_reference.md`](references\u002Fapi_reference.md) — ETE 4 core\n  classes, parsers, properties, traversal, I\u002FO, topology, and comparison\n- [`references\u002Fworkflows.md`](references\u002Fworkflows.md) — complete analysis\n  patterns, validation, reconciliation, batching, and large-tree work\n- [`references\u002Fvisualization.md`](references\u002Fvisualization.md) — SmartView,\n  layouts\u002Ffaces, PNG screenshots, and Qt vector rendering\n- [`references\u002Ftaxonomy.md`](references\u002Ftaxonomy.md) — NCBI and GTDB setup,\n  translation, topology, annotation, and reproducibility\n- [`references\u002Fmigration-ete3-to-ete4.md`](references\u002Fmigration-ete3-to-ete4.md)\n  — breaking API changes and porting checklist\n\n## Authoritative Upstream Sources\n\n- Documentation: https:\u002F\u002Fetetoolkit.github.io\u002Fete\u002F\n- ETE 3 to ETE 4 migration: https:\u002F\u002Fetetoolkit.github.io\u002Fete\u002F3to4.html\n- Releases: https:\u002F\u002Fgithub.com\u002Fetetoolkit\u002Fete\u002Freleases\n- PyPI: https:\u002F\u002Fpypi.org\u002Fproject\u002Fete4\u002F\n- Source: https:\u002F\u002Fgithub.com\u002Fetetoolkit\u002Fete\n- Visualization gallery: https:\u002F\u002Fgithub.com\u002Fetetoolkit\u002Fete-gallery\n\n## Agent operating procedure\n\n1. **Check the environment.** Confirm tool versions, the reference genome\u002Fannotation build and the input formats (FASTQ, BAM, VCF, h5ad).\n2. **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.\n3. **Run a small version first.** Run the pipeline on a small subset (one sample, one chromosome, a few thousand cells) first.\n4. **Execute the full task** using the instructions and references above.\n5. **Validate the result.** Check QC metrics, sample identities, genome build consistency and batch effects before interpreting results.\n6. **Report.** State what was run (versions, commands, parameters), what was checked, and what is still uncertain.\n\n| If this happens | Do this |\n|---|---|\n| Genome builds or identifiers do not match between inputs | Stop and harmonize (liftover, ID mapping) before continuing. |\n| 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. |\n| A required input, identifier or parameter is ambiguous | Ask the user, or state the assumption explicitly before running. |\n\n**Integrity rules**\n\n- Never fabricate results, parameters, identifiers, citations or statistics. If something cannot be run or verified, say so plainly.\n- Do not interpret biological significance beyond what the statistics support; report multiple-testing correction.\n- Treat version-specific details here as possibly outdated: confirm them against the official documentation for the installed version.\n- Ask before actions that cost money, consume shared GPUs or cloud quota, touch personal or patient data, or cannot be undone.\n\n## Related skills\n\n- `biopython`: Provides Biopython (Bio.Seq, Bio.SeqIO, Bio.Align, Bio.Entrez, Bio.Blast, Bio.PDB, Bio.Phylo, Bio.motifs, Bio.SeqUtils, Bio.Restriction) fo…\n- `scikit-bio`: Python library scikit-bio for biological sequence and community-ecology analysis: DNA\u002FRNA\u002Fprotein sequences, pair_align alignment, phylogen…\n","# ETE Toolkit 4\n\n## Scope\n\nUse ETE 4 to work with an existing tree:\n\n- Read Newick\u002FNexus, then inspect, annotate, transform, root, prune, and write\n  Newick trees\n- Compare topologies and calculate phylogenetic distances\n- Find repeated subtree topologies with `TreePattern`\n- Analyze gene trees with `PhyloTree`\n- Query local NCBI or GTDB taxonomy databases\n- Explore large trees interactively with SmartView\n- Render PNG with SmartView or PNG\u002FPDF\u002FSVG with the optional Qt treeview\n\nETE does not replace sequence alignment or phylogenetic inference software. For\nraw sequences, first use MAFFT or another aligner and IQ-TREE 2, FastTree, or\nanother inference tool; then load the resulting tree into ETE.\n\n## Current Target\n\nThis skill targets **ETE 4.4.0**, released September 3, 2025 and verified as the\ncurrent PyPI release on July 23, 2026.\n\nUse `https:\u002F\u002Fetetoolkit.github.io\u002Fete\u002F` for ETE 4 documentation. The\n`etetoolkit.org\u002Fdocs\u002Flatest` pages are legacy ETE 3 documentation despite the\nURL name.\n\nDo not silently translate these examples back to ETE 3:\n\n- Package and import: `ete4`, not `ete3`\n- File input: pass an open file object; use strings for Newick text and do not\n  rely on path-string heuristics retained in ETE 4.4.0\n- Newick selection: `parser=`, not `format=`\n- Node metadata: `props`, `add_prop()`, and `add_props()`\n- Iteration: `leaves()`, `descendants()`, and related methods return iterators\n- Predicates: `node.is_leaf` and `node.is_root` are properties, not methods\n- Node lookup: `tree[\"name\"]`, not `tree & \"name\"`\n\nFor porting older code, load\n[`references\u002Fmigration-ete3-to-ete4.md`](references\u002Fmigration-ete3-to-ete4.md).\n\n## Installation\n\nInstall the pinned base package:\n\n```bash\nuv pip install \"ete4==4.4.0\"\n```\n\nAdd only the visualization extra required by the workflow:\n\n```bash\n# SmartView static PNG screenshots\nuv pip install \"ete4[render-sm]==4.4.0\"\n\n# Legacy Qt renderer for PNG, PDF, and SVG\nuv pip install \"ete4[treeview]==4.4.0\"\n```\n\nConfirm the active environment:\n\n```bash\nuv run --with \"ete4==4.4.0\" python -c \"import ete4; print(ete4.__version__)\"\n```\n\nNo credentials are required. NCBI and GTDB workflows download public taxonomy\ndata and can consume substantial disk space; see\n[`references\u002Ftaxonomy.md`](references\u002Ftaxonomy.md) before the first update.\n\n## Quick Start\n\n```python\nfrom pathlib import Path\n\nfrom ete4 import Tree\n\n# Use an open file object for files; reserve strings for Newick text.\nwith Path(\"tree.nw\").open(encoding=\"utf-8\") as handle:\n    tree = Tree(handle, parser=1)  # parser 1: internal node names\n\nprint(tree.to_str(props=[\"name\", \"dist\"], compact=True))\nprint(\"Leaves:\", list(tree.leaf_names()))\n\n# Search and annotate.\nfocal = tree[\"species1\"]\nfocal.add_props(host=\"human\", status=\"focal\")\n\n# Keep selected tips while preserving pairwise branch-length distances.\ntree.prune(\n    [\"species1\", \"species2\", \"species3\"],\n    preserve_branch_length=True,\n)\n\n# Root and serialize explicitly.\ntree.set_midpoint_outgroup()\ntree.write(\n    outfile=\"processed.nw\",\n    parser=1,\n    props=[\"host\", \"status\"],\n)\n```\n\nChoose the parser deliberately. A parser mismatch is the most common cause of\n`NewickError`, lost internal labels, or support values being read as names.\nSee [`references\u002Fapi_reference.md`](references\u002Fapi_reference.md).\n\n## Core Workflows\n\n### Inspect and transform a tree\n\n```python\nfrom ete4 import Tree\n\ntree = Tree(\"((A:1,B:1)CladeAB:0.4,C:2)Root;\", parser=1)\n\nfor node in tree.traverse(\"preorder\"):\n    label = node.name if node.name is not None else node.id\n    print(label, node.level, node.is_leaf, node.dist)\n\ntree[\"A\"].add_prop(\"group\", \"case\")\ntree[\"B\"].add_prop(\"group\", \"control\")\n\nmrca = tree.common_ancestor(\"A\", \"B\")\nprint(mrca.name)\n\ntree.write(\n    outfile=\"annotated.nhx\",\n    parser=1,\n    props=[\"group\"],\n    format_root_node=True,\n)\n```\n\nNode names need not be unique. `tree[\"A\"]` returns the first match; use\n`list(tree.search_nodes(name=\"A\"))` and validate the count when duplicates are\npossible.\n\n### Compare two topologies\n\n```python\nfrom ete4 import Tree\n\ntree_a = Tree(\"((A,B),(C,D));\")\ntree_b = Tree(\"((A,C),(B,D));\")\n\n(\n    rf,\n    max_rf,\n    common_leaves,\n    edges_a,\n    edges_b,\n    discarded_a,\n    discarded_b,\n) = tree_a.robinson_foulds(tree_b)\n\nnormalized_rf = rf \u002F max_rf if max_rf else 0.0\nprint(rf, max_rf, normalized_rf, sorted(common_leaves))\n```\n\nRF comparison uses shared leaf labels and requires meaningful, preferably\nunique names. Decide explicitly whether rooted or unrooted comparison is\nscientifically appropriate.\n\n### Detect duplication and speciation events\n\n```python\nfrom ete4 import PhyloTree\n\ngene_tree = PhyloTree(\n    \"((Hsa|g1,Ptr|g1),(Hsa|g2,Mmu|g1));\",\n    sp_naming_function=lambda name: name.split(\"|\", 1)[0],\n)\n\nfor event in gene_tree.get_descendant_evol_events(sos_thr=0.0):\n    relationship = \"speciation\u002Forthology\" if event.etype == \"S\" else \"duplication\u002Fparalogy\"\n    print(relationship, sorted(event.in_seqs), sorted(event.out_seqs))\n```\n\nSpecies-overlap calls are inferences from the supplied topology and naming\nfunction, not independent evidence of orthology. Pass the naming function\nexplicitly, and use a rooted, fully bifurcating gene tree. For strict\nreconciliation, use a curated species tree and\n`gene_tree.reconcile(species_tree)`.\n\n### Query taxonomy\n\n```python\nfrom ete4 import NCBITaxa\n\nncbi = NCBITaxa()\nnames = [\"Homo sapiens\", \"Pan troglodytes\", \"Mus musculus\"]\nname_to_taxids = ncbi.get_name_translator(names)\n\nmissing = [name for name in names if name not in name_to_taxids]\nif missing:\n    raise ValueError(f\"Names not resolved by NCBI taxonomy: {missing}\")\n\ntaxids = [name_to_taxids[name][0] for name in names]\ntaxonomy_tree = ncbi.get_topology(taxids)\nprint(taxonomy_tree.to_str(props=[\"sci_name\", \"rank\"]))\n```\n\nETE 4 also provides `GTDBTaxa` for genome-centric bacterial and archaeal\ntaxonomy. Do not mix NCBI numeric TaxIDs and GTDB string identifiers.\n\n### Visualize\n\nInteractive SmartView:\n\n```python\nfrom ete4 import Tree\n\ntree = Tree(\"((A:1,B:1)90:0.2,C:1);\", parser=\"support\")\ntree.explore()\n```\n\nStatic SmartView screenshot:\n\n```python\ntree.render_sm(\"tree.png\", w=1200, h=800)\n```\n\n`render_sm()` produces PNG screenshot data; use the Qt treeview renderer when\nthe deliverable must be vector PDF or SVG. Load\n[`references\u002Fvisualization.md`](references\u002Fvisualization.md) for layouts,\nfaces, remote exploration, and renderer selection.\n\n## Bundled Scripts\n\nRun from this skill directory. The commands below use a pinned, isolated ETE 4\nruntime through `uv run --with`.\n\n### Tree operations\n\n```bash\nuv run --with \"ete4==4.4.0\" python scripts\u002Ftree_operations.py \\\n  stats tree.nw --parser 1\nuv run --with \"ete4==4.4.0\" python scripts\u002Ftree_operations.py \\\n  ascii tree.nw --parser 1 --props name,dist\nuv run --with \"ete4==4.4.0\" python scripts\u002Ftree_operations.py \\\n  convert tree.nw output.nw \\\n  --input-parser 1 --output-parser 1\nuv run --with \"ete4==4.4.0\" python scripts\u002Ftree_operations.py \\\n  reroot tree.nw rooted.nw \\\n  --parser 1 --midpoint\nuv run --with \"ete4==4.4.0\" python scripts\u002Ftree_operations.py \\\n  prune tree.nw pruned.nw \\\n  --parser 1 --keep species1 species2 species3\nuv run --with \"ete4==4.4.0\" python scripts\u002Ftree_operations.py \\\n  compare tree_a.nw tree_b.nw\n```\n\nUse `--keep-file taxa.txt` instead of `--keep ...` for one taxon per line.\nThe script refuses ambiguous or missing requested names rather than silently\nproducing a partial tree.\n\n### Visualization\n\n```bash\n# Interactive SmartView\nuv run --with \"ete4==4.4.0\" python scripts\u002Fquick_visualize.py \\\n  tree.nw --parser 1\n\n# SmartView PNG (requires ete4[render-sm])\nuv run --with \"ete4[render-sm]==4.4.0\" python scripts\u002Fquick_visualize.py \\\n  tree.nw tree.png \\\n  --parser support --mode circular --show-support --color-by-support\n\n# Vector output via Qt treeview (requires ete4[treeview])\nuv run --with \"ete4[treeview]==4.4.0\" python scripts\u002Fquick_visualize.py \\\n  tree.nw tree.svg \\\n  --parser 1 --engine treeview --title \"Species phylogeny\"\n```\n\n## Quality and Interpretation Checks\n\nBefore reporting a result:\n\n1. Confirm the parser preserves the intended internal names, support, and\n   branch lengths.\n2. Check for empty and duplicate leaf names before name-based lookup or RF\n   comparison.\n3. State whether the tree is treated as rooted or unrooted.\n4. Preserve branch lengths when pruning only if retained pairwise distances\n   should remain unchanged.\n5. Treat arbitrary polytomy resolution as a display\u002Falgorithmic convenience,\n   not evolutionary evidence.\n6. Record ETE version, parser, rooting method, pruning set, and taxonomy\n   database snapshot in reproducible analyses.\n7. Prefer iterators for large trees and `get_cached_content()` for repeated\n   descendant-content queries.\n\n## Reference Map\n\nLoad only the reference needed for the task:\n\n- [`references\u002Fapi_reference.md`](references\u002Fapi_reference.md) — ETE 4 core\n  classes, parsers, properties, traversal, I\u002FO, topology, and comparison\n- [`references\u002Fworkflows.md`](references\u002Fworkflows.md) — complete analysis\n  patterns, validation, reconciliation, batching, and large-tree work\n- [`references\u002Fvisualization.md`](references\u002Fvisualization.md) — SmartView,\n  layouts\u002Ffaces, PNG screenshots, and Qt vector rendering\n- [`references\u002Ftaxonomy.md`](references\u002Ftaxonomy.md) — NCBI and GTDB setup,\n  translation, topology, annotation, and reproducibility\n- [`references\u002Fmigration-ete3-to-ete4.md`](references\u002Fmigration-ete3-to-ete4.md)\n  — breaking API changes and porting checklist\n\n## Authoritative Upstream Sources\n\n- Documentation: https:\u002F\u002Fetetoolkit.github.io\u002Fete\u002F\n- ETE 3 to ETE 4 migration: https:\u002F\u002Fetetoolkit.github.io\u002Fete\u002F3to4.html\n- Releases: https:\u002F\u002Fgithub.com\u002Fetetoolkit\u002Fete\u002Freleases\n- PyPI: https:\u002F\u002Fpypi.org\u002Fproject\u002Fete4\u002F\n- Source: https:\u002F\u002Fgithub.com\u002Fetetoolkit\u002Fete\n- Visualization gallery: https:\u002F\u002Fgithub.com\u002Fetetoolkit\u002Fete-gallery\n\n## Agent operating procedure\n\n1. **Check the environment.** Confirm tool versions, the reference genome\u002Fannotation build and the input formats (FASTQ, BAM, VCF, h5ad).\n2. **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.\n3. **Run a small version first.** Run the pipeline on a small subset (one sample, one chromosome, a few thousand cells) first.\n4. **Execute the full task** using the instructions and references above.\n5. **Validate the result.** Check QC metrics, sample identities, genome build consistency and batch effects before interpreting results.\n6. **Report.** State what was run (versions, commands, parameters), what was checked, and what is still uncertain.\n\n| If this happens | Do this |\n|---|---|\n| Genome builds or identifiers do not match between inputs | Stop and harmonize (liftover, ID mapping) before continuing. |\n| 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. |\n| A required input, identifier or parameter is ambiguous | Ask the user, or state the assumption explicitly before running. |\n\n**Integrity rules**\n\n- Never fabricate results, parameters, identifiers, citations or statistics. If something cannot be run or verified, say so plainly.\n- Do not interpret biological significance beyond what the statistics support; report multiple-testing correction.\n- Treat version-specific details here as possibly outdated: confirm them against the official documentation for the installed version.\n- Ask before actions that cost money, consume shared GPUs or cloud quota, touch personal or patient data, or cannot be undone.\n\n## Related skills\n\n- `biopython`: Provides Biopython (Bio.Seq, Bio.SeqIO, Bio.Align, Bio.Entrez, Bio.Blast, Bio.PDB, Bio.Phylo, Bio.motifs, Bio.SeqUtils, Bio.Restriction) fo…\n- `scikit-bio`: Python library scikit-bio for biological sequence and community-ecology analysis: DNA\u002FRNA\u002Fprotein sequences, pair_align alignment, phylogen…\n",{"name":5,"license":48,"metadata":49,"description":7,"allowed-tools":54,"compatibility":55},"GPL-3.0-or-later",{"tags":50,"version":51,"category":52,"maintainer":53},"phylogenetics, phylogenetic trees, Newick, evolutionary biology, bioinformatics","2.1","life-sciences","Kalaris Labs","Read Write Edit Bash Python","Bundled scripts require Python 3.10+ and ete4 4.4.0 (upstream ete4 supports Python >=3.7). Taxonomy setup and SmartView exploration need network access; static SmartView PNG rendering needs ete4[render-sm], and Qt PDF\u002FSVG rendering needs ete4[treeview].","main","0da4485785ee599388900be50db1635489d53056",".agents\u002Fskills\u002Fkal-etetoolkit","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6","https:\u002F\u002Fdisha6.6.thenitishkr.in\u002F","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh","www.thenitishkr","thenitishkr | AI • Cyber-security • Research\r\n","2026-11-08 03:33:25",{"source":8,"skillName":5,"commands":66,"prompt":76,"zipAvailable":77},[67,70,73],{"tool":68,"command":69},"npx","npx skills add Tashima-Tarsh\u002FDisha6.6 --skill etetoolkit",{"tool":71,"command":72},"bunx","bunx skills add Tashima-Tarsh\u002FDisha6.6 --skill etetoolkit",{"tool":74,"command":75},"pnpm","pnpm dlx skills add Tashima-Tarsh\u002FDisha6.6 --skill etetoolkit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fkal-etetoolkit\u002FSKILL.md",true,[79,85,89,93,97,101,107],{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Fapi_reference.md","REFERENCE","参考文档",14323,"https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fkal-etetoolkit\u002Freferences\u002Fapi_reference.md",{"path":86,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fmigration-ete3-to-ete4.md",11766,"https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fkal-etetoolkit\u002Freferences\u002Fmigration-ete3-to-ete4.md",{"path":90,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Ftaxonomy.md",9003,"https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fkal-etetoolkit\u002Freferences\u002Ftaxonomy.md",{"path":94,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":95,"sourceHtmlUrl":96},"references\u002Fvisualization.md",11946,"https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fkal-etetoolkit\u002Freferences\u002Fvisualization.md",{"path":98,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":99,"sourceHtmlUrl":100},"references\u002Fworkflows.md",15330,"https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fkal-etetoolkit\u002Freferences\u002Fworkflows.md",{"path":102,"resourceType":103,"resourceTypeDesc":104,"sizeBytes":105,"sourceHtmlUrl":106},"scripts\u002Fquick_visualize.py","SCRIPT","脚本",15252,"https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fkal-etetoolkit\u002Fscripts\u002Fquick_visualize.py",{"path":108,"resourceType":103,"resourceTypeDesc":104,"sizeBytes":109,"sourceHtmlUrl":110},"scripts\u002Ftree_operations.py",15763,"https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fkal-etetoolkit\u002Fscripts\u002Ftree_operations.py",[112,141,163,190,215,239],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":116,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":122,"publishedAt":43},"01M6QRD07D4TGNDK6VJ4EHF8BV","youtube-full","Use when the user needs YouTube transcripts, video search, channel browsing, playlist extraction, or content monitoring. Trigger phrases: 'get the transcript for', 'search YouTube for', 'what are the latest videos on', 'list this playlist', 'monitor this channel', or any request involving a YouTube URL, video ID, or @handle. Do NOT use for downloading video or audio files, YouTube engagement data (likes, comments), or private\u002Fage-restricted videos.","MIT","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fyoutube-full\u002FSKILL.md",[119],{"categoryNo":120,"categoryName":121,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000016","图像与多媒体",[123,124,125,126,127,128,129,130,131,132,133,35,134,135,136,137,27,138,139,140],"youtube full","youtube","full","transcript","search","monitoring","data","Video","Audio","list","files","get","age","trigger","URL","browsing","request","youtube transcripts",{"skillNo":142,"name":143,"nameZh":6,"description":144,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":116,"licenseFileUrl":6,"sourceHtmlUrl":145,"categories":146,"keywords":147,"publishedAt":43},"01M6QRCJ3112VYPA97YG7KGMC2","x-twitter-growth","X\u002FTwitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X\u002FTwitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fx-twitter-growth\u002FSKILL.md",[],[148,149,150,151,127,152,153,154,155,156,40,157,38,158,36,159,160,161,162,27],"twitter","x twitter growth","growth","research","content","engineering","plan","web search","competitors","engine","strategy","platform","grow","posting","competitive",{"skillNo":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":116,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":172,"publishedAt":43},"01M6QRBN3EHQNJY42RERP7A149","write-a-skill","Create new agent skills with proper structure, progressive disclosure, and bundled resources. Use when user wants to create, write, build, or author a new skill.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwrite-a-skill\u002FSKILL.md",[169],{"categoryNo":170,"categoryName":171,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[173,38,174,175,176,177,178,179,36,180,181,56,182,183,184,185,186,187,188,189],"write a skill","github","create","https","productivity","matt pocock","direct","example","build","new skill","structure","new agent","resources","with","tree","progressive disclosure","author",{"skillNo":191,"name":192,"nameZh":6,"description":193,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":116,"licenseFileUrl":6,"sourceHtmlUrl":194,"categories":195,"keywords":196,"publishedAt":43},"01M6QRB6G8P33PNGAF9Y69EJ9T","wrap-up","Close out a launched Claude Managed Agent — recap every primitive the founder now owns, regenerate the single-file overview page, and suggest the next 1-2 upgrades. Use when the user says \"wrap up\", \"close this out\", \"what do I own now\", \"give me the summary\", \"recap the agent\", or when the orchestrator routes phase=wrap-up. primitives_inventory.py tables everything owned (agent, environment, session, memory, outcome, deployment); overview_page.py regenerates a self-contained .\u002Fmy-agent\u002Fagent-overview.html; upgrade_suggester.py ranks the next moves from recorded deferrals plus standing hardening steps. Companion to run-without-you; the last stop before phase=done.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwrap-up\u002FSKILL.md",[],[197,198,199,200,201,202,203,204,205,36,206,35,207,208,209,210,211,212,213,214],"wrap up","up","wrap","gemini","deployment","run","file","hardening","closeout","stop","upgrade","founder","close","companion","you","tables","directions","phase",{"skillNo":216,"name":217,"nameZh":6,"description":218,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":116,"licenseFileUrl":6,"sourceHtmlUrl":219,"categories":220,"keywords":222,"publishedAt":43},"01M6QRA5AYC1RBFZ39GTWGS3N8","workflow-builder","Design and write deterministic multi-agent workflow scripts (.js files in .claude\u002Fworkflows\u002F) for Claude Code's Workflow tool. Use when a user wants to build, create, author, scaffold, or run a custom Claude Code workflow, orchestrate sub-agents (fan-out, pipeline, loop, judge-panel), or automate a repeatable multi-step task across fresh-context agents.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fworkflow-builder\u002FSKILL.md",[221],{"categoryNo":170,"categoryName":171,"taxonomyType":21,"taxonomyTypeDesc":22},[223,224,225,226,227,175,202,228,229,230,231,232,38,233,133,234,235,236,237,238],"workflow","workflow builder","builder","design","workflows","code","orchestrate","pipeline","loop","multi-agent","context","across","fresh","scripts","judge","claude code workflow",{"skillNo":240,"name":241,"nameZh":6,"description":242,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":116,"licenseFileUrl":6,"sourceHtmlUrl":243,"categories":244,"keywords":245,"publishedAt":43},"01M6QR7QMCZESKQA0ERW1E657M","weekly-review","Use when someone wants to run a weekly review, close open loops, audit stalled projects and commitments, get their system back to trusted, restart a lapsed review habit, or says \"\u002Fcs:weekly-review\". Walks David Allen's three-phase loop — GET CLEAR, GET CURRENT, GET CREATIVE — with deterministic scripts that inventory open loops, gate the checklist with named gaps, and score commitment health 0-100.","https:\u002F\u002Fgithub.com\u002FTashima-Tarsh\u002FDisha6.6\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fweekly-review\u002FSKILL.md",[],[246,247,248,249,250,251,252,253,254,231,255,256,257,258,259,260,134,261,262,214],"review","weekly review","weekly","deterministic scripts","reflect","feeds","inventory","open","team","projects","project-management","scanner","conversation","back","project","sprint","cadence"]