Agent skill

Bio Comparative Genomics Whole Genome Alignment

by GPTomics in GPTomics/bioSkills

Build whole-genome alignments using Progressive Cactus (Armstrong 2020 reference-free clade-level WGA), Minigraph-Cactus (Hickey 2024 pangenome-aware), LASTZ chain/net (UCSC pipeline), MUMmer4…

MITAuto-check passedResearch & Science

Install Bio Comparative Genomics Whole Genome Alignment

skills CLI
$ npx skills add GPTomics/bioSkills --skill bio-comparative-genomics-whole-genome-alignment -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install GPTomics/bioSkills bio-comparative-genomics-whole-genome-alignment --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/GPTomics/bioSkills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/comparative-genomics/whole-genome-alignment .claude/skills/bio-comparative-genomics-whole-genome-alignment && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
bio-comparative-genomics-whole-genome-alignment
GitHub stars
1.2k
Used in
2 other repos
Token cost
~7.6k tokens
SKILL.md length
3,081 words
Files
3
Skills in repo
559
Repo updated
First seen
Licence
MIT

At a glance

Build whole-genome alignments using Progressive Cactus (Armstrong 2020 reference-free clade-level WGA), Minigraph-Cactus (Hickey 2024 pangenome-aware), LASTZ chain/net (UCSC pipeline), MUMmer4…

  • Constructing multi-species alignments for comparative-annotation projection (TOGA)
  • SKILL.md covers Version Compatibility, Algorithmic Taxonomy, Decision Tree by Experimental… and Per-Tool Failure Modes, plus 11 more sections
  • Runs Shell scripts from its folder; calls conda, pip and docker; reaches github.com
  • Synteny detection

What it does

Bio Comparative Genomics Whole Genome Alignment is an agent skill from GPTomics/bioSkills. Build whole-genome alignments using Progressive Cactus (Armstrong 2020 reference-free clade-level WGA), Minigraph-Cactus (Hickey 2024 pangenome-aware), LASTZ chain/net (UCSC pipeline), MUMmer4 (Marçais 2018 pairwise), minimap2 -x asm5/10/20 (Li 2018 fast pairwise), AnchorWave (Song 2022 WGD-aware), and Mauve / progressiveMauve (bacterial). Operates the HAL toolkit (Hickey 2013) for downstream extraction including halSynteny, halLiftover, halBranchMutations, and hal2maf. Use when constructing multi-species…

Its SKILL.md is about 7.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `examples/progressive_cactus_wga.sh` and `usage-guide.md`).

It sits in Research & Science, covering Bioinformatics. The repository describes itself as: a set of SKILLS.md for doing bioinformatics with agents like claude code. The licence is MIT.

When your agent uses it

  • Constructing multi-species alignments for comparative-annotation projection (TOGA)
  • Synteny detection
  • Conservation analyses (phyloP / PhastCons)
  • Pangenome graph construction

Example prompts

  • “/bio-comparative-genomics-whole-genome-alignment”

Requirements

  • A Bash shell

What it can do on your machine

Read from SKILL.md and the folder at commit d91ed3d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • conda
    • pip
    • docker
    • python3
    • git
    • make
    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Bio Comparative Genomics Whole Genome Alignment loads about 7.6k tokens when it runs. Until then it costs about 232 tokens; SKILL.md has 3,081 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~232
When it runs · the whole SKILL.md, loaded when a task matches
~7.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from GPTomics/bioSkills at commit d91ed3d, republished under its MIT licence (© GPTomics). 3,081 words, ~7,572 tokens.

Download SKILL.mdSave it as .claude/skills/bio-comparative-genomics-whole-genome-alignment/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
bio-comparative-genomics-whole-genome-alignment
description
Build whole-genome alignments using Progressive Cactus (Armstrong 2020 reference-free clade-level WGA), Minigraph-Cactus (Hickey 2024 pangenome-aware), LASTZ chain/net (UCSC pipeline), MUMmer4 (Marçais 2018 pairwise), minimap2 -x asm5/10/20 (Li 2018 fast pairwise), AnchorWave (Song 2022 WGD-aware), and Mauve / progressiveMauve (bacterial). Operates the HAL toolkit (Hickey 2013) for downstream extraction including halSynteny, halLiftover, halBranchMutations, and hal2maf. Use when constructing multi-species alignments for comparative-annotation projection (TOGA), synteny detection, conservation analyses (phyloP / PhastCons), or pangenome graph construction; selecting between reference-free (Cactus) and reference-anchored (LASTZ chains/nets) approaches; tuning sensitivity for closely vs distantly related genomes; or producing HAL files for genome-wide downstream tools.
tool_type
cli
primary_tool
Cactus

Version Compatibility

Reference examples tested with: Progressive Cactus 2.9.1+ (ComparativeGenomicsToolkit/cactus; Armstrong 2020 Nature 587:246), Minigraph-Cactus (Hickey 2024 Nat Biotech 42:663; bundled with Cactus 2.5+), HAL toolkit 2.3+ (Hickey 2013 Bioinformatics 29:1341), LASTZ 1.04.22+, UCSC kentUtils for chain/net (Kent 2003 PNAS 100:11484), MUMmer 4.0.0+, minimap2 2.28+, AnchorWave 1.2.5+, progressiveMauve 2.4.0+, sibeliaz 1.2.5+, winnowmap 2.03+ (Jain 2022 Nat Methods 19:705). Toil workflow runner 6.0+ for Cactus on HPC/cloud.

