Genome sequence alignment and assembly
Dynamic-programming alignment, seed-and-extend read mapping, and de Bruijn / overlap-graph assembly that turn sequencer output into reference-anchored variants and complete genomes.
On this page17 sections
Every variant call, clinical genome report, pangenome and reference genome rests on aligners and assemblers; their errors in repeats and structural variants propagate into medicine.
Methods that line up DNA reads against a reference or stitch them into a complete genome.
- 1Sequencer outputs reads
- 2Align to a reference
- 3Or find overlaps and assemble
- 4Resolve repeats with long reads
- 5Both parental copies phased
Alignment. To compare two sequences we fill a table: entry holds the best score for aligning the first letters of one with the first letters of the other, allowing matches, mismatches and gaps. This dynamic programme (Needleman-Wunsch for global, Smith-Waterman for local alignment) costs time proportional to . For whole genomes that is far too slow, so tools use seed and extend: find short exact matches using an index (an FM-index based on the Burrows-Wheeler transform, or sampled "minimizers" for long reads), then align only around those seeds. Under a widely believed conjecture (SETH), alignment cannot be made much faster than quadratic in the worst case.
Assembly. Short-read assemblers build a de Bruijn graph, whose nodes are short words of length and whose edges link words overlapping by letters; the genome corresponds to a path through the graph. Long-read assemblers (hifiasm, Verkko) build overlap graphs and use extra information to separate the two parental copies, called haplotypes.
Quality. Completeness is measured by gaps, by correct chromosome ends (telomeres) and by error rates such as QV (quality value; QV60 means one error per million letters).
Pangenomes. Replacing one reference with a graph that includes many people's sequences reduces bias against people unlike the reference.
Remaining difficulty. Repeats longer than the reads, such as the ribosomal DNA arrays and centromeres.
Where it bites. DARC lists the goal of routine, gapless, haplotype-resolved assembly of any person's genome.
Try it. Take two short strings, such as GATTACA and GCATGCU, and fill the alignment table by hand with match +1, mismatch -1 and gap -1; tracing back from the bottom-right corner shows how one optimal alignment is read off, and why long genomes need indexes rather than full tables.
Go deeper
The full technical text.
What it is
A sequencer returns millions of short (100-300 bp Illumina) or long (10-100 kb PacBio HiFi / Oxford Nanopore) reads. Alignment places reads on a known reference; assembly reconstructs a genome without one. Both are string problems with a biological twist: genomes are repetitive, diploid, and differ between individuals.
The core machinery
Pairwise alignment. Needleman-Wunsch (global, 1970) and Smith-Waterman (local, 1981) fill an dynamic-programming table with scores for matches, mismatches and gaps. Fine-grained complexity results (Backurs-Indyk 2015) show that edit distance cannot be computed in truly sub-quadratic time unless the Strong Exponential Time Hypothesis fails, so practical tools use heuristics, banding and bit-parallelism instead.
Read mapping. Seed-and-extend with an index: BLAST (1990), then Burrows-Wheeler / FM-index tools (BWA-MEM), and minimizer-based long-read mappers (minimap2) that sample k-mers to keep the index small. Variant calling then looks at pileups of aligned reads (GATK, DeepVariant).
Assembly. Overlap-layout-consensus for long reads; de Bruijn graphs (nodes are k-mers, edges overlaps; an assembly is an Eulerian-like path, Pevzner et al. 2001) for short reads. Modern long-read assemblers (hifiasm, Verkko, Flye) build string graphs with haplotype-aware phasing using parental data, Hi-C, or ultra-long reads, resolving segmental duplications, satellite arrays and the short arms of acrocentric chromosomes that earlier references left as gaps.
Pangenomes. The linear reference is replaced by a graph of many haplotypes (vg, minigraph-cactus, Giraffe). Reads are mapped to a graph; structural variants and highly polymorphic loci (MHC, KIR, LPA) become tractable.
Milestones
The 2001 draft human genome; GRCh38; T2T-CHM13 (2022) closing the remaining 8 percent; the Human Pangenome Reference Consortium releases (47 assemblies in 2023, 232 individuals in release 2, 2025); and the complete diploid T2T-HG002 benchmark (2025-26).
Techniques to master
Suffix arrays and FM-indexes, minimizers, graph algorithms (Eulerian paths, bubble popping), error correction and consensus, phasing, QV and completeness metrics (Merqury, Inspector), benchmarking against truth sets (GIAB, T2T-HG002).
Where it bites
Routine, automated, gapless diploid assemblies of any individual (including ribosomal DNA arrays) at clinical cost and turnaround, plus accurate genotyping of tandem repeats and structural variants against pangenomes, are the open engineering-and-algorithms frontier.
Words on this page (7)
- genome
- The complete set of DNA instructions of an organism.
- DNA sequencing
- Reading the order of the A, C, G and T letters in DNA, usually as many short or long pieces called reads.
- genome assembly
- Stitching millions of overlapping DNA reads back into the long sequences of the chromosomes, like reassembling a shredded book.
- haplotype
- The set of DNA variants inherited together on one copy of a chromosome, from one parent.
- pangenome
- A reference that holds the DNA of many people at once instead of one person's sequence.
- ribosomal DNA
- Hundreds of near-identical repeats of the genes for ribosomes, packed into long arrays that are very hard to read.
- mutation
- A change in the letters of DNA.
New to this? Read first (3)
- Sequence assembly (Wikipedia)How reads are assembled into genomes, with the main algorithm families.
- Human Genome Project (Wikipedia)Background on the first human genome and why gaps remained.
- Human Pangenome Reference ConsortiumThe project building a many-person human reference.
Understanding map
map of the whole wiki →What to read before Genome sequence alignment and assembly (left), and what builds on it: entries that depend on it and its open problems (right). Every box links to its page.
- Start with
- Step 2
- Fast matrix multiplicationAlgorithm
- Step 3
- Step 4
- Genome sequence alignment and assemblyYou are here
- Then
Open problems & questions
Progress timeline
- Sep 21, 2025T2T-HG002 diploid benchmarkRelated to: Routine automated gapless haplotype-resolved assembly of any human genome, including rDNA arrayssource
All 46 chromosomes T2T except rDNA array interiors; 99.4% error-free by benchmark metrics.
- Sep 21, 2025T2T-HG002 diploid benchmark (preprint, later in Cell)source
Telomere-to-telomere continuity for all 46 chromosomes except the interior of rDNA arrays, with 99.4 percent of the diploid genome free of detectable errors.
- May 12, 2025HPRC Release 2Related to: Routine automated gapless haplotype-resolved assembly of any human genome, including rDNA arrayssource
232 individuals, with large gains in continuity and accuracy.
- May 12, 2025HPRC Release 2source
232 individuals assembled from HiFi and ultra-long nanopore reads with deep-learning polishing, many chromosomes complete telomere to telomere (pre-publication).
- May 10, 2023HPRC draft pangenomeRelated to: Routine automated gapless haplotype-resolved assembly of any human genome, including rDNA arrayssource
47 phased diploid assemblies at over 99% accuracy.
- May 10, 2023Draft human pangenomesource
47 phased diploid assemblies covering more than 99 percent of the expected sequence at over 99 percent accuracy.
- Mar 31, 2022T2T-CHM13Related to: Routine automated gapless haplotype-resolved assembly of any human genome, including rDNA arrayssource
First complete human genome sequence (haploid).
- Mar 31, 2022T2T-CHM13source
The first complete, gapless human genome sequence, adding about 200 Mb to GRCh38, reported by the T2T Consortium.
- Oct 5, 1990BLASTsource
Seed-and-extend local search makes database-scale homology search practical.
- Mar 1, 1970Needleman-Wunsch alignmentsource
Dynamic programming for global alignment of protein sequences.