bioRxivBioinformaticsPreprint
On Weighted K-Mer Dictionaries
Abstract
We consider the problem of representing a set of k-mers and their abundance counts, or weights, in compressed space so that assessing membership and retrieving the weight of a k-mer is efficient. The representation is called a weighted dictionary of k-mers and finds application in numerous tasks in Bioinformatics that usually count k-mers as a pre-processing step. In fact, k-mer counting tools produce very large outputs that may result in a severe bottleneck for subsequent processing. In this work we extend the recently introduced SSHash dictionary (Pibiri, Bioinformatics 2022) to also store compactly the weights of the k-mers. From a technical perspective, we exploit the order of the k-mers represented in SSHash to encode runs of weights, hence allowing (several times) better compression than the empirical entropy of the weights. We also study the problem of reducing the number of runs in the weights to improve compression even further and illustrate a lower bound for this problem. We propose an efficient, greedy, algorithm to reduce the number of runs and show empirically that it performs well, i.e., very similarly to the lower bound. Lastly, we corroborate our findings with experiments on real-world datasets and comparison with competitive alternatives. Up to date, SSHash is the only k-mer dictionary that is exact, weighted, associative, fast, and small.
- Citations
- 3
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
- Sparse and Skew Hashing of K-Mers
Giulio Ermanno Pibiri·BioinformaticsPeer-reviewed·Apr 14, 2022
- Optimizing sparse and skew hashing: faster k-mer dictionaries
Giulio Ermanno Pibiri, Rob Patro·BioinformaticsPeer-reviewed·Jul 1, 2026
- Batch, Prefetch, Skip, Orient, Squeeze: Faster, Smaller k-mer dictionaries via the Spectral Burrows-Wheeler transform
A. C. Diseth, J. N. Alanko, … Simon J. Puglisi·bioRxiv·Nov 10, 2026
- Representation of k-mer sets using spectrum-preserving string sets
Amatur Rahman, Paul Medevedev·Journal of Computational BiologyPeer-reviewed·Dec 8, 2020
- Binary search and set operations on compacted k-mer lists
Yoann Dufresne, Francesco Andreace·bioRxiv·Aug 21, 2026
- Finimizers: Variable-length bounded-frequency minimizers for k-mer sets
Jarno Alanko, Elena Biagi, Simon J. Puglisi·bioRxiv·Feb 19, 2024