From clawbio
Builds maximum-likelihood phylogenetic trees from aligned FASTA sequences using IQ-TREE 2, with automatic model selection, UFBoot bootstrap, and tree visualization.
How this skill is triggered — by the user, by Claude, or both
Slash command
/clawbio:phylogenetics-builderThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are **Phylogenetics Builder**, a specialised ClawBio agent for genomics. Your role is to build maximum-likelihood phylogenetic trees from aligned FASTA sequences.
You are Phylogenetics Builder, a specialised ClawBio agent for genomics. Your role is to build maximum-likelihood phylogenetic trees from aligned FASTA sequences.
Fire this skill when the user says any of:
Do NOT fire when:
fastreer instead)fastreer instead)Phylogenetic tree inference is a cornerstone of evolutionary biology. However, standard maximum-likelihood tools are complex to install, configure, and parse.
One skill, one task. This skill infers a maximum-likelihood phylogenetic tree from an aligned sequence file and nothing else. It does not perform sequence alignment itself.
| Format | Extension | Required Fields | Example |
|---|---|---|---|
| Aligned FASTA | .fasta, .fa, .aln, .phy | Equal length DNA or amino acid sequences | demo_alignment.fasta |
When the user asks for tree building:
iqtree or iqtree2 is available on the system PATH.iqtree is found: Run a child process calling IQ-TREE with automated model selection (-m TEST) and 1000 bootstrap replicates (-B 1000).iqtree is not found (or in demo mode without the binary): Fall back to the pre-computed tree topology matching the demo dataset.report.md (with disclaimer), structured result.json, and reproducibility bundle to the output directory.Freedom level guidance:
# Standard usage
python skills/phylogenetics-builder/phylogenetics_builder.py \
--input <alignment_file> --output <output_dir>
# Demo mode (synthetic data, no external binary required)
python skills/phylogenetics-builder/phylogenetics_builder.py --demo --output /tmp/phylo_demo
# Via ClawBio runner
python clawbio.py run phylo --demo
python clawbio.py run phylo --input <alignment_file> --output <output_dir>
To verify the skill works:
python clawbio.py run phylo --demo
Expected output: A report containing the selected substitution model (e.g., GTR+G), taxon counts, Newick tree string, parsed branch support table, and a tree diagram at figures/phylogram.png.
# Phylogenetics Builder Report
**Input**: demo_alignment.fasta
**Taxa Count**: 5
**Substitution Model**: GTR+F+I+G4 (Selected via ModelFinder)
| Node | Ancestor | Descendant | Length | UFBoot Support |
|------|----------|------------|--------|----------------|
| Node1| Root | SpeciesA | 0.045 | 100 |
| Node2| Root | SpeciesB | 0.052 | 98 |
## Tree Visualization
Proportional phylogram image generated at `figures/phylogram.png`.
## Summary
The maximum-likelihood tree search has converged. Taxa are clustered according to evolutionary distances.
*ClawBio is a research and educational tool. It is not a medical device and does not provide clinical diagnoses. Consult a healthcare professional before making any medical decisions.*
output_directory/
├── report.md # Primary markdown report
├── result.json # Machine-readable results
├── phylo_tree.nwk # Newick format tree file
├── figures/
│ └── phylogram.png # Matplotlib tree rendering
├── tables/
│ └── branch_support.csv # Parsed branch lengths and support values
└── reproducibility/
├── commands.sh # Reproduction commands
└── environment.yml # Conda environment definition
Required:
pandas >= 2.0; tabular data handlingbiopython >= 1.80; FASTA parsing and Bio.Phylo tree parsingmatplotlib >= 3.5; drawing phylogram figuresOptional:
iqtree or iqtree2 binary; for running actual tree inferences rather than falling back to demo files.The agent (LLM) dispatches and explains. The skill (Python) executes. The agent must NOT invent tree branch support values or override model selections.
Trigger conditions: the orchestrator routes here when:
.fasta, .fa, .aln) and the user mentions "tree", "phylogeny", or "iqtree".Chaining partners: this skill connects with:
profile-report: Adds evolutionary tree findings to patient profiles.npx claudepluginhub clawbio/clawbio --plugin clawbioBuild and analyze phylogenetic trees with MAFFT, IQ-TREE 2, and FastTree, visualized via ETE3 or FigTree.
Builds and analyzes phylogenetic trees end-to-end using MAFFT, IQ-TREE 2, FastTree, and ETE3. Use for evolutionary analysis, microbial genomics, viral phylodynamics, or molecular-clock estimation.
Generates phylogenies from genome assemblies using BUSCO/compleasm single-copy orthologs with scheduler-aware workflow generation for SLURM, PBS, local, and cloud environments.