Table of Contents
Fetching ...

Vigemers: on the number of $k$-mers sharing the same XOR-based minimizer

Florian Ingels, Antoine Limasset, Camille Marchet, Mikaël Salson

TL;DR

This work generalizes the counting of k-mers that admit a given m-mer as their minimizer by introducing vigemers and vigemins, defined via an XOR-based key gamma. It extends prior lexicographic results to a broad family of orders on m-mers, and develops a dynamic-programming framework to compute the counting function $\\pi_k^{\\gamma}(w)$ in $O(|\\Sigma| \, k \, m^2)$ time and $O(km)$ space. The approach hinges on an autocorrelation matrix and specialized alphabets to derive recurrences for antemers and postmers, enabling the decomposition $x=ywz$ and the DP formulas that yield the counts. Numerical experiments show that the choice of $\\gamma$ reshuffles bucket sizes and affects the peak distribution, with no single $\\gamma$ universally balancing buckets but offering tunable sensitivity to data characteristics; the results provide a practical tool for evaluating minimizer-based partitions and guiding data-specific key design.

Abstract

In bioinformatics, minimizers have become an inescapable method for handling $k$-mers (words of fixed size $k$) extracted from DNA or RNA sequencing, whether for sampling, storage, querying or partitioning. According to some fixed order on $m$-mers ($m<k$), the minimizer of a $k$-mer is defined as its smallest $m$-mer -- and acts as its fingerprint. Although minimizers are widely used for partitioning purposes, there is almost no theoretical work on the quality of the resulting partitions. For instance, it has been known for decades that the lexicographic order empirically leads to highly unbalanced partitions that are unusable in practice, but it was not until very recently that this observation was theoretically substantiated. The rejection of the lexicographic order has led the community to resort to (pseudo-)random orders using hash functions. In this work, we extend the theoretical results relating to the partitions obtained by the lexicographical order, departing from it to a (exponentially) large family of hash functions, namely where the $m$-mers are XORed against a fixed key. More precisely, provided a key $γ$ and a $m$-mer $w$, we investigate the function that counts how many $k$-mers admit $w$ as their minimizer (i.e. where $w\oplusγ$ is minimal among all $m$-mers of said $k$-mers). This number, denoted by $π_k^γ(w)$, represents the maximum size of the bucket associated with $w$, if all possible $k$-mers were to be seen and partitioned. We adapt the (lexicographical order) method of the literature to our framework and propose combinatorial equations that allow to compute, using dynamic programming, $π_k^γ(w)$ in $O(km^2)$ time and $O(km)$ space.

Vigemers: on the number of $k$-mers sharing the same XOR-based minimizer

TL;DR

This work generalizes the counting of k-mers that admit a given m-mer as their minimizer by introducing vigemers and vigemins, defined via an XOR-based key gamma. It extends prior lexicographic results to a broad family of orders on m-mers, and develops a dynamic-programming framework to compute the counting function in time and space. The approach hinges on an autocorrelation matrix and specialized alphabets to derive recurrences for antemers and postmers, enabling the decomposition and the DP formulas that yield the counts. Numerical experiments show that the choice of reshuffles bucket sizes and affects the peak distribution, with no single universally balancing buckets but offering tunable sensitivity to data characteristics; the results provide a practical tool for evaluating minimizer-based partitions and guiding data-specific key design.

Abstract

In bioinformatics, minimizers have become an inescapable method for handling -mers (words of fixed size ) extracted from DNA or RNA sequencing, whether for sampling, storage, querying or partitioning. According to some fixed order on -mers (), the minimizer of a -mer is defined as its smallest -mer -- and acts as its fingerprint. Although minimizers are widely used for partitioning purposes, there is almost no theoretical work on the quality of the resulting partitions. For instance, it has been known for decades that the lexicographic order empirically leads to highly unbalanced partitions that are unusable in practice, but it was not until very recently that this observation was theoretically substantiated. The rejection of the lexicographic order has led the community to resort to (pseudo-)random orders using hash functions. In this work, we extend the theoretical results relating to the partitions obtained by the lexicographical order, departing from it to a (exponentially) large family of hash functions, namely where the -mers are XORed against a fixed key. More precisely, provided a key and a -mer , we investigate the function that counts how many -mers admit as their minimizer (i.e. where is minimal among all -mers of said -mers). This number, denoted by , represents the maximum size of the bucket associated with , if all possible -mers were to be seen and partitioned. We adapt the (lexicographical order) method of the literature to our framework and propose combinatorial equations that allow to compute, using dynamic programming, in time and space.
Paper Structure (18 sections, 12 theorems, 19 equations, 1 figure, 1 table)

This paper contains 18 sections, 12 theorems, 19 equations, 1 figure, 1 table.

Key Result

lemma thmcounterlemma

If there exists $2\leq j\leq i \leq m$ such that $\mathbf{R}_{i,j}^<$, then (i) $A_i(\alpha) = 0$ for $\alpha\geq i$ and (ii) $P_i(\beta)=0$ for $\beta \geq m+j-1$.

Figures (1)

  • Figure 1: $w\in\lbrace \textnormal{A}, \textnormal{C},\textnormal{G},\textnormal{T}\rbrace^m\mapsto \pi_k^\gamma(w)$ with $k=31$, $m=10$, for several values of $\gamma$: (left) $\textnormal{A}\cdots\textnormal{A}$ is the standard lexicographical order, $\textnormal{A}\textnormal{T}\cdots\textnormal{T}$ is the anti-lexicographical order and $\textnormal{ATAT}\cdots$ is the alternating order; (right) three random keys starting by C,G and T. The solid red horizontal line represents a perfectly balanced partition; the dotted horizontal red line corresponds to empty buckets.

Theorems & Definitions (20)

  • definition thmcounterdefinition: Vigemin
  • definition thmcounterdefinition: Autocorrelation matrix, ingels2024number
  • definition thmcounterdefinition: Specialized alphabet
  • definition thmcounterdefinition: Antemers, ingels2024number
  • definition thmcounterdefinition: Postmers, ingels2024number
  • lemma thmcounterlemma: ingels2024number
  • proof
  • proposition thmcounterproposition: ingels2024number
  • lemma thmcounterlemma
  • lemma thmcounterlemma
  • ...and 10 more