Table of Contents
Fetching ...

Efficient k-mer Dataset Compression Using Eulerian Covers of de Bruijn Graphs and BWT

H. Z. Q. Chen, S. Kitaev, X. Lang, A. Pyatkin, R. Tang

TL;DR

This work introduces MCTR, a lossless compressor for k-mer multisets that combines an optimal Eulerian cover of the de Bruijn graph with a Burrows-Wheeler Transform (BWT)-based encoding. It establishes linear-time and linear-space guarantees while preserving complete k-mer frequencies, and it offers two output formats (list and frequency) for lossless reconstruction. Empirical results show that while MCTR can be slower than lossy baselines like GreedyTigs, its two-stage pipeline (MCTR followed by BWT+RLE) yields superior lossless compression relative to BWT alone and provides a principled baseline for exact spectrum preservation in genomics. The approach thereby supplies a rigorous, scalable option for storage- and analysis-critical applications, complementing lossy summarization methods that optimize for compact sequence representations at the expense of information fidelity.

Abstract

Transforming an input sequence into its constituent k-mers is a fundamental operation in computational genomics. To reduce storage costs associated with k-mer datasets, we introduce and formally analyze MCTR, a novel two-stage algorithm for lossless compression of the k-mer multiset. Our core method achieves a minimal text representation (W) by computing an optimal Eulerian cover (minimum string count) of the dataset's de Bruijn graph, enabled by an efficient local Eulerization technique. The resulting strings are then further compressed losslessly using the Burrows-Wheeler Transform (BWT). Leveraging de Bruijn graph properties, MCTR is proven to achieve linear time and space complexity and guarantees complete reconstruction of the original k-mer multiset, including frequencies. Using simulated and real genomic data, we evaluated MCTR's performance (list and frequency representations) against the state-of-the-art lossy unitigging tool greedytigs (from matchtigs). We measured core execution time and the raw compression ratio cmpr = weight(M)/weight(W), where M is the input sequence data). Benchmarks confirmed MCTR's data fidelity but revealed performance trade-offs inherent to lossless representation. GreedyTigs was significantly faster. Regarding raw compression, GreedyTigs achieved high ratios (cmpr approx 14) on noisy real data for its lossy sequence output. On real data, MCTR (frequency) showed moderate raw compression (cmpr approx 1.5-2.7), while MCTR (list) showed none (cmpr approx 1). Importantly, the full MCTR+BWT pipeline significantly outperforms BWT alone for enhanced lossless compression. Our results establish MCTR as a valuable, theoretically grounded tool for applications demanding efficient, lossless storage and analysis of k-mer multisets, complementing lossy methods optimized for sequence summarization.

Efficient k-mer Dataset Compression Using Eulerian Covers of de Bruijn Graphs and BWT

TL;DR

This work introduces MCTR, a lossless compressor for k-mer multisets that combines an optimal Eulerian cover of the de Bruijn graph with a Burrows-Wheeler Transform (BWT)-based encoding. It establishes linear-time and linear-space guarantees while preserving complete k-mer frequencies, and it offers two output formats (list and frequency) for lossless reconstruction. Empirical results show that while MCTR can be slower than lossy baselines like GreedyTigs, its two-stage pipeline (MCTR followed by BWT+RLE) yields superior lossless compression relative to BWT alone and provides a principled baseline for exact spectrum preservation in genomics. The approach thereby supplies a rigorous, scalable option for storage- and analysis-critical applications, complementing lossy summarization methods that optimize for compact sequence representations at the expense of information fidelity.

Abstract

Transforming an input sequence into its constituent k-mers is a fundamental operation in computational genomics. To reduce storage costs associated with k-mer datasets, we introduce and formally analyze MCTR, a novel two-stage algorithm for lossless compression of the k-mer multiset. Our core method achieves a minimal text representation (W) by computing an optimal Eulerian cover (minimum string count) of the dataset's de Bruijn graph, enabled by an efficient local Eulerization technique. The resulting strings are then further compressed losslessly using the Burrows-Wheeler Transform (BWT). Leveraging de Bruijn graph properties, MCTR is proven to achieve linear time and space complexity and guarantees complete reconstruction of the original k-mer multiset, including frequencies. Using simulated and real genomic data, we evaluated MCTR's performance (list and frequency representations) against the state-of-the-art lossy unitigging tool greedytigs (from matchtigs). We measured core execution time and the raw compression ratio cmpr = weight(M)/weight(W), where M is the input sequence data). Benchmarks confirmed MCTR's data fidelity but revealed performance trade-offs inherent to lossless representation. GreedyTigs was significantly faster. Regarding raw compression, GreedyTigs achieved high ratios (cmpr approx 14) on noisy real data for its lossy sequence output. On real data, MCTR (frequency) showed moderate raw compression (cmpr approx 1.5-2.7), while MCTR (list) showed none (cmpr approx 1). Importantly, the full MCTR+BWT pipeline significantly outperforms BWT alone for enhanced lossless compression. Our results establish MCTR as a valuable, theoretically grounded tool for applications demanding efficient, lossless storage and analysis of k-mer multisets, complementing lossy methods optimized for sequence summarization.
Paper Structure (28 sections, 3 theorems, 9 equations, 5 figures, 1 table, 3 algorithms)

This paper contains 28 sections, 3 theorems, 9 equations, 5 figures, 1 table, 3 algorithms.

Key Result

Theorem 1

A directed graph $G = (V, E)$ is local Eulerian if and only if it is balanced, i.e., $d^-(v) = d^+(v)$ for every vertex $v \in V$.

Figures (5)

  • Figure 1: Flowchart of the Minimum Compressed Text Representation Algorithm
  • Figure 2: Illustration of Local Eulerization on Graph $G$ to Obtain Graph $G'$
  • Figure 3: Simulation results with $k=10$: Compression ratio ($\mathop{\mathrm{cr}}\nolimits = \mathop{\mathrm{weight}}\nolimits(\mathbb{M}) / \mathop{\mathrm{weight}}\nolimits(\mathbb{W})$) of the MCTR compressed text representation $\mathbb{W}$ as a function of the sampling rate $r$. Consistent with Theorem \ref{['thm:MN']}, the ratio approaches $k+1$ as the $k$-mer space becomes denser.
  • Figure 4: Performance comparison on simulated (top) and real (bottom) E. coli datasets for $k=31, 51, 71$. Left: Core/Total Execution Time (log scale, lower is better). Center: Raw Output Size ($\mathop{\mathrm{weight}}\nolimits(\mathbb{W})$ in MB, lower is better). Right: Raw Compression Ratio ($\mathop{\mathrm{cr}}\nolimits = \mathop{\mathrm{weight}}\nolimits(\mathbb{M})/\mathop{\mathrm{weight}}\nolimits(\mathbb{W})$, higher is better). Note the data expansion ($\mathop{\mathrm{cr}}\nolimits \leq 1$) for some methods, especially MCTR (frequency) on simulated data.
  • Figure 5: Comparison of compression ratios using BWT on SARS-CoV-2 datasets for $k=5$ to $k=30$. Ratios compare original $k$-mer list file size to final compressed size. "MCTR (list) + BWT" and "MCTR (frequency) + BWT" show the result of applying BWT to our respective text representations. "BWT only" serves as baseline. The two-stage MCTR+BWT approach consistently yields higher lossless compression ratios.

Theorems & Definitions (6)

  • Theorem 1
  • Theorem 2
  • proof
  • Example 1
  • Lemma 1
  • proof