Files
obikmer/UserDocMD/theory/kmer_indexing/superkmers.md
T
Eric Coissac e715528d34 Refactor documentation for kmer indexing and phylogenetic models
This commit updates documentation across the board, introducing definitions for kmer constraints, super-kmers, k-mer set distances, SNP models, and sampling design principles. It also clarifies the index construction pipeline and the underlying mathematical models used for genome pair calibration.
2026-10-13 08:38:49 +02:00

1.3 KiB

Super-kmers

A super-kmer is a maximal run of consecutive, overlapping kmers from a read that share the same canonical minimizer (see Minimizer selection). Each kmer in the run overlaps the next by k-1 nucleotides. A super-kmer is capped at 256 nucleotides; a longer run is split at that boundary.

For a random minimizer of length m over kmers of length k, the expected length of a super-kmer is approximately [@Zheng2020-ji; @Golan2025-xf]:

L_{\text{nt}} \approx \frac{k-m+2}{2} + k - 1

For k=31, m=13 this is about 40 nucleotides; in practice super-kmers rarely exceed a few dozen nucleotides.

Canonical super-kmers

A canonical super-kmer is the canonical form of a super-kmer (see DNA encoding): the lexicographic minimum of the super-kmer and its reverse complement. When a read and its reverse complement are both encountered, they produce super-kmers that are reverse complements of each other; both reduce to the same canonical super-kmer, so a genomic region is represented once regardless of which strand was read.

Super-kmers are the unit of work used throughout construction and querying: sequences are decomposed into super-kmers first, and every downstream step (partition routing, deduplication, counting) operates on them rather than on individual kmers.