https://cnrs.hal.science/hal-03867526Shibuya, YoshihiroYoshihiroShibuyaBelazzougui, DjamalDjamalBelazzouguiDTISI - CERISTKucherov, GregoryGregoryKucherovSpace-efficient representation of genomic k-mer count tablesHAL CCSD2022k-merscountscompressionCompressed Static FunctionBloom filter[INFO.INFO-DS] Computer Science [cs]/Data Structures and Algorithms [cs.DS]Kucherov, Gregory2022-11-23 13:35:432022-11-30 08:36:352022-11-30 08:36:35enJournal articleshttps://cnrs.hal.science/hal-03867526/document10.1186/s13015-022-00212-0application/pdf1Motivation: k-mer counting is a common task in bioinformatic pipelines, with many dedicated tools available. Many of these tools produce in output k-mer count tables containing both k-mers and counts, easily reaching tens of GB. Furthermore, such tables do not support efficient random-access queries in general. Results: In this work, we design an efficient representation of k-mer count tables supporting fast random-access queries. We propose to apply Compressed Static Functions (CSFs), with space proportional to the empirical zero-order entropy of the counts. For very skewed distributions, like those of k-mer counts in whole genomes, the only currently available implementation of CSFs does not provide a compact enough representation. By adding a Bloom filter to a CSF we obtain a Bloom-enhanced CSF (BCSF) effectively overcoming this limitation. Furthermore, by combining BCSFs with minimizer-based bucketing of k-mers, we build even smaller representations breaking the empirical entropy lower bound, for large enough k. We also extend these representations to the approximate case, gaining additional space. We experimentally validate these techniques on k-mer count tables of whole genomes (E.Coli and C.Elegans) and unassembled reads, as well as on k-mer document frequency tables for 29 E.Coli genomes. In the case of exact counts, our representation takes about a half of the space of the empirical entropy, for large enough k's.