vivarium-phylolisted
Install: claude install-skill Jason-0409-G/vivarium
# vivarium-phylo — alignment, trees, and selection
Turn a set of homologous sequences into a defensible tree, and test genes for selection. The align→trim→tree path runs now in `bio_tools`; big trees (many taxa, partitioned models) and codon-based dN/dS tests (PAML) are handed back as exact commands.
## Step 1 — pick the analysis
| Goal | Path | Tool |
|---|---|---|
| Gene/species tree from homologous proteins or genes | align → trim → ML tree | MAFFT → trimAl → IQ-TREE (bundled) |
| Quick tree for a big alignment | align → trim → fast tree | MAFFT → trimAl → FastTree (`--fast`) |
| Is a gene under selection? (ω = dN/dS) | codon alignment → codeml | pal2nal + PAML (scaffold) |
## Step 2 — alignment → trim → tree (bundled, runnable)
```bash
bash <skill-dir>/scripts/phylo.sh tree --input <homologs.faa> --out <prefix> [--fast] [--bb 1000]
```
Pipeline: **MAFFT** (`--auto`) → **trimAl** (`-automated1`, removes poorly aligned columns) → **IQ-TREE** (ModelFinder `-m MFP`, `-B <bb>` ultrafast bootstrap) — or **FastTree** with `--fast` for a quick look. Outputs `<prefix>.aln`, `<prefix>.trim.aln`, `<prefix>.treefile`, and the IQ-TREE log/model. Input is a multi-FASTA of **homologous** sequences (one per taxon for a species tree; orthogroup members for a gene tree) — get them from a vivarium-compare orthogroup or a vivarium-search hit set, not a random mix.
For **many taxa / a concatenated supermatrix** (slow), scaffold IQ-TREE rather than blocking:
```bash
iqtree -s <supermatri