<p>The <strong>minimizer</strong> of a k-mer is the canonical form of the m-mer that is smallest according to a chosen ordering among the <spanclass="arithmatex">\(k-m+1\)</span> overlapping m-mers contained in the k-mer, with <spanclass="arithmatex">\(m<k\)</span> (Roberts <em>et al.</em> 2004)<supid="fnref:Roberts2004-rz"><aclass="footnote-ref"href="#fn:Roberts2004-rz">1</a></sup>. Canonical form is the same operation defined for a full kmer (see <ahref="../encoding/">DNA encoding</a>), applied here to an m-mer <spanclass="arithmatex">\(s\)</span> instead: <spanclass="arithmatex">\(s^c = \min_{\mathrm{lex}}\left(s,\operatorname{RC}(s)\right)\)</span>.</p>
<p>In <strong>OBIkmer</strong>, canonical m-mers are ordered according to a deterministic hash function <spanclass="arithmatex">\(H\)</span> applied to their canonical form:</p>
<divclass="arithmatex">\[
s_1^c <_h s_2^c
\quad\Longleftrightarrow\quad
H(s_1^c) < H(s_2^c).
\]</div>
<p>Thus, for a k-mer <spanclass="arithmatex">\(K\)</span>, let</p>
<divclass="arithmatex">\[
M(K)=(s_1,\ldots,s_{k-m+1})
\]</div>
<p>be its sequence of overlapping m-mers. The minimizer is</p>
<divclass="arithmatex">\[
\operatorname{minimizer}(K) = s_j^c,
\qquad
j=\underset{i}{\operatorname{argmin}}\;H(s_i^c).
\]</div>
<p>In other words, the hash function defines the ordering of canonical m-mers, while the minimizer itself is the canonical form of the m-mer selected by that ordering.</p>
<p>Applying the minimizer to consecutive k-mers partitions a sequence into super-kmers (see <ahref="../superkmers/">Super-kmers</a>).</p>
<p><code>obikmer</code> selects minimizers by hash order rather than plain lexicographic order. Ordering m-mers lexicographically on their 2-bit encoding systematically favors AT-rich m-mers (an all-A m-mer always encodes to 0), which causes low-complexity regions to dominate as minimizers and produces unbalanced partitions (Zheng <em>et al.</em> 2020, 2021; Kille <em>et al.</em> 2023; Pan & Reinert 2024; Golan & Shur 2025)<supid="fnref:Zheng2020-ji"><aclass="footnote-ref"href="#fn:Zheng2020-ji">2</a></sup><supid="fnref:Zheng2021-cc"><aclass="footnote-ref"href="#fn:Zheng2021-cc">3</a></sup><supid="fnref:Pan2024-hb"><aclass="footnote-ref"href="#fn:Pan2024-hb">4</a></sup><supid="fnref:Kille2023-px"><aclass="footnote-ref"href="#fn:Kille2023-px">5</a></sup><supid="fnref:Golan2025-xf"><aclass="footnote-ref"href="#fn:Golan2025-xf">6</a></sup>.</p>
<p>Instead, a well-distributed hash function <spanclass="arithmatex">\(H\)</span> is applied to the canonical (lexicographically minimal) form of each m-mer, and the m-mer with the smallest <spanclass="arithmatex">\(H\)</span> value wins. Because <spanclass="arithmatex">\(H\)</span> is a bijective mixing function with good avalanche properties (Steele <em>et al.</em> 2014)<supid="fnref:Steele2014-cz"><aclass="footnote-ref"href="#fn:Steele2014-cz">7</a></sup>, its output behaves approximately as a composition-independent pseudorandom ordering of distinct m-mers. Under the usual random-hash assumption, each distinct m-mer in a window has approximately the same probability of being the minimum, independently of nucleotide composition.</p>
<p>The canonical form used as input to <spanclass="arithmatex">\(H\)</span> is still the lexicographic minimum of forward/reverse-complement — hashing is applied on top of it, not used to redefine it. Defining canonicity by hash value instead would bias the <em>distribution of hash values themselves</em> toward small values (the minimum of two independent hashes is not uniformly distributed), reintroducing a bias one layer down.</p>
<p>The hash function <spanclass="arithmatex">\(H\)</span> applies Stafford's 64-bit mixing function, variant 13 (Stafford 2011)<supid="fnref:Stafford2011"><aclass="footnote-ref"href="#fn:Stafford2011">8</a></sup>, to the m-mer encoding XORed with a seed <spanclass="arithmatex">\(\sigma\)</span>:</p>
<p>The choice of <spanclass="arithmatex">\(\sigma\)</span> 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 <spanclass="arithmatex">\(H\)</span>, 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.</p>
<p>In particular, with <spanclass="arithmatex">\(\sigma=0\)</span>, the all-A m-mer is encoded as <spanclass="arithmatex">\(0\)</span>, and</p>
<p>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.</p>
<p>Exhaustive enumeration of all <spanclass="arithmatex">\(4^m\)</span> m-mers confirms that, with <spanclass="arithmatex">\(\sigma=\texttt{0x9e3779b97f4a7c15}\)</span>, the global argmin is neither a homopolymer nor a periodic repeat for any tested <spanclass="arithmatex">\(m\)</span>:</p>
<table>
<thead>
<tr>
<th><spanclass="arithmatex">\(m\)</span></th>
<th>argmin (canonical)</th>
<th>decoded sequence</th>
<th>minimal period</th>
</tr>
</thead>
<tbody>
<tr>
<td>3</td>
<td>16</td>
<td><code>CAA</code></td>
<td>3</td>
</tr>
<tr>
<td>5</td>
<td>78</td>
<td><code>ACATG</code></td>
<td>5</td>
</tr>
<tr>
<td>7</td>
<td>5512</td>
<td><code>CCCGAGA</code></td>
<td>7</td>
</tr>
<tr>
<td>9</td>
<td>108760</td>
<td><code>CGGGATCGA</code></td>
<td>9</td>
</tr>
<tr>
<td>11</td>
<td>179014</td>
<td><code>AAGGTGTCACG</code></td>
<td>11</td>
</tr>
<tr>
<td>13</td>
<td>33759044</td>
<td><code>GAAATACTTCACA</code></td>
<td>13</td>
</tr>
<tr>
<td>15</td>
<td>29869313</td>
<td><code>AACTACTTACCAAAC</code></td>
<td>15</td>
</tr>
</tbody>
</table>
<p>When the minimal period of the sequence is <spanclass="arithmatex">\(m\)</span>, as observed in the table above, the sequence is primitive: it cannot be represented as repetitions of a shorter sequence.</p>
<p>See <ahref="../indexing_architecture/">Partitioning and indexing architecture</a> for how this hash routes a super-kmer to a partition.</p>
<divclass="footnote">
<hr/>
<ol>
<liid="fn:Roberts2004-rz">
<p>Roberts M, Hayes W, Hunt BR, Mount SM, Yorke JA (2004) <ahref="https://doi.org/10.1093/bioinformatics/bth408">[Reducing storage requirements for biological sequence comparison]{.nocase}</a>. <em>Bioinformatics (Oxford, England)</em>, <strong>20</strong>, 3363--3369. <aclass="footnote-backref"href="#fnref:Roberts2004-rz"title="Jump back to footnote 1 in the text">↩</a></p>
</li>
<liid="fn:Zheng2020-ji">
<p>Zheng H, Kingsford C, Marçais G (2020) <ahref="https://doi.org/10.1093/bioinformatics/btaa472">Improved design and analysis of practical minimizers</a>. <em>Bioinformatics (Oxford, England)</em>, <strong>36</strong>, i119--i127. <aclass="footnote-backref"href="#fnref:Zheng2020-ji"title="Jump back to footnote 2 in the text">↩</a></p>
</li>
<liid="fn:Zheng2021-cc">
<p>Zheng H, Kingsford C, Marçais G (2021) <ahref="https://doi.org/10.1093/bioinformatics/btab313">Sequence-specific minimizers via polar sets</a>. <em>Bioinformatics (Oxford, England)</em>, <strong>37</strong>, i187--i195. <aclass="footnote-backref"href="#fnref:Zheng2021-cc"title="Jump back to footnote 3 in the text">↩</a></p>
</li>
<liid="fn:Pan2024-hb">
<p>Pan C, Reinert K (2024) <ahref="https://doi.org/10.1093/bioinformatics/btae045">A simple refined DNA minimizer operator enables 2-fold faster computation</a>. <em>Bioinformatics (Oxford, England)</em>, <strong>40</strong>. <aclass="footnote-backref"href="#fnref:Pan2024-hb"title="Jump back to footnote 4 in the text">↩</a></p>
</li>
<liid="fn:Kille2023-px">
<p>Kille B, Garrison E, Treangen TJ, Phillippy AM (2023) <ahref="https://doi.org/10.1093/bioinformatics/btad512">Minmers are a generalization of minimizers that enable unbiased local jaccard estimation</a>. <em>Bioinformatics (Oxford, England)</em>, <strong>39</strong>. <aclass="footnote-backref"href="#fnref:Kille2023-px"title="Jump back to footnote 5 in the text">↩</a></p>
</li>
<liid="fn:Golan2025-xf">
<p>Golan S, Shur AM (2025) <ahref="https://doi.org/10.1007/978-3-031-82670-2\_25">Expected density of random minimizers</a>. In: <em>Lecture notes in computer science</em> Lecture notes in computer science., pp. 347--360. Springer Nature Switzerland, Cham. <aclass="footnote-backref"href="#fnref:Golan2025-xf"title="Jump back to footnote 6 in the text">↩</a></p>
</li>
<liid="fn:Steele2014-cz">
<p>Steele GL Jr, Lea D, Flood CH (2014) <ahref="https://doi.org/10.1145/2660193.2660195">[Fast splittable pseudorandom number generators]{.nocase}</a>. In: <em>[Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages\ & Applications]{.nocase}</em>. ACM, New York, NY, USA. <aclass="footnote-backref"href="#fnref:Steele2014-cz"title="Jump back to footnote 7 in the text">↩</a></p>
</li>
<liid="fn:Stafford2011">
<p>Stafford D (2011) Better bit mixing - improving on MurmurHash3's 64-bit finalizer. Available at: <ahref="https://zimbry.blogspot.com/2011/09/better-bit-mixing-improving-on.html">https://zimbry.blogspot.com/2011/09/better-bit-mixing-improving-on.html</a> (accessed 12 September 2026). <aclass="footnote-backref"href="#fnref:Stafford2011"title="Jump back to footnote 8 in the text">↩</a></p>
<scriptid="__config"type="application/json">{"annotate":null,"base":"../../..","features":[],"search":"../../../assets/javascripts/workers/search.2c215733.min.js","tags":null,"translations":{"clipboard.copied":"Copied to clipboard","clipboard.copy":"Copy to clipboard","search.result.more.one":"1 more on this page","search.result.more.other":"# more on this page","search.result.none":"No matching documents","search.result.one":"1 matching document","search.result.other":"# matching documents","search.result.placeholder":"Type to start searching","search.result.term.missing":"Missing","select.version":"Select version"},"version":null}</script>