Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Build maximum likelihood phylogenetic trees using IQ-TREE2 and RAxML-ng. Use when inferring publication-quality trees with model selection, ultrafast bootstrap, or partitioned analyses from sequence alignments.
.claude/skills/bio-phylo-modern-tree-inference/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 88% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 139% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 62% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 105% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 112% | 0% |
<!--
#
#
-->
Build maximum likelihood phylogenetic trees with automatic model selection and ultrafast bootstrap.
bash# Simple ML tree with automatic model selection iqtree2 -s alignment.fasta -m MFP -B 1000 -T AUTO # -s: input alignment # -m MFP: ModelFinder Plus (automatic model selection + tree inference) # -B 1000: 1000 ultrafast bootstrap replicates (minimum recommended for publication) # -T AUTO: automatic thread detection
| File | Description | |------|-------------| | .treefile | Best ML tree in Newick format | | .iqtree | Full analysis report with model parameters | | .log | Run log | | .contree | Consensus tree with bootstrap support | | .splits.nex | Bootstrap splits in Nexus format | | .model.gz | Model parameters | | .bionj | Initial BIONJ tree | | .mldist | ML distance matrix | | .ckp.gz | Checkpoint file for resuming |
bash# ModelFinder only (no tree inference) iqtree2 -s alignment.fasta -m MF # Use specific model iqtree2 -s alignment.fasta -m GTR+G4 -B 1000 # Test only specific models iqtree2 -s alignment.fasta -m MF -mset GTR,HKY,K2P # Protein models iqtree2 -s protein.fasta -m MFP -B 1000 -st AA
| Model | Parameters | Use Case | |-------|------------|----------| | JC | Equal rates | Very simple, rarely appropriate | | K2P/K80 | Ti/Tv ratio | Simple, some rate variation | | HKY | Ti/Tv + base freq | Moderate complexity | | GTR | 6 rates + base freq | Most general, recommended default | | +G4 | Gamma rate variation | 4 discrete rate categories | | +I | Invariant sites | Sites that never change | | +R4 | FreeRate model | More flexible than Gamma |
bash# Standard ultrafast bootstrap (UFBoot2) # B>=1000: Minimum for publication. Use 10000 for final analyses. iqtree2 -s alignment.fasta -m GTR+G4 -B 1000 # Standard bootstrap (slower but more accurate for small datasets) iqtree2 -s alignment.fasta -m GTR+G4 -b 100 # SH-aLRT test (fast approximate likelihood ratio test) iqtree2 -s alignment.fasta -m GTR+G4 -alrt 1000 # Both UFBoot and SH-aLRT iqtree2 -s alignment.fasta -m GTR+G4 -B 1000 -alrt 1000
| UFBoot | SH-aLRT | Interpretation | |--------|---------|----------------| | >= 95 | >= 80 | Strong support | | 80-94 | 70-79 | Moderate support | | < 80 | < 70 | Weak support |
For multi-gene datasets with different evolutionary rates:
bash# Create partition file (partitions.nex) cat > partitions.nex << 'EOF' #nexus begin sets; charset gene1 = 1-500; charset gene2 = 501-1200; charset gene3 = 1201-1800; charpartition mine = HKY:gene1, GTR:gene2, GTR+G:gene3; end; EOF # Run partitioned analysis iqtree2 -s concat.fasta -p partitions.nex -m MFP -B 1000 # Edge-linked partition model (proportional branch lengths) iqtree2 -s concat.fasta -q partitions.nex -m MFP -B 1000 # Edge-unlinked (independent branch lengths per partition) iqtree2 -s concat.fasta -Q partitions.nex -m MFP -B 1000
bash# Simple ML tree with GTR+G raxml-ng --all --msa alignment.fasta --model GTR+G --bs-trees 100 # --all: ML search + bootstrapping # --msa: input alignment # --model: substitution model # --bs-trees: number of bootstrap replicates
bash# DNA models raxml-ng --msa alignment.fasta --model GTR+G4+I # Protein models (automatic detection) raxml-ng --msa protein.fasta --model LG+G8+F # Check alignment and determine model raxml-ng --check --msa alignment.fasta --model GTR+G
| File | Description | |------|-------------| | .raxml.bestTree | Best ML tree | | .raxml.support | Tree with bootstrap support values | | .raxml.bootstraps | All bootstrap trees | | .raxml.mlTrees | All ML trees from search | | .raxml.log | Analysis log | | .raxml.rba | Binary alignment (for restart) |
bash# Multiple ML searches (find global optimum) # --tree pars{10}: 10 starting parsimony trees recommended for thorough search raxml-ng --msa alignment.fasta --model GTR+G --tree pars{10} --prefix ml_search # Constrained tree search raxml-ng --msa alignment.fasta --model GTR+G --tree-constraint constraint.tre # Site likelihoods for topology tests raxml-ng --sitelh --msa alignment.fasta --model GTR+G --tree candidate.tre
| Feature | IQ-TREE2 | RAxML-ng | |---------|----------|----------| | Model selection | Built-in ModelFinder | External (ModelTest-NG) | | Ultrafast bootstrap | Yes (UFBoot2) | No | | Standard bootstrap | Yes | Yes | | Partition models | Extensive | Good | | Speed | Faster for UFBoot | Faster for standard BS | | Memory | Lower | Higher | | Checkpointing | Yes | Yes |
bash# IQ-TREE2 with reduced memory iqtree2 -s large.fasta -m GTR+G -B 1000 -T 4 -mem 8G # Use approximate NNI search iqtree2 -s large.fasta -m GTR+G -B 1000 -fast # RAxML-ng with parsimony starting trees raxml-ng --msa large.fasta --model GTR+G --tree pars{5} --threads 8
bash# IQ-TREE2: AU test comparing trees iqtree2 -s alignment.fasta -m GTR+G -z trees.nwk -n 0 -zb 10000 -au # Output interpretation: # p-AU < 0.05: Reject tree # p-AU >= 0.05: Cannot reject tree
bash# IQ-TREE2: Enforce monophyly constraint iqtree2 -s alignment.fasta -m GTR+G -g constraint.tre -B 1000 # Constraint file format (Newick with taxa to constrain): # ((Human,Chimp),Gorilla);
bash# 1. Check alignment iqtree2 -s alignment.fasta -m GTR+G -n 0 # 2. Find best model iqtree2 -s alignment.fasta -m MF -T AUTO # 3. Full analysis with best model iqtree2 -s alignment.fasta -m GTR+I+G4 -B 1000 -alrt 1000 -T AUTO # 4. Visualize result cat alignment.fasta.treefile
bash# IQ-TREE2: Resume from checkpoint iqtree2 -s alignment.fasta -m GTR+G -B 1000 --redo-tree # RAxML-ng: Resume raxml-ng --msa alignment.fasta --model GTR+G --redo
bash# Set random seed for reproducible results # seed=12345: Any fixed seed ensures reproducibility across runs iqtree2 -s alignment.fasta -m GTR+G -B 1000 --seed 12345 raxml-ng --msa alignment.fasta --model GTR+G --seed 12345 --bs-trees 100
<!-- AUTHOR_SIGNATURE: 9a7f3c2e-MD-BABU-MIA-2026-MSSM-SECURE -->
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 8,470 | 4,823 | -43% | 1 | 1 | 0% | 1,734 | 3,260 | +88% | 0 | 0 | — |
case-02 | pass→pass | 7,844 | 3,131 | -60% | 1 | 1 | 0% | 1,352 | 2,863 | +112% | 0 | 0 | — |
case-15 | pass→pass | 2,671 | 2,237 | -16% | 1 | 1 | 0% | 467 | 2,692 | +476% | 0 | 0 | — |
case-03 | pass→pass | 9,312 | 6,481 | -30% | 1 | 1 | 0% | 1,933 | 3,423 | +77% | 0 | 0 | — |
case-04 | pass→pass | 5,227 | 2,117 | -59% | 1 | 1 | 0% | 1,001 | 2,713 | +171% | 0 | 0 | — |
case-05 | fail→pass | 8,409 | 2,729 | -68% | 1 | 1 | 0% | 1,124 | 2,684 | +139% | 0 | 0 | — |
case-06 | pass→pass | 4,990 | 2,657 | -47% | 1 | 1 | 0% | 1,009 | 2,740 | +172% | 0 | 0 | — |
case-07 | pass→pass | 6,102 | 2,268 | -63% | 1 | 1 | 0% | 984 | 2,709 | +175% | 0 | 0 | — |
case-08 | pass→pass | 4,567 | 1,860 | -59% | 1 | 1 | 0% | 868 | 2,574 | +197% | 0 | 0 | — |
case-09 | fail→pass | 10,037 | 3,900 | -61% | 1 | 1 | 0% | 1,859 | 3,016 | +62% | 0 | 0 | — |
case-10 | pass→pass | 6,294 | 2,634 | -58% | 1 | 1 | 0% | 1,262 | 2,779 | +120% | 0 | 0 | — |
case-11 | fail→pass | 7,625 | 2,703 | -65% | 1 | 1 | 0% | 1,327 | 2,720 | +105% | 0 | 0 | — |
case-12 | pass→pass | 3,321 | 2,320 | -30% | 1 | 1 | 0% | 510 | 2,635 | +417% | 0 | 0 | — |
case-13 | pass→pass | 6,987 | 4,428 | -37% | 1 | 1 | 0% | 1,295 | 3,059 | +136% | 0 | 0 | — |
case-14 | fail→fail | 9,307 | 6,206 | -33% | 1 | 1 | 0% | 1,610 | 3,357 | +109% | 0 | 0 | — |
case-16 | pass→pass | 3,846 | 2,172 | -44% | 1 | 1 | 0% | 636 | 2,715 | +327% | 0 | 0 | — |
case-17 | pass→pass | 4,059 | 1,676 | -59% | 1 | 1 | 0% | 649 | 2,582 | +298% | 0 | 0 | — |
case-18 | pass→pass | 3,150 | 2,056 | -35% | 1 | 1 | 0% | 564 | 2,670 | +373% | 0 | 0 | — |
case-19 | pass→pass | 4,352 | 2,133 | -51% | 1 | 1 | 0% | 672 | 2,612 | +289% | 0 | 0 | — |
case-20 | pass→pass | 7,396 | 3,212 | -57% | 1 | 1 | 0% | 1,433 | 2,864 | +100% | 0 | 0 | — |
case-21 | pass→pass | 17,026 | 12,917 | -24% | 1 | 1 | 0% | 3,585 | 5,026 | +40% | 0 | 0 | — |
case-22 | pass→pass | 9,708 | 7,197 | -26% | 1 | 1 | 0% | 1,732 | 3,700 | +114% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +18 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 7/26/2026 | +14% |
Other measured skills in the registry, with their headline benchmark lift.