alterlab-phylogenetics
Build phylogenetic trees end-to-end from raw sequences — MAFFT multiple sequence alignment, optional TrimAl trimming, IQ-TREE 3 maximum-likelihood inference…
Skill by AlterLab-IEU
Chalk Labs
Need help deploying alterlab-phylogenetics?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/alterlab-ieu-alterlab-phylogenetics
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: ml, research
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/alterlab-phylogenetics
Tools it pre-approves 5
From allowed-tools in SKILL.md: the agent may use these without asking you each time.
ReadWriteEditBash(python:*)Bash(uv:*)
What's inside
- Skill name
alterlab-phylogenetics- Description
- Build phylogenetic trees end-to-end from raw sequences — MAFFT multiple sequence alignment, optional TrimAl trimming, IQ-TREE 3 maximum-likelihood inference with model selection and bootstraps, FastTree for large datasets, then visualize with ETE3 or FigTree. Use when reconstructing trees from sequences (FASTA) for evolutionary analysis, microbial genomics, viral phylodynamics, protein-family studies, or molecular-clock dating. For manipulating/comparing an EXISTING Newick tree (prune, root, Robinson-Foulds, duplication/speciation events) use alterlab-etetoolkit; for plain sequence parsing/translation use alterlab-biopython. Part of the AlterLab Academic Skills suite.
- License
- MIT
- Compatibility
- Needs external CLI tools (MAFFT, IQ-TREE 3, FastTree; optionally TrimAl) on PATH — install via bioconda or Homebrew, NOT pip/uv. Python parts (ETE3 for visualization) run under `uv run python`. No API key or account required.
- Allowed tools
- Read, Write, Edit, Bash(python:*), Bash(uv:*)
- Metadata
- version: 1.1.0 · last_updated: 2026-09-23 · skill-author: AlterLab
- Instructions
- 425 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
- Pre-approves some shell commands
Files (4)
- SKILL.md
- evals.json · evals/
- iqtree_inference.md · references/
- phylogenetic_analysis.py · scripts/
SKILL.md (first lines)
# Phylogenetics
## Overview
Phylogenetic analysis reconstructs the evolutionary history of biological sequences (genes, proteins, genomes) by inferring the branching pattern of descent. This skill covers the standard pipeline:
1. **MAFFT** — Multiple sequence alignment
2. **IQ-TREE 3** — Maximum likelihood tree inference with model selection
3. **FastTree** — Fast approximate maximum likelihood (for large datasets)
4. **ETE3** — Python library for tree manipulation and visualization
**Installation:** The aligners and tree builders are compiled CLI tools (not on PyPI). Install the binaries via bioconda or Homebrew; install the Python visualization layer with uv.
```bash
# CLI binaries — bioconda (cross-platform) ...
conda install -c bioconda mafft iqtree fasttree trimal # iqtree is now IQ-TREE 3
# ... or Homebrew on macOS (Apple Silicon): IQ-TREE/TrimAl live in the brewsci/bio tap
brew install mafft fasttree
brew tap brewsci/bio && brew install brewsci/bio/iqtree brewsci/bio/trimal
# Python visualization layer
uv pip install "ete3==3.1.3" # also needs numpy<2 and PyQt5 for rendering
```
> **Binary name:** bioconda's `iqtree` package is now **IQ-TREE 3** (3.1.x) and installs the
> executables `iqtree` and `iqtree3` — there is **no `iqtree2`** in it. Call `iqtree`, which
> works on both the 2.x and 3.x packages; only reach for a versioned name when two releases
> coexist on PATH. IQ-TREE 3 adds MixtureFinder, multi-tree mixture models (MAST), gene/site
> concordance factors, and CMAPLE for very large pathogen datasets; the options below are
> unchanged from 2.x.
>
> ETE3 (3.1.3) is the last ete3 release and can be fragile to install on Python ≥3.12 (pins old numpy/PyQt5). If `t.render()` fails, fall back to writing the Newick tree and viewing it in FigTree/iTOL, or use the maintained successor `ete4` (note: ete4 changed the `TreeStyle`/`render` API, so the snippets below are ete3-specific).
## When to Use This Skill
Use phylogenetics when:
- **Evolutionary relationships**: Which organism/gene is most closely related to my sequence?
- **Viral phylodynamics**: Trace outbreak spread and estimate transmission dates
- **Protein family analysis**: Infer evolutionary relationships within a gene family
- **Horizontal gene transfer detection**: Identify genes with discordant species/gene trees
- **Ancestral sequence reconstruction**: Infer ancestral protein sequences
- **Molecular clock analysis**: Estimate divergence dates using temporal sampling
- **GWAS companion**: Place variants in evolutionary context (e.g., SARS-CoV-2 variants)
- **Microbiology**: Species phylogeny from 16S rRNA or core genome phylogeny
### Does NOT Trigger
| Scenario | Use Instead |
|----------|-------------|
| Manipulating or comparing an **existing** Newick tree (prune, root, Robinson-Foulds, duplication/speciation) | `alterlab-etetoolkit` |
| Plain sequence parsing, translation, or format conversion | `alterlab-biopython` |
| Homology search to *find* the sequences before aligning them | `alterlab-blast` |
| Diversity/ordination on a community feature table (UniFrac, PCoA, PERMANOVA) | `alterlab-scikit-bio` |
| Running the 16S amplicon pipeline that produces the ASVs and tree | `alterlab-qiime2-amplicon` |
## Standard Workflow
### 1. Multiple Sequence Alignment with MAFFT
```python
import subprocess
import os
def run_mafft(input_fasta: str, output_fasta: str, method: str = "auto",
n_threads: int = 4) -> str:
"""
Align sequences with MAFFT.
Args:
input_fasta: Path to unaligned FASTA file
output_fasta: Path for aligned output
method: 'auto' (auto-select), 'einsi' (accurate), 'linsi' (accurate, slow),
'fftnsi' (medium), 'fftns' (fast), 'retree2' (fast)
n_threads: Number of CPU threads
Returns:
Path to aligned FASTA file
"""
methods = {
"auto": ["mafft", "--auto"],
"einsi": ["mafft", "--genafpair", "--maxiterate", "1000"],
"linsi": ["mafft", "--localpair", "--maxiterate", "1000"],
"fftnsi": ["mafft", "--retree", "2", "--maxiterate", "2"],
"fftns": ["mafft", "--retree", "2", "--maxiterate", "0"],
"retree2": ["mafft", "--retree", "2"],
}
cmd = methods.get(method, methods["auto"])
cmd += ["--thread", str(n_threads), "--inputorder", input_fasta]
with open(output_fasta, 'w') as out:
result = subprocess.run(cmd, stdout=out, stderr=subprocess.PIPE, text=True)
if result.returncode != 0:
raise RuntimeError(f"MAFFT failed:\n{result.stderr}")
# Count aligned sequences
with open(output_fasta) as f:
n_seqs = sum(1 for line in f if line.startswith('>'))
print(f"MAFFT: aligned {n_seqs} sequences → {output_fasta}")
return output_fasta
# MAFFT method selection guide:
# Few sequences (<200), accurate: linsi or einsi
# Many sequences (<1000), moderate: fftnsi
# Large datasets (>1000): fftns or auto
# Ultra-fast (>10000): mafft --retree 1
```
### 2. Trim Alignment (Optional but Recommended)
```python
def trim_alignment_trimal(aligned_fasta: str, output_fasta: str,
method: str = "automated1") -> str:
"""
Trim poorly aligned columns with TrimAl.
Methods:
- 'automated1': Automatic heuristic (recommended)From AlterLab-IEU/AlterLab-Academic-Skills, MIT.
More from AlterLab-IEU/AlterLab-Academic-Skills
- 0.545score
alterlab-alphafold
AlterLab-IEU
Predict protein 3D structures with AlphaFold2 via ColabFold — MMseqs2-accelerated MSAs, monomer and AlphaFold2-Multimer complex folding, and confidence-based…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-anndata
AlterLab-IEU
Build, slice, concatenate, read, and write AnnData annotated data matrices (obs, var, X, layers, obsm, uns) — the scverse data STRUCTURE, not an analysis…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-arboreto
AlterLab-IEU
Infer gene regulatory networks (GRNs) from expression matrices using arboreto's scalable GRNBoost2 and GENIE3 tree-ensemble algorithms with Dask-distributed…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-biopython
AlterLab-IEU
Manipulate biological sequences, parse FASTA/GenBank/PDB files, run phylogenetics, and access NCBI/PubMed programmatically via Biopython (Bio.SeqIO…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-bioservices
AlterLab-IEU
Query 40+ bioinformatics web services through one consistent Python API with bioservices (UniProt, KEGG, ChEMBL, Reactome, Ensembl, NCBI and more).
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-boltz
AlterLab-IEU
Co-fold biomolecular complexes with Boltz-2, an open AlphaFold3-style model — predict protein + ligand (SMILES/CCD), protein + nucleic-acid, and multi-chain…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-borzoi
AlterLab-IEU
Predict genome-wide functional genomics tracks from DNA sequence with Borzoi (Linder 2025) — a sequence-to-function model outputting RNA-seq, CAGE, ATAC, and…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-cellxgene
AlterLab-IEU
Query the CZ CELLxGENE Census (200M+ cells) programmatically via cellxgene-census and TileDB-SOMA, slicing expression by tissue, disease, or cell type and…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-chai
AlterLab-IEU
Predict biomolecular complexes with Chai-1, an open AlphaFold3-style model that folds multi-entity assemblies (proteins, ligands, nucleic acids) from a single…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-cobrapy
AlterLab-IEU
Build and analyze genome-scale constraint-based metabolic models with COBRApy — flux balance analysis (FBA), flux variability analysis (FVA), gene and…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-deeptools
AlterLab-IEU
Process and visualize deep-sequencing coverage with the deepTools CLI — convert BAM to bigWig (bamCoverage), build log2 ratio tracks (bamCompare), run QC…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-blast
AlterLab-IEU
Runs NCBI BLAST+ 2.17.0 sequence searches from the command line: makeblastdb (with -parse_seqids), blastn/blastp/blastx/tblastn with tabular -outfmt 6/7 for…
SkillBFreshness: B★ 78Claude Code +9
Signals
- Stars
- 78
- Forks
- 16
- Open issues
- 1
- Last commit (this folder)
- Sep 23, 2026 (1 month ago)
- Last release
- Sep 23, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.1.0
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from AlterLab-IEU
- 0.545score
alterlab-anndata
AlterLab-IEU
Build, slice, concatenate, read, and write AnnData annotated data matrices (obs, var, X, layers, obsm, uns) — the scverse data STRUCTURE, not an analysis…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-biopython
AlterLab-IEU
Manipulate biological sequences, parse FASTA/GenBank/PDB files, run phylogenetics, and access NCBI/PubMed programmatically via Biopython (Bio.SeqIO…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-blast
AlterLab-IEU
Runs NCBI BLAST+ 2.17.0 sequence searches from the command line: makeblastdb (with -parse_seqids), blastn/blastp/blastx/tblastn with tabular -outfmt 6/7 for…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-alphafold
AlterLab-IEU
Predict protein 3D structures with AlphaFold2 via ColabFold — MMseqs2-accelerated MSAs, monomer and AlphaFold2-Multimer complex folding, and confidence-based…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-arboreto
AlterLab-IEU
Infer gene regulatory networks (GRNs) from expression matrices using arboreto's scalable GRNBoost2 and GENIE3 tree-ensemble algorithms with Dask-distributed…
SkillBFreshness: B★ 78Claude Code +9 - 0.545score
alterlab-bioservices
AlterLab-IEU
Query 40+ bioinformatics web services through one consistent Python API with bioservices (UniProt, KEGG, ChEMBL, Reactome, Ensembl, NCBI and more).
SkillBFreshness: B★ 78Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get alterlab-phylogenetics running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
alterlab-phylogenetics skill. Agent Mart. https://agentmart.dev/skills/alterlab-ieu-alterlab-phylogenetics (last updated 2026-10-24)