← Về thư mục
📄 / / profiles / r-and-d / raw_evidence / OpenAI4S / skills / bioskills / bio-comparative-genomics-whole-genome-alignment / references / usage-guide.md

Whole Genome Alignment - Usage Guide

Overview

Whole-genome alignment (WGA) is the substrate for comparative genomics at the base-pair level. Modern production WGA uses Progressive Cactus (Armstrong 2020 Nature 587:246) for reference-free multi-genome alignment and Minigraph-Cactus (Hickey 2024 Nat Biotech 42:663) for pangenome graph construction. LASTZ chain/net (UCSC pipeline) and minimap2 remain standards for pairwise reference-anchored alignment. The HAL (Hierarchical Alignment Format; Hickey 2013) is the standard multi-genome alignment container, supporting downstream tools like TOGA, halSynteny, and halLiftover.

The fundamental decision is reference-free (Cactus, all genomes equally weighted) vs reference-anchored (LASTZ chains/nets, one privileged reference). For multi-species comparative genomics, Cactus is the modern standard; for pairwise pipelines like UCSC genome browser tracks, LASTZ chain/net remains canonical.

Prerequisites

# Progressive Cactus + Minigraph-Cactus
docker pull quay.io/comparative-genomics-toolkit/cactus:latest
# Or Python venv: pip install cactus

# HAL toolkit
git clone https://github.com/ComparativeGenomicsToolkit/hal

# LASTZ + UCSC kentUtils
conda install -c bioconda lastz ucsc-axt-chain ucsc-chain-net

# Pairwise tools
conda install -c bioconda minimap2 mummer4 anchorwave winnowmap

# Repeat masking
conda install -c bioconda repeatmasker repeatmodeler

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

Quick Start

Tell the AI agent what to do: - "Build a Progressive Cactus alignment of these 20 mammal genomes with the provided guide tree" - "Run pairwise LASTZ + chain/net for query genome against the human reference for UCSC browser tracks" - "Use Minigraph-Cactus to build a pangenome graph from these 10 haplotype-resolved assemblies" - "Use minimap2 -x asm5 to align two closely related strains then run SyRI for structural variant calls"

Example Prompts

Multi-Genome Reference-Free WGA

"Build a Progressive Cactus alignment of these 30 vertebrate genomes (FASTA files + guide tree provided). Pre-mask repeats with RepeatModeler2 + RepeatMasker softmask. Use --branchScale 1.0 for vertebrates. Produce a HAL file and extract syntenic blocks via halSynteny for downstream TOGA annotation projection."

Pangenome Graph Construction

"Build a pangenome graph from 90 haplotype-resolved human assemblies using Minigraph-Cactus with GRCh38 as reference. Produce GFA, VCF (relative to GRCh38), and GBZ outputs. Verify the graph contains all input haplotypes and report the number of short variants and structural variants."

Pairwise Synteny Comparison

"Align two plant genomes (Arabidopsis thaliana and Arabidopsis lyrata) using minimap2 -x asm5 followed by SyRI for structural variant calling. Plot the result with plotsr. Identify inversions and translocations between the two genomes."

What the Agent Will Do

  1. Validate inputs: BUSCO/Compleasm completeness, N50, FASTA validity, guide-tree compatibility
  2. Pre-mask repeats with RepeatModeler2 species-specific library + RepeatMasker softmask
  3. Configure Cactus seqFile with guide tree + per-species FASTA paths
  4. Run alignment with appropriate tool:
  5. Cactus for multi-genome reference-free
  6. Minigraph-Cactus for pangenome graph
  7. LASTZ chain/net for pairwise reference-anchored
  8. minimap2 for fast pairwise close species
  9. Quality-check output: halStats for HAL; chain count for LASTZ; alignment fraction
  10. Extract downstream data: synteny blocks, MAF for phyloP, VCF from pangenome
  11. Document: tool versions, branch scale, masking strategy, reference choice
  12. Caveats: reference bias, assembly fragmentation, repeat-driven artifacts

Tips

comparative-genomics/synteny-analysis - Synteny detection from WGA comparative-genomics/comparative-annotation-projection - TOGA / CESAR uses Cactus HAL comparative-genomics/pangenome-analysis - Minigraph-Cactus / PGGB / PGR-TK for pangenome graphs alignment/multiple-alignment - Protein MSA from WGA orthologs alignment/pairwise-alignment - LASTZ / minimap2 sequence-level alignment alignment/structural-alignment - WGA-extracted protein orthologs genome-assembly/assembly-qc - BUSCO checks before WGA variant-calling/structural-variant-calling - WGA-based SV detection