Before using code patterns, verify installed versions match. If versions differ:

  • CLI: cactus --help, cactus-pangenome --help, halStats --help, lastz --version, nucmer --version, minimap2 --version
  • Python: pip show toil, toil --version

If code throws Toil workflow restart failure, HAL file corrupted, WDL workflow missing, the Cactus pipeline is Toil-based and requires careful checkpointing; failed runs must be restarted with --restart. HAL file versions differ across hal-toolkit releases; pin the version that produced the file.

Whole Genome Alignment

"Align these multiple genomes at the base-pair level" -> Choose between reference-free progressive alignment (Cactus / Minigraph-Cactus: produces HAL, no privileged reference) and reference-anchored pairwise alignment (LASTZ chains/nets, MUMmer, minimap2: one genome is the reference, queries align to it). The fundamental tradeoff is scale vs structure: pairwise pipelines scale linearly per pair but lose multi-way relationships; progressive Cactus scales linearly with a tree but quadratically without and produces ancestrally-coherent alignments. For comparative genomics at vertebrate / mammal scale, Cactus is now the standard substrate (Zoonomia, Christmas 2023 Science 380:eabn3943; Bird10000 Genomes); for pangenome graph construction, Minigraph-Cactus (Hickey 2024) is the production pipeline.

  • CLI: cactus jobStore seqFile.txt output.hal --binariesMode local -- reference-free progressive WGA
  • CLI: cactus-pangenome --reference ref name --vcf -- pangenome graph from genomes
  • CLI: lastz target.fa[multiple] query.fa then UCSC chain-net pipeline -- pairwise to a reference
  • CLI: minimap2 -ax asm5 ref.fa query.fa | samtools sort -- fast pairwise for closely related
  • CLI: nucmer --maxmatch ref.fa query.fa then dnadiff -- MUMmer4 pairwise
  • CLI: anchorwave proali --ploidy 4 -- WGD-aware sequence-level synteny alignment

Algorithmic Taxonomy

ToolApproachOutputStrengthFails when
Progressive Cactus (Armstrong 2020 Nature 587:246)LASTZ pairwise -> CAF graph -> BAR -> ancestral assembly per nodeHAL multi-genome alignmentReference-free; scales to 1000s of genomes with phylogenetic tree; ancestral assembly at every internal nodeQuadratic without tree; ALSO scaling problems if branch_scale and chaining parameters mis-tuned (Armstrong 2020 Supp Methods)
Minigraph-Cactus (Hickey 2024 Nat Biotech 42:663)minigraph SV graph base + Cactus base-level resolutionPangenome graph (VCF, GFA, BAM)Combines structural variation (minigraph) with base-level alignment (Cactus); HPRC standardRequires reference; designed for intra-species pangenomes (90 human haplotypes)
LASTZ + UCSC chain/net (Kent 2003 PNAS 100:11484)LASTZ local alignments -> chains (collinear) -> nets (one-to-one selection)Reference-anchored alignment (chain, net, MAF)Standard for UCSC genome browser tracks; well-validated; pairwise interpretableReference-bias; quadratic scaling for N genomes; per-pair manual chain/net pipeline
MUMmer4 nucmer (Marçais 2018 PLoS Comp Biol 14:e1005944)Maximal exact matches -> clustering -> alignment extensionPairwise alignment (delta format)Fast for closely related (>= 70% identity); robustSlow at low identity; pairwise only
minimap2 (Li 2018 Bioinformatics 34:3094)Minimizer-based seeding + base-level alignmentSAM / PAF pairwiseVery fast; preset -x asm5/10/20 for divergenceLower accuracy at < 70% identity vs LASTZ
AnchorWave (Song 2022 PNAS 119:e2113075119)CDS/exon anchors -> wavefront alignmentSequence-level synteny + SVWGD-aware (ploidy parameter); plant-friendlyCDS-anchored; intergenic resolution limited
Progressive Mauve (Darling 2010 PLoS One 5:e11147)Local collinear blocks (LCBs) -> progressive alignmentMulti-genome bacterial alignmentBacterial-friendly; handles inversions nativelySlow for > 30 genomes; less common today
SibeliaZ (Minkin & Medvedev 2020 Nat Commun 11:6327)de Bruijn graph + colinear blocksBacterial / closely related multi-genome alignmentScales to 100+ genomesHighly diverged genomes lose recall
HAL toolkit (Hickey 2013 Bioinformatics 29:1341)Hierarchical Alignment FormatIndex, slice, project, extract from HALStandard substrate for downstream Cactus tools (TOGA, halSynteny, halLiftover)HAL file version pinning required
Winnowmap2 (Jain 2022 Nat Methods 19:705)minimap2-derived with masked repetitive minimizersSAM / PAFOptimized for highly repetitive regions (centromeres, telomeres)Niche; for repeat-rich pairwise alignment
BLASTZ (legacy)LASTZ predecessorLocal alignmentsHistorical; superseded by LASTZUse LASTZ instead
Multiz (Blanchette 2004 Genome Res 14:708)Reference-anchored chain-mergingMulti-species MAFUCSC's older multi-species pipelineSuperseded by Cactus
Lagan / mLagan (Brudno 2003)Local-global hybrid alignmentPairwise / multi-speciesHistorical; not actively developedUse Cactus or LASTZ chain/net

Methodology evolves; Cactus / Minigraph-Cactus / HAL are now the dominant production pipelines for vertebrate / mammal / plant WGA. LASTZ chains/nets remain the standard for adding a single new species to a reference-anchored ecosystem (UCSC, Ensembl).

