# Minimizer selection ## Definition The **minimizer** of a k-mer is the canonical form of the m-mer that is smallest according to a chosen ordering among the $k-m+1$ overlapping m-mers contained in the k-mer, with $m> 30) x ← x × 0xbf58476d1ce4e5b9 x ← x ⊕ (x >> 27) x ← x × 0x94d049bb133111eb return x ⊕ (x >> 31) ``` The hash uses a fixed non-zero seed $$ \sigma=\texttt{0x9e3779b97f4a7c15}. $$ The choice of $\sigma$ is not arbitrary. Low-complexity m-mers (homopolymers and short tandem repeats) are disproportionately abundant in real genomes. If one of them happened to be the global argmin of $H$, it could therefore occur as the minimizer in far more windows than expected from the composition-uniform behavior described above. This is not a bias of the mixing function itself, but a consequence of the repeated occurrence of the same input in real sequence data. In particular, with $\sigma=0$, the all-A m-mer is encoded as $0$, and $$ \operatorname{Mix13}(0)=0, $$ This makes it the global argmin of the hash function. The non-zero seed eliminates the particular pathological correspondence between the all-A m-mer and the zero output of the mixer. Exhaustive enumeration of all $4^m$ m-mers confirms that, with $\sigma=\texttt{0x9e3779b97f4a7c15}$, the global argmin is neither a homopolymer nor a periodic repeat for any tested \(m\): | $m$ | argmin (canonical) | decoded sequence | minimal period | |---|---|---|---| | 3 | 16 | `CAA` | 3 | | 5 | 78 | `ACATG` | 5 | | 7 | 5512 | `CCCGAGA` | 7 | | 9 | 108760 | `CGGGATCGA` | 9 | | 11 | 179014 | `AAGGTGTCACG` | 11 | | 13 | 33759044 | `GAAATACTTCACA` | 13 | | 15 | 29869313 | `AACTACTTACCAAAC` | 15 | When the minimal period of the sequence is $m$, as observed in the table above, the sequence is primitive: it cannot be represented as repetitions of a shorter sequence. ## Partition routing A super-kmer's partition is the low $p$ bits of its minimizer's hash: $$\text{partition} = H(\text{minimizer}) \bmod 2^p$$ See [Partitioning and indexing architecture](indexing_architecture.md) for more details.