Apex › Data & encoding

How genomes are assembled (de Bruijn graphs)

A sequencer reads millions of short overlapping fragments; reassembling the original is genome assembly. Shred into k-mers, make each (k−1)-overlap a node and each k-mer a directed edge, and reassembly becomes an Eulerian path — walk every edge once (Hierholzer) and the sequence spells back out. Verified: distinct k-mers reconstruct the original exactly, each k-mer used once; but repeated (k−1)-mers branch the graph so several paths are valid (ambiguous) — the real difficulty, fixed by longer reads / larger k. Slide k and watch it snap between exact and ambiguous.

More in Data & encoding