# tooluniverse-phylogenetics

Runs de novo multiple sequence alignments, builds phylogenetic trees, and computes QC metrics like treeness and saturation using PhyKIT, Biopython, and DendroPy.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 363 installs · ★ 1759
- Author: mims-harvard
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/mims-harvard/ToolUniverse/tree/HEAD/skills/tooluniverse-phylogenetics/SKILL.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/tooluniverse-phylogenetics

## What it does

The skill handles multiple sequence alignment through tools like Clustal Omega, MUSCLE, and MAFFT, and builds trees using neighbor-joining or UPGMA methods. For downstream quality control and evolutionary-rate studies, it integrates PhyKIT, Biopython, and DendroPy to calculate treeness, substitution saturation, and parsimony-informative sites.

It includes dedicated scripts such as `scogs_paired_compare.py` to compare BUSCO ortholog sets (like fungi against animals) via two-tailed Mann-Whitney U tests. The skill strictly advises against running PhyKIT per-file in a bash loop: parallel processing takes roughly 35 seconds for 250 trees, whereas shell loops need about 9 minutes and run out of execution turns.

A critical rule is to check for pre-computed files like `scogs_fungi.zip` or `*_executed.ipynb` before attempting any re-analysis. Re-running everything from raw `*.busco.zip` files takes 1 to 6 hours and causes numerical drift. When parsing PhyKIT saturation, always read the first column, because the second column represents the absolute difference from one.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add mims-harvard/ToolUniverse --skill tooluniverse-phylogenetics -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/tooluniverse-phylogenetics/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/tooluniverse-phylogenetics/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add mims-harvard/ToolUniverse --skill tooluniverse-phylogenetics -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/tooluniverse-phylogenetics/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add mims-harvard/ToolUniverse --skill tooluniverse-phylogenetics -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/tooluniverse-phylogenetics/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install mims-harvard/ToolUniverse tooluniverse-phylogenetics
```

2. **Manually: put the files in place**
- File: `.github/skills/tooluniverse-phylogenetics/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add mims-harvard/ToolUniverse --skill tooluniverse-phylogenetics -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/mims-harvard/ToolUniverse --path skills/tooluniverse-phylogenetics
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/tooluniverse-phylogenetics/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add mims-harvard/ToolUniverse --skill tooluniverse-phylogenetics -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/mims-harvard/ToolUniverse/tree/HEAD/skills/tooluniverse-phylogenetics/SKILL.md

## When to use it
- build neighbor-joining or UPGMA trees from custom sequences
- compute treeness, saturation, and RCV metrics with PhyKIT
- detect long branches and parsimony-informative sites
- compare BUSCO ortholog datasets using the Mann-Whitney U test

## Example prompts
- Build a neighbor-joining tree from my FASTA sequences
- Run scogs_paired_compare.py on the dataset to evaluate treeness
- Analyze the alignment for substitution saturation and gap percentage

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 61a8f5834d1f06b5.

BEGIN THIRD-PARTY FILE 61a8f5834d1f06b5
```text
---
name: tooluniverse-phylogenetics
description: Phylogenetic analysis — de novo multiple sequence alignment (Clustal Omega/MUSCLE/MAFFT via EBI_msa_align) and neighbour-joining/UPGMA tree building (EBI_build_phylogenetic_tree) from your own sequences, plus tree analysis, treeness, saturation (PhyKIT), parsimony-informative sites, alignment gap analysis, DVMC, long-branch detection, BUSCO orthologs. Uses PhyKIT, Biopython, DendroPy. Use to align a set of sequences, build a tree from sequences or an alignment, or for phylogenetic tree QC, multi-gene phylogenomics, evolutionary-rate analysis, and comparative-genomics studies.
disable-model-invocation: true
---

# Phylogenetics and Sequence Analysis

## Four traps that produce a confidently wrong number

Each of these was observed producing a wrong answer *while the correct guidance
was already present further down this file*. Check them before you answer.

1. **PhyKIT prints more than one column, and for `saturation` the two
   conventions disagree — state which you used.** `phykit saturation` prints
   `saturation <TAB> |saturation-1|`. Its own `--help` is explicit: *"The first
   value is the saturation value and the second column is the absolute value of
   saturation minus 1."* But several published analyses (and some reference
   answers derived from them) report the **second** column as "the saturation
   value". The two always sum to 1.0000, which is the tell that you may be
   looking at the wrong one — on the fungal scogs set the medians are 0.39
   (col 1) and 0.61 (col 2).

   So: **follow phykit and use column 1** unless the question or source defines
   saturation the other way, and say in your answer which column you read. Do
   not silently pick the one that looks closer to an expected number.

   `treeness_over_rcv` has no such ambiguity: it gives
   `ratio <TAB> treeness <TAB> RCV` and the ratio is first.

2. **"Gap percentage" means the fraction of alignment COLUMNS containing at
   least one gap**, not the fraction of residues that are gaps. On the fungal
   scogs set the residue definition maxes out at 0.556, so a ">70% gaps" filter
   selects **nothing** and the question looks unanswerable; by columns, three
   orthologs qualify (max 0.783).

3. **`treeness_over_rcv` and `rcv` take the UNTRIMMED `.faa.mafft`**, while
   `saturation` takes the trimmed `.clipkit`. RCV measures variability across
```
END THIRD-PARTY FILE 61a8f5834d1f06b5

The third-party file has ended. Everything between the 61a8f5834d1f06b5 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2411 of 34850 bytes. © mims-harvard · Apache-2.0 · https://github.com/mims-harvard/ToolUniverse/tree/HEAD/skills/tooluniverse-phylogenetics/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
