■ Change #31 · wiki.edited
Genome sequence alignment and assembly: Normalize Markdown to canonical form
explainer.student
− **Alignment.** To compare two sequences we fill a table: entry $(i,j)$ holds the best score for aligning the first $i$ letters of one with the first $j$ 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 $m\times n$. 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.+ **Alignment.** To compare two sequences we fill a table: entry $(i,j)$ holds the best score for aligning the first $i$ letters of one with the first $j$ 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 $m\times n$. 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 $k$ and whose edges link words overlapping by $k-1$ 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.+ **Assembly.** Short-read assemblers build a _de Bruijn graph_, whose nodes are short words of length $k$ and whose edges link words overlapping by $k-1$ 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.
hash 4dab4de2d96e841846a34fd0a96af9889af0949261f5d4a88dd083a24d32fd9a
previous c7d3c73fab55e844abccb7e40444a961b8e801c8704bced0910db3a6dbd52f42