[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74YK6HSS5BC5Z6D8YFYMY6S":3,"skill-same:01M74YK6HSS5BC5Z6D8YFYMY6S":88},{"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":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":35,"repositoryHtmlUrl":36,"repositoryHomepageUrl":37,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M74YK6HSS5BC5Z6D8YFYMY6S","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.","KalarisLabs\u002Fresearch-agent-skills","KalarisLabs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F300878568?v=4","01M74Y7MT23GXXC56VM6TVSXZY","Kalarislabs","01M74Y7MTQM9REXZX4SNXWX95C",132,"GPL-3.0","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fetetoolkit\u002FSKILL.md",[],[],"2026-11-12 13:55:43",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":24,"metadata":25,"description":7,"allowed-tools":30,"compatibility":31},"GPL-3.0-or-later",{"tags":26,"version":27,"category":28,"maintainer":29},"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","29fe36d26127205057d5e0ed8425f6b0e9a8c13a","skills\u002Fetetoolkit",16,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills","https:\u002F\u002Fdocs.kalarislabs.com\u002Fresearch-agent-skills","https:\u002F\u002Fgithub.com\u002FKalarisLabs","kalarislabs.com","Applied AI lab building the infrastructure for the agentic era","2026-11-14 17:49:08",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add KalarisLabs\u002Fresearch-agent-skills --skill etetoolkit",{"tool":48,"command":49},"bunx","bunx skills add KalarisLabs\u002Fresearch-agent-skills --skill etetoolkit",{"tool":51,"command":52},"pnpm","pnpm dlx skills add KalarisLabs\u002Fresearch-agent-skills --skill etetoolkit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fetetoolkit\u002FSKILL.md",true,[56,62,66,70,74,78,84],{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fapi_reference.md","REFERENCE","参考文档",14323,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fetetoolkit\u002Freferences\u002Fapi_reference.md",{"path":63,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Fmigration-ete3-to-ete4.md",11766,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fetetoolkit\u002Freferences\u002Fmigration-ete3-to-ete4.md",{"path":67,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Ftaxonomy.md",9003,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fetetoolkit\u002Freferences\u002Ftaxonomy.md",{"path":71,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fvisualization.md",11946,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fetetoolkit\u002Freferences\u002Fvisualization.md",{"path":75,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fworkflows.md",15330,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fetetoolkit\u002Freferences\u002Fworkflows.md",{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"scripts\u002Fquick_visualize.py","SCRIPT","脚本",15333,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fetetoolkit\u002Fscripts\u002Fquick_visualize.py",{"path":85,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":86,"sourceHtmlUrl":87},"scripts\u002Ftree_operations.py",16059,"https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fetetoolkit\u002Fscripts\u002Ftree_operations.py",[89,97,104,111,118,125],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M74Z8MGT305R11SNY5G28QH5","plos","Prepare manuscripts for PLOS journals (PLOS ONE, PLOS Biology, PLOS Computational Biology, PLOS Genetics, PLOS Medicine, PLOS Pathogens, PLOS Neglected Tropical Diseases, PLOS Global Public Health and others), covering structure, abstract and author summary, Vancouver-style references, the mandatory data availability policy, ethics and financial disclosure statements, figure requirements (PACE), the PLOS LaTeX template, reporting guidelines and PLOS ONE's publication criteria. Use when targeting any PLOS journal or checking compliance with PLOS policies.","MIT","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fplos\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M74Z8CCN9APXYHNQ95V1EBGT","pkpd-modeling","Pharmacokinetic and pharmacodynamic modelling and simulation - non-compartmental analysis, compartmental and population PK, PK\u002FPD and exposure-response, TMDD, PBPK orientation, bioequivalence, allometric scaling and first-in-human dose, drug interaction prediction, and Bayesian therapeutic drug monitoring. Use when analysing concentration-time data, deriving exposure metrics, fitting PK or PD models, or evaluating dosing regimens. Triggers include \"pharmacokinetics\", \"pharmacodynamics\", \"PK\u002FPD\", \"NCA\", \"non-compartmental\", \"AUC\", \"Cmax\", \"lambda z\", \"half-life\", \"clearance\", \"volume of distribution\", \"compartmental model\", \"population PK\", \"popPK\", \"NONMEM\", \"nlmixr2\", \"Pharmpy\", \"Monolix\", \"exposure-response\", \"Emax\", \"EC50\", \"indirect response\", \"effect compartment\", \"TMDD\", \"PBPK\", \"bioequivalence\", \"RSABE\", \"ABEL\", \"allometric scaling\", \"first-in-human\", \"MABEL\", \"drug-drug interaction\", \"DDI\", \"ICH M12\", \"concentration-QTc\", \"therapeutic drug monitoring\", \"MIPD\", and \"dosing regimen\".","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpkpd-modeling\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":19},"01M74Z86YHJJ1FM3X87BHN76KZ","pinecone","Guides use of Pinecone, a managed serverless vector database, through its Python client and the LangChain and LlamaIndex integrations. Covers creating indexes, upserting and querying vectors, metadata filtering, namespaces, hybrid dense and sparse search, index management, and deleting vectors. Use when building a production RAG system on a hosted vector store, adding semantic search or recommendations without running infrastructure, isolating per-user or per-tenant data with namespaces, combining dense and sparse vectors in one query, or filtering results by metadata. Do not use for self-hosted or local stores (Chroma, Weaviate) or offline similarity search (FAISS).","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpinecone\u002FSKILL.md",[],[],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":19},"01M74Z80T6E89SAJ8MYDD0767Q","pi-agent","Build with and use Pi, the minimal terminal coding harness. Use for installing Pi, configuring providers\u002Fmodels\u002Fsettings\u002Fenvironment variables, creating Pi skills\u002Fextensions\u002Fpackages\u002Fthemes\u002Fprompt templates, embedding Pi through the SDK, integrating over RPC or JSON event streams, parsing sessions, running local models through the llama.cpp router, developing custom Pi providers and TUI components, or using ecosystem packages such as pi-subagents (delegation\u002Forchestration), pi-mcp-adapter (MCP servers), pi-interview (interactive forms), and pi-web-access (web search, fetching, video understanding).","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpi-agent\u002FSKILL.md",[],[],{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":19},"01M74Z7WF1Y8Q3VFAQPPPRAFMV","phoenix-observability","Open-source AI observability platform for LLM tracing, evaluation, and monitoring. Use when debugging LLM applications with detailed traces, running evaluations on datasets, or monitoring production AI systems with real-time insights.","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fphoenix-observability\u002FSKILL.md",[],[],{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":93,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":19},"01M74Z7HNEH1A2AVYR3G1X2QV6","peft-fine-tuning","Fine-tunes LLMs with Hugging Face PEFT, using LoRA, QLoRA, IA3, AdaLoRA, prefix tuning, and prompt tuning so that under 1% of parameters are trained. Covers rank, alpha, and target module selection, loading and merging adapters, multi-adapter serving, and integration with TRL SFTTrainer, Axolotl, and vLLM. Use when fine-tuning 7B-70B models on limited GPU memory, when running QLoRA on a single 24GB GPU, when choosing LoRA rank and alpha, when merging or swapping adapters on one base model, or when debugging CUDA OOM or an adapter that does not apply. Not for full fine-tuning of small models under 1B parameters or cases needing all weights updated.","https:\u002F\u002Fgithub.com\u002FKalarisLabs\u002Fresearch-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fpeft-fine-tuning\u002FSKILL.md",[],[]]