bioRxivBioinformaticsPreprint
Lossless compression of k-mer matrices enabling random row access
Alix RegnieriD, Téo LemaneiD, Sébastien Bellenous, Rayan ChikhiiD, Pierre PeterlongoiD
Abstract
Genomic search engines such as Logan-Search index petabytes of sequencing data as large binary matrices, called k-mer matrices, where each row encodes the presence of a k-mer across thousands to millions of genomic samples. Logan-Search contains a petabyte of binary matrices, and storing them is expensive, yet compression must not prevent fast random access to any matrix row at query time. We present kmcomp, a lossless compression method for k-mer matrices that satisfies these competing requirements. Block compression partitions the matrix into fixed-size row blocks, each compressed independently; block start positions are stored in an Elias-Fano encoded array, enabling O(1) random access to any block. To improve compressibility without introducing additional decompression steps, we introduce the{pi} -compression: a column reordering that groups similar samples together by solving the Traveling Salesman Problem via a nearest-neighbor heuristic. We accelerate this heuristic with a novel variant of the vantage-point tree, the masked vp-tree, which dynamically prunes nearest-neighbor search space. On three (meta)genomic datasets, kmcomp achieves compression ratios of 1.3 to 5.4;{pi} -compression further improves these to 1.5 to 51.3. Applied to the Logan-Search petabyte-scale index, compression reduces storage by approximately half, and{pi} -compression adds a further 13% gain. Query overhead remains modest: queries of hundreds of nucleotides incur an absolute latency increase of{approx} 100 ms, and highly compressed indexes can match uncompressed query times thanks to reduced disk reads.
- Citations
- 0
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- Kaminari: a resource-frugal index for approximate colored k-mer queries
Victor Levallois, Yoshihiro Shibuya, … Giulio Ermanno Pibiri·Bioinformatics AdvancesPeer-reviewed·Jan 1, 2026
- Data structures based on k-mers for querying large collections of sequencing datasets
Camille Marchet, Christina A. Boucher, … Rayan Chikhi·Genome ResearchPeer-reviewed·Jan 1, 2021
- Representation of k-mer sets using spectrum-preserving string sets
Amatur Rahman, Paul Medevedev·Journal of Computational BiologyPeer-reviewed·Dec 8, 2020
- Pareto optimization of masked superstrings improves compression of pan-genome k-mer sets
Ján Plachý, Ondřej Sladký, … Pavel Veselý·Journal of Computational BiologyPeer-reviewed·Oct 8, 2026
- BLight: Efficient exact associative structure for k-mers
Camille Marchet, Maël Kerbiriou, Antoine Limasset·bioRxiv·Mar 29, 2021
- Sparse and Skew Hashing of K-Mers
Giulio Ermanno Pibiri·BioinformaticsPeer-reviewed·Apr 14, 2022