Decision Tree by Experimental Scenario

ScenarioRecommended approachWhy
Vertebrate clade WGA, 10-500 genomesProgressive CactusReference-free; phylogenetic-tree guided; HAL output
Mammalian Zoonomia-scale WGA, 500-2000 genomesProgressive Cactus with --branchScale tuning + HPCCactus scales to 1000s with proper Toil config
Plant clade WGA, with WGDAnchorWave proali OR CactusAnchorWave WGD-aware; Cactus more general
Bacterial / archaeal genome alignmentprogressiveMauve OR SibeliaZDesigned for compact, rearrangement-rich genomes
Single new species added to reference (e.g. UCSC, Ensembl track)LASTZ + chain/netStandard reference-anchored pipeline; interpretable
Closely related strains / haplotypes (~95% identity)minimap2 -x asm5 or MUMmer nucmerFast pairwise; sufficient accuracy
Cross-species ~70-90% identityLASTZ with --strategy tunedminimap2 loses accuracy below ~70%
Cross-species ~50% identity (e.g. human vs zebrafish)LASTZ with HoxD55 matrixSpecialized parameters for distant genomes
Pangenome graph for variant callingMinigraph-Cactus or PGGBSee [[pangenome-analysis]] for graph-based variant calling
Repeat-rich genome (large mammal, plant)Cactus with masked inputPre-mask repeats with RepeatMasker/RepeatModeler2
Centromeric / telomeric alignmentWinnowmap2Optimized for repetitive minimizers
Comparative annotation projectionCactus -> TOGA + CESAR (see [[comparative-annotation-projection]])Cactus HAL is TOGA input
Conservation analysis (phyloP, PhastCons)Cactus -> hal2maf to MAF for phyloPMAF format from HAL is the substrate
Pairwise alignment for syntenyminimap2 -x asm5 -> SyRISee [[synteny-analysis]]
Long-read assembly pairwise validationnucmer + dnadiffStandard for assembly QC
Reference-to-pangenome lift-overhalLiftover or vg pathsHAL coordinate-system tools

Per-Tool Failure Modes

Cactus running quadratically without species tree

Trigger: Running cactus without --guide-tree or with a poorly-resolved guide tree.

Mechanism: Cactus is designed as a progressive aligner: it aligns siblings, then their ancestor, recursively up the species tree. Without a guide tree, it tries all-vs-all alignment, which is O(N^2) and explodes for > 10 genomes.

Symptom: Cactus job time scales as N^2; cluster runs hit wall time before completing.

Fix: Always provide a guide tree in seqFile.txt:

(((human:0.05, chimp:0.05):0.05, macaque:0.1):0.2, mouse:0.5);
human    /path/to/human.fa
chimp    /path/to/chimp.fa
macaque  /path/to/macaque.fa
mouse    /path/to/mouse.fa

Branch lengths in substitutions per site; need not be precise but must reflect relative divergence. For poorly-resolved trees, use STAR (concatenation) tree from a few hundred concatenated single-copy orthologs (cf. [[ortholog-inference]]).

Branch-scale parameter mis-tuned

Trigger: Cactus alignment producing very few or very many alignment columns relative to expected.

Mechanism: Cactus uses --branchScale to scale internal-branch lengths for LASTZ chaining parameters. Default scaling assumes vertebrate-like substitution rates; plants, bacteria, and viruses need adjustment. Wrong scaling produces under-aligned (too low) or over-merged (too high) blocks.

Symptom: HAL file shows alignment column count vastly different from expected; halStats reports unusual coverage; comparative annotation downstream fails.

Fix: Adjust --branchScale per clade: vertebrates default 1.0; plants 0.5-0.7; bacteria 0.3-0.5; viruses 0.1-0.3. Validate against known orthologs (BUSCO single-copies should align across all genomes).

Toil checkpoint restart failures

Trigger: Cactus job interrupted (cluster timeout, OOM, node failure) and restart.

Mechanism: Cactus uses Toil's job store for checkpointing. Restart requires identical jobStore path, identical config, and pointing to the same machine type (some cloud-stored jobs require AWS / Google Cloud credentials).

Symptom: Cactus restart errors with "job store inconsistent" or "missing intermediate file."

Fix: Use cactus --restart jobStore seqFile.txt output.hal. For HPC, ensure the jobStore path is on shared storage accessible to all nodes. For cloud, use S3 or Google Cloud Storage with proper credentials. If restart fails, restart from scratch with a new jobStore.

Reference bias in LASTZ chain/net

Trigger: Reporting "human-chimp synteny" from LASTZ chains/nets with human as reference.

Mechanism: Chain/net is reference-anchored; the alignment is biased toward the reference's genomic context. Repeat-content differences and assembly-quality differences between reference and query produce alignment artifacts.

Symptom: Different chains/nets from different reference choices show inconsistent SV calls; e.g. mouse-as-reference and human-as-reference produce different INV counts.

Fix: For multi-genome questions, use Cactus (reference-free). For pairwise questions, run chain/net both directions (A-on-B and B-on-A) and report consistent calls. Document reference choice in methods. SyRI on minimap2 alignments has similar issues; cross-validate.

minimap2 sensitivity loss at < 70% identity

Trigger: Running minimap2 -x asm10 or -x asm20 between distantly related species.

Mechanism: Minimap2's minimizer-based seeding loses sensitivity at lower identity; many regions never anchor and produce gaps in alignment.

Symptom: Alignment coverage low (< 50% of query mapped); SyRI / SV-calling on this alignment reports few or no SVs; high-identity regions align but mid-identity regions don't.

Fix: Switch to LASTZ for < 70% identity; LASTZ uses 6-bp seeds with scoring matrices designed for distant comparison (HoxD55 for human-fish). For minimap2, try -x asm20 with manual sensitivity tuning (-k 19 -w 19) but expect inferior performance vs LASTZ. minimap2 documentation recommends presets up to 20% divergence.

Cactus producing wrong topology in ancestor assembly

Trigger: Cactus is asked to assemble an ancestral sequence at an internal node, but the input tree has wrong topology.

Mechanism: Cactus uses the guide tree to determine which descendants align to which ancestor. Wrong topology produces incorrect ancestor sequence at internal nodes.

Symptom: Ancestor sequences inconsistent with biological expectation; downstream phylogenetic analyses on Cactus ancestor sequences disagree with concatenation phylogenies.

Fix: Validate species tree before Cactus alignment using phylogenetics/modern-tree-inference on concatenated single-copy orthologs. If topology is uncertain, use a more conservative resolution (e.g. polytomy resolved via STRIDE).

Repeats inflating LASTZ chain count

Trigger: Running LASTZ on unmasked or weakly masked genomes.

Mechanism: Unmasked TEs produce millions of paralogous LASTZ alignments; chains form from these, creating false-positive synteny / alignment.

Symptom: Chain count >> 100,000 per pair; many short chains in TE-rich regions; chain/net pipeline produces excessive chains where biology predicts few.

Fix: Softmask both genomes (RepeatModeler2 + RepeatMasker) before LASTZ. LASTZ honors softmasked sequences in its seeding step (lowercase = ignored at seeding, full alignment after extension). Hardmasking (N's) is too aggressive and breaks LASTZ scoring.

HAL version mismatch breaking downstream tools

Trigger: Using HAL files generated with one version of Cactus / HAL toolkit with downstream tools using a different version.

Mechanism: HAL file format is versioned; minor version mismatch usually OK, major version mismatch causes silent or loud failures.

Symptom: halStats / TOGA / halLiftover errors about "unrecognized HAL version."

Fix: Use the HAL toolkit version that wrote the file (check via halStats --filter halVersion or git log of the run). For shared HAL files, pin Cactus version in documentation.

Insufficient masking before Cactus

Trigger: Cactus on unmasked vertebrate genomes.

Mechanism: Cactus's CAF/BAR algorithms identify candidate alignment columns; without masking, TE-derived blocks dominate. Memory consumption explodes and alignment results are mostly TE pseudo-alignments.

Symptom: Cactus runs out of memory; HAL file is huge (> 100 GB for what should be 10 GB); halStats shows enormous column count.

Fix: Mask all genomes with RepeatMasker (or species-specific RepeatModeler2 library) before Cactus. Soft-masking is acceptable; Cactus handles lowercase appropriately. Document masking strategy.

AnchorWave WGD parameter mis-set

Trigger: AnchorWave proali with wrong --ploidy value for the query genome.

Mechanism: AnchorWave's WGD-aware alignment matches each query CDS to ploidy-many reference CDS regions; wrong ploidy causes either undermatching (low ploidy) or overmatching (high ploidy).

Symptom: Reported alignment count inconsistent with biology (e.g. hexaploid wheat reports diploid-level matches).

Fix: Set --ploidy to query genome's ploidy (1 for haploid reference, 2 for diploid query when reference is diploid, 4 for tetraploid query vs diploid reference). Check with python -m jcvi.compara.synteny depth on output anchors.

Show full SKILL.md (1,225 more words)Show less

Quantitative Thresholds

QuantityThresholdSource / Rationale
Cactus runtime scalingLinear with tree-balanced clade; quadratic without treeArmstrong 2020 Supp Methods
Cactus memory per genome (vertebrate, masked)8-32 GBArmstrong 2020
Cactus minimum genome assembly N50>= 1 Mb for reliable WGA; chromosome-level preferredStandard convention
Branch scale for vertebrates1.0 defaultCactus docs
Branch scale for plants0.5-0.7Tuning convention
Branch scale for bacteria0.3-0.5Tuning convention
LASTZ identity range60-99% practical; 50% with HoxD55 matrixLASTZ docs
minimap2 -x asm5<= 5% divergenceminimap2 docs
minimap2 -x asm10<= 10% divergenceminimap2 docs
minimap2 -x asm20<= 20% divergenceminimap2 docs
MUMmer nucmer recommended identity>= 70%Marçais 2018
Soft-masking required for WGA>= 90% of TE families maskedStandard QC
HAL file size, vertebrate 100-genome~100-500 GB per HALApproximate; varies with masking
Cactus per-job CPU requirement4-16 cores per leafCactus docs
Minigraph-Cactus haplotype counttested at 90 human haplotypesHickey 2024
LASTZ chain-net minimum chain length5000 bp default; tunableUCSC convention
Toil retry limit--retryCount 3 typicalToil docs
Cactus dustmasking sensitivitydefault sensitive; adjust per cladeCactus configs
AnchorWave anchor minimum identity80% default; lower for distant speciesAnchorWave docs
progressiveMauve maximum genomes (practical)20-30Darling 2010
SibeliaZ minimum block size50 bp default; tunableMinkin 2020
HAL toolkit halLiftover precisionbase-level for collinear; gap-aware for SVHickey 2013

Progressive Cactus Standard Workflow

Goal: Build a multi-species reference-free WGA from N genomes.

Approach: Provide guide tree + per-species genome FASTA in seqFile.txt -> run cactus with Toil job store -> produce HAL -> extract MAF / synteny / annotation as needed.

bash
# 1. Pre-mask genomes (softmask)
for fa in genomes/*.fa; do
    species=$(basename $fa .fa)
    BuildDatabase -name ${species}_DB $fa
    RepeatModeler -database ${species}_DB -threads 16
    RepeatMasker -lib ${species}_DB-families.fa -xsmall -pa 16 $fa
done

# 2. Prepare seqFile (tree + paths)
cat > seqFile.txt << 'EOF'
(((human:0.05, chimp:0.05):0.05, macaque:0.1):0.2, mouse:0.5);
human    genomes/human.fa.masked
chimp    genomes/chimp.fa.masked
macaque  genomes/macaque.fa.masked
mouse    genomes/mouse.fa.masked
EOF

# 3. Run Cactus
cactus jobStore_path seqFile.txt output.hal \
    --binariesMode local \
    --workDir /tmp/cactus_work \
    --maxCores 64 \
    --logFile cactus.log

# 4. Inspect HAL
halStats output.hal
# Reports: genome count, chromosome / contig count per genome, alignment column count

# 5. Extract MAF for downstream phyloP / conservation
hal2maf output.hal reference_genome ucsc.maf --refGenome human --chunkSize 1000000

For HPC deployment, use Toil's --batchSystem slurm or --batchSystem kubernetes for cluster-scale runs.

LASTZ + UCSC Chain/Net Standard Pipeline

Goal: Pairwise WGA of a query genome to a reference, producing UCSC-format chain and net files.

Approach: LASTZ pairwise -> axtChain -> chainNet -> netSyntenic.

bash
# 1. LASTZ pairwise alignment per chromosome
for chr in $(cut -f1 reference.fa.fai); do
    lastz reference.fa[multiple,unmask] query.fa[multiple,unmask] \
        --hspthresh=3000 --ydrop=9400 --gappedthresh=3000 \
        --ambiguous=iupac --inner=2000 --score=$LASTZ_PARAMS \
        --format=axt \
        > pairwise/${chr}.axt
done

# 2. Build chains. `axtChain` reads PSL when given `-psl`; for AXT input from lastz
# (`--format=axt`) drop the `-psl` flag, or emit PSL from LASTZ with `--format=psl` upstream.
for axt in pairwise/*.axt; do
    chr=$(basename $axt .axt)
    axtChain -linearGap=loose $axt reference.2bit query.2bit chains/${chr}.chain
done

# 3. Merge chains
chainMergeSort chains/*.chain > merged.chain
chainPreNet merged.chain reference.size query.size pre.chain

# 4. Build net (one-to-one selection)
chainNet pre.chain reference.size query.size \
    target.net query.net
netSyntenic target.net target.syntenic.net

# 5. Filter and convert
netToAxt target.syntenic.net pre.chain reference.2bit query.2bit final.axt
axtToMaf final.axt reference.size query.size final.maf

Minigraph-Cactus for Pangenome Construction

Goal: Build a pangenome graph from related genomes (intra-species or sister-species).

Approach: Provide reference + alternative genomes -> minigraph for SV graph -> Cactus for base-level alignment.

bash
# Prepare seqFile (similar to Cactus but designates reference)
cat > pangenome_seqs.txt << 'EOF'
reference   human.fa
hap1        haplotype1.fa
hap2        haplotype2.fa
hap3        haplotype3.fa
EOF

# Run minigraph-cactus
cactus-pangenome jobStore_path pangenome_seqs.txt \
    --outDir output_pangenome \
    --outName pangenome \
    --reference reference \
    --vcf \
    --gfa \
    --gbz \
    --indexCores 32 \
    --mapCores 32

# Outputs:
#   pangenome.gbz       Genome Browser Z compressed graph
#   pangenome.gfa.gz    Graph Fragment Assembly format
#   pangenome.vcf.gz    VCF for short variants from graph
#   pangenome.full.hal  Full Cactus HAL for downstream tools

For HPRC-scale (90 haplotypes), use --mapCores 64 --indexCores 64 on a high-memory node. See [[pangenome-analysis]] for downstream graph analysis.

Reconciliation: When Methods Disagree

PatternLikely causeAction
Cactus alignment column count >> LASTZ pairwiseCactus includes ancestral alignment; pairwise is direct onlyCactus is expected to have more columns when integrating across siblings
minimap2 aligns 60%; LASTZ aligns 80%Sensitivity differs at low identityUse LASTZ for distant comparisons
LASTZ chain/net A-on-B differs from B-on-AReference biasUse Cactus reference-free for unbiased multi-genome questions
Cactus HAL vs Multiz MAF disagree at deep nodeCactus reference-free; Multiz reference-anchoredCactus is the modern standard; Multiz mostly superseded
AnchorWave finds collinearity in WGD region, LASTZ doesn'tAnchorWave WGD-aware; LASTZ unawareAnchorWave correct for WGD lineages
Minigraph-Cactus VCF and Cactus pairwise differPangenome graph integrates SV; pairwise reports relative to referenceMinigraph-Cactus is for variant-aware pangenome work
nucmer (MUMmer) and minimap2 disagree at 80% identitynucmer more sensitive at higher identity; minimap2 fasterEither is fine; cross-validate
Cactus runs but HAL file empty for some genomesGenome misnamed in seqFile or masking issueVerify seqFile genome names match FASTA headers; verify masking
progressiveMauve / SibeliaZ vs Cactus on bacteriaBacterial-specific aligners better-tuned for compact genomesprogressiveMauve / SibeliaZ preferred for bacterial work; Cactus is overkill

Operational rule for publication: Multi-species WGA for comparative genomics uses Progressive Cactus with documented guide tree, masking, and Toil configuration. Pairwise reference alignments use LASTZ chain/net for UCSC tracks or minimap2 for fast pangenomics. Document choice of alignment tool, reference (if applicable), parameter values, and any non-default settings.

Cohort Gotchas

  • Highly repetitive genomes (large mammals, plants): memory consumption explodes; ensure >= 256 GB RAM per node
  • Centromeric / telomeric regions: unalignable in most assemblies; Winnowmap2 for explicit telomere-to-telomere work; otherwise mask
  • Sex chromosomes: different content; Cactus aligns where possible; downstream analyses must respect sex-chromosome specifics
  • Recently diverged inbred strains (e.g. mouse strains): > 99% identity; minimap2 -x asm5 is fine; Cactus overkill
  • Pangenome with structural variants: Minigraph-Cactus preferred over straight Cactus
  • Multi-region polyploids: AnchorWave proali with ploidy specification; subgenome-aware

Anticipated Reviewer Pushback

PushbackStandard response
"Reference bias?"Cactus is reference-free; or for pairwise pipelines, both directions reported
"Guide tree?"Provided in seqFile; built from concatenated single-copy orthologs
"Masking?"RepeatModeler2 species-specific + RepeatMasker softmask before WGA
"Tool choice?"Cactus for multi-species (reference-free, scalable); LASTZ chain/net for single-pair (UCSC standard)
"Branch scale?"Set to 1.0 for vertebrates; 0.5 for plants; documented
"Assembly quality?"N50 reported; BUSCO completeness reported; chromosome-level preferred
"WGD?"AnchorWave proali with explicit ploidy; or Cactus with subgenome assignment
"Reproducibility?"Cactus version + Toil version + branch scale documented; jobStore path retained for restart
"HAL downstream?"TOGA for annotation projection; hal2maf for phyloP / PhastCons; halSynteny for SV

Common Errors

Error / symptomCauseSolution
Cactus fails with "guide tree mismatch"seqFile genome names don't match tree leavesVerify exact name match in seqFile lines vs newick
Cactus memory exhaustionUnmasked repeatsPre-mask with RepeatMasker softmask
Toil restart failsjobStore corruptionRestart from scratch with new jobStore
LASTZ produces 0 alignmentsSensitivity too strictLower --hspthresh; check seed-and-extend params
MAF from hal2maf hugeDefault chunkSize too smallIncrease --chunkSize 10000000 for large genome
minimap2 SAM file emptyWrong preset for divergenceTry -x asm20 or LASTZ for distant comparison
HAL file unreadable in another toolHAL version mismatchPin HAL toolkit version
Cactus produces many tiny alignment blocksBranch scale too lowIncrease --branchScale to 1.0
nucmer maxmatch slowMany MUMs (unmasked repeats)Use --mum (unique) or mask repeats
AnchorWave reports few anchorsCDS GFF parsing issueVerify GFF3 with gene and CDS features
TOGA fails with "no chain"Cactus HAL not converted to chainUse halSynteny + UCSC chain conversion
Cactus dead-locks on shared filesystemToil multi-node sync issueUse AWS S3 / GCS jobStore for cloud

Tool Installation Notes

bash
# Progressive Cactus (Docker / Singularity preferred for reproducibility)
docker pull quay.io/comparative-genomics-toolkit/cactus:latest
# Or via virtualenv
python3 -m venv cactus_env && source cactus_env/bin/activate && pip install cactus

# HAL toolkit (usually bundled with Cactus)
git clone https://github.com/ComparativeGenomicsToolkit/hal && cd hal && make

# LASTZ + UCSC kentUtils
conda install -c bioconda lastz ucsc-axt-chain ucsc-chain-merge-sort ucsc-chain-pre-net ucsc-chain-net ucsc-net-syntenic ucsc-net-to-axt

# MUMmer4
conda install -c bioconda mummer

# minimap2 + winnowmap2
conda install -c bioconda minimap2 winnowmap

# AnchorWave
conda install -c bioconda anchorwave

# progressiveMauve
conda install -c bioconda mauve

# SibeliaZ
conda install -c bioconda sibeliaz

# RepeatMasker / RepeatModeler2 (for masking)
conda install -c bioconda repeatmasker repeatmodeler

# Toil for HPC / cloud
pip install toil[all]

For Cactus on HPC, set up Toil with the appropriate batch system (--batchSystem slurm); for cloud, use Toil's S3/GCS support and a job store on shared cloud storage.

References

  • Armstrong J et al 2020 Nature 587:246 (Progressive Cactus)
  • Hickey G et al 2024 Nat Biotech 42:663 (Minigraph-Cactus)
  • Hickey G et al 2013 Bioinformatics 29:1341 (HAL toolkit)
  • Kent WJ et al 2003 PNAS 100:11484 (UCSC chain/net)
  • Schwartz S et al 2003 Genome Res 13:103 (LASTZ)
  • Marçais G et al 2018 PLoS Comp Biol 14:e1005944 (MUMmer4)
  • Li H 2018 Bioinformatics 34:3094 (minimap2)
  • Li H 2021 Bioinformatics 37:4572 (minimap2 long-read updates)
  • Song B et al 2022 PNAS 119:e2113075119 (AnchorWave)
  • Darling AE et al 2010 PLoS One 5:e11147 (progressiveMauve)
  • Minkin I & Medvedev P 2020 Nat Commun 11:6327 (SibeliaZ)
  • Jain C et al 2022 Nat Methods 19:705 (Winnowmap2)
  • Blanchette M et al 2004 Genome Res 14:708 (Multiz)
  • Brudno M et al 2003 GR 13:721 (LAGAN)
  • Liao W-W et al 2023 Nature 617:312 (HPRC draft pangenome)
  • Sirén J et al 2024 Nat Methods 21:2017 (vg personalized pangenome references). The vg-Giraffe pangenome mapper is Sirén J et al 2021 Science 374:abg8871.
  • Garrison E et al 2024 Nat Methods 21:2008 (PGGB)
  • Paten B et al 2011 Genome Res 21:1512 (Cactus algorithm)
  • ComparativeGenomicsToolkit Cactus + HAL toolkit documentation (https://github.com/ComparativeGenomicsToolkit)
  • comparative-genomics/synteny-analysis - Synteny detection from WGA (Cactus -> halSynteny)
  • comparative-genomics/comparative-annotation-projection - TOGA + CESAR uses Cactus HAL
  • comparative-genomics/pangenome-analysis - Minigraph-Cactus / PGGB for pangenome graph construction
  • comparative-genomics/whole-genome-duplication - Ks-dating uses WGA-derived gene pair alignments
  • alignment/multiple-alignment - MAFFT / MUSCLE for protein MSA from WGA-derived orthologs
  • alignment/pairwise-alignment - LASTZ / minimap2 / MUMmer for sequence-level comparison
  • alignment/structural-alignment - WGA-extracted protein orthologs for downstream alignment
  • genome-assembly/assembly-qc - BUSCO / Compleasm checks before WGA
  • variant-calling/structural-variant-calling - WGA-based SV detection from genome assemblies
  • causal-genomics/heritability-partitioning - LDSC partitioning using phyloP scores from Cactus HAL

© GPTomics, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in comparative-genomics/whole-genome-alignment of GPTomics/bioSkills.

  • SKILL.md
  • examples/progressive_cactus_wga.sh
  • usage-guide.md

Open the folder on GitHubat commit d91ed3d

Used in 2 other repositories

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in GPTomics/bioSkills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Bio Comparative Genomics Whole Genome Alignment next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Bio Comparative Genomics Whole Genome Alignment compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Bio Comparative Genomics Whole Genome Alignment this skillGPTomics/bioSkills1.2k2 repos~7.6kAutomated safety check: PassMIT
Alphagenome Single Variant Analysisgoogle-deepmind/science-skills3.2k2 repos~3kAutomated safety check: NotesApache-2.0
13C Metabolic Flux AnalysisK-Dense-AI/scientific-agent-skills48k1 repos~3.2kAutomated safety check: PassMIT
Clinvar Databasegoogle-deepmind/science-skills3.2k2 repos~3.9kAutomated safety check: NotesApache-2.0
Metabolic Study Planneraiming-lab/AutoResearchClaw15k—~1.9kAutomated safety check: PassMIT
Dbsnp Databasegoogle-deepmind/science-skills3.2k2 repos~3.4kAutomated safety check: NotesApache-2.0

Similar skills

  • Alphagenome Single Variant Analysis

    google-deepmind/science-skills

    Analyzes genetic variant effects on gene expression (RNA-seq), chromatin accessibility (DNASE), histone marks (ChIP), and transcription factors using the AlphaGenome API.

    3.2k GitHub starsUsed in 2 repos~3k tokens
    Research & ScienceAuto-check: notes
  • 13C Metabolic Flux Analysis

    K-Dense-AI/scientific-agent-skills

    Estimates reaction fluxes inside cells from steady-state carbon-13 labeling data with a bundled mfapy-based solver, and reports which fluxes the data pin down.

    48k GitHub starsUsed in 1 repo~3.2k tokens
    Research & ScienceAuto-check passed
  • Clinvar Database

    google-deepmind/science-skills

    A skill your agent uses when needing clinical significance, pathogenicity classifications (e.g., Pathogenic, Benign, VUS), clinical evidence rationales, or finding "hard positive" benchmark controls…

    3.2k GitHub starsUsed in 2 repos~3.9k tokens
    Research & ScienceAuto-check: notes
  • Metabolic Study Planner

    aiming-lab/AutoResearchClaw

    Turns a broad metabolic modelling topic into a concrete, paper-shaped plan with organism, model, perturbations, metrics and figures before any FBA code is written.

    15k GitHub stars~1.9k tokensUpdated 1 mo ago
    Research & ScienceAuto-check passed
  • Dbsnp Database

    google-deepmind/science-skills

    A skill your agent uses when you want to look up, map, and search for short genetic variants (SNPs, indels) in NCBI's dbSNP database.

    3.2k GitHub starsUsed in 2 repos~3.4k tokens
    Research & ScienceAuto-check: notes
  • MFA Pipeline Orchestrator

    aiming-lab/AutoResearchClaw

    Runs a metabolic flux analysis from model loading to phenotype prediction and figures by handing work to four sub-agents in sequence.

    15k GitHub stars~923 tokensUpdated 1 mo ago
    Research & ScienceAuto-check passed

More from GPTomics/bioSkills

All 559 skills in this repo
  • Bio Alignment Io

    GPTomics/bioSkills

    Read, write, and convert multiple sequence alignment files using Biopython Bio.AlignIO.

    1.2k GitHub starsUsed in 3 repos~4.9k tokens
    Auto-check passed
  • bioSkills Installer

    GPTomics/bioSkills

    Installs the bioSkills collection of 425 bioinformatics skills in one step, or only chosen categories, so sequencing, RNA-seq, single-cell and variant tasks get specialized help.

    1.2k GitHub starsUsed in 1 repo~789 tokens
    Auto-check passed
  • Bio Write Sequences

    GPTomics/bioSkills

    Write biological sequences to files (FASTA, FASTQ, GenBank, EMBL) using Biopython Bio.SeqIO.

    1.2k GitHub starsUsed in 3 repos~2.1k tokens
    Auto-check passed
  • Amplicon Primer Clipping

    GPTomics/bioSkills

    Soft- or hard-clips PCR primer footprints from aligned amplicon BAMs so primer bases stop masquerading as confirmed reference sequence.

    1.2k GitHub starsUsed in 2 repos~2.2k tokens
    Auto-check passed
  • Filters BAM alignments by FLAG bits, mapping quality and regions with samtools view or pysam, with recipes for common keep and drop cases.

    1.2k GitHub starsUsed in 2 repos~3.6k tokens
    Auto-check passed
  • Bio Alignment Indexing

    GPTomics/bioSkills

    Create and use BAI/CSI indices for BAM/CRAM files using samtools and pysam.

    1.2k GitHub starsUsed in 2 repos~2.4k tokens
    Auto-check passed

Questions about Bio Comparative Genomics Whole Genome Alignment

What does Bio Comparative Genomics Whole Genome Alignment do?

Build whole-genome alignments using Progressive Cactus (Armstrong 2020 reference-free clade-level WGA), Minigraph-Cactus (Hickey 2024 pangenome-aware), LASTZ chain/net (UCSC pipeline), MUMmer4…. Bio Comparative Genomics Whole Genome Alignment is an agent skill from GPTomics/bioSkills. Build whole-genome alignments using Progressive Cactus (Armstrong 2020 reference-free clade-level WGA), Minigraph-Cactus (Hickey 2024 pangenome-aware), LASTZ chain/net (UCSC pipeline), MUMmer4 (Marçais 2018 pairwise), minimap2 -x asm5/10/20 (Li 2018 fast pairwise), AnchorWave (Song 2022 WGD-aware), and Mauve / progressiveMauve (bacterial).

When should I use Bio Comparative Genomics Whole Genome Alignment?

Bio Comparative Genomics Whole Genome Alignment fits situations like: constructing multi-species alignments for comparative-annotation projection (TOGA); synteny detection; conservation analyses (phyloP / PhastCons); pangenome graph construction.

How do I install Bio Comparative Genomics Whole Genome Alignment in Claude Code?

Run `npx skills add GPTomics/bioSkills --skill bio-comparative-genomics-whole-genome-alignment -a claude-code`. Or copy the skill folder (comparative-genomics/whole-genome-alignment in GPTomics/bioSkills) into .claude/skills/bio-comparative-genomics-whole-genome-alignment in your project. Claude Code loads it when a task matches its description.

How do I install Bio Comparative Genomics Whole Genome Alignment in Codex?

Run `npx skills add GPTomics/bioSkills --skill bio-comparative-genomics-whole-genome-alignment -a codex`. Or copy the skill folder (comparative-genomics/whole-genome-alignment in GPTomics/bioSkills) into .agents/skills/bio-comparative-genomics-whole-genome-alignment in your project. Codex loads it when a task matches its description.

Can I use Bio Comparative Genomics Whole Genome Alignment in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add GPTomics/bioSkills --skill bio-comparative-genomics-whole-genome-alignment -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/bio-comparative-genomics-whole-genome-alignment, .gemini/skills/bio-comparative-genomics-whole-genome-alignment, .github/skills/bio-comparative-genomics-whole-genome-alignment and .opencode/skills/bio-comparative-genomics-whole-genome-alignment in your project.

What does Bio Comparative Genomics Whole Genome Alignment need to run?

Going by SKILL.md and its folder, Bio Comparative Genomics Whole Genome Alignment needs a shell for the scripts in its folder and the command-line tools its instructions call (conda, pip, docker, python3, git and make). Our summary lists: A Bash shell.

Does Bio Comparative Genomics Whole Genome Alignment access the network?

SKILL.md names 1 domain. In commands or code: github.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Bio Comparative Genomics Whole Genome Alignment safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Bio Comparative Genomics Whole Genome Alignment use?

Bio Comparative Genomics Whole Genome Alignment is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Bio Comparative Genomics Whole Genome Alignment use?

About 7.6k tokens (SKILL.md is roughly 30k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Bio Comparative Genomics Whole Genome Alignment?

Skills that share tags, products or a category with Bio Comparative Genomics Whole Genome Alignment: Alphagenome Single Variant Analysis (google-deepmind/science-skills, 3.2k stars), 13C Metabolic Flux Analysis (K-Dense-AI/scientific-agent-skills, 48k stars), Clinvar Database (google-deepmind/science-skills, 3.2k stars) and Metabolic Study Planner (aiming-lab/AutoResearchClaw, 15k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Bio Comparative Genomics Whole Genome Alignment?

GPTomics (a GitHub organization) maintains it in GPTomics/bioSkills, which has 1,218 GitHub stars. The repository holds 559 skills in this directory. The repository was last updated on August 15, 2026.

Source: GPTomics/bioSkills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.