{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,30]],"date-time":"2026-09-30T13:31:40Z","timestamp":1790775100209,"version":"4.1.0"},"reference-count":32,"publisher":"Springer Science and Business Media LLC","issue":"1","license":[{"start":{"date-parts":[[2024,4,5]],"date-time":"2024-04-05T00:00:00Z","timestamp":1712275200000},"content-version":"tdm","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"},{"start":{"date-parts":[[2024,4,5]],"date-time":"2024-04-05T00:00:00Z","timestamp":1712275200000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"}],"funder":[{"name":"Helsinki University Library"},{"DOI":"10.13039\/100007797","name":"University of Helsinki","doi-asserted-by":"crossref","id":[{"id":"10.13039\/100007797","id-type":"DOI","asserted-by":"crossref"}]}],"content-domain":{"domain":["link.springer.com"],"crossmark-restriction":false},"short-container-title":["Algorithms Mol Biol"],"abstract":"<jats:title>Abstract<\/jats:title><jats:p>Computing <jats:italic>k<\/jats:italic>-mer frequencies in a collection of reads is a common procedure in many genomic applications. Several state-of-the-art <jats:italic>k<\/jats:italic>-mer counters rely on hash tables to carry out this task but they are often optimised for small <jats:italic>k<\/jats:italic> as a hash table keeping keys explicitly (i.e., <jats:italic>k<\/jats:italic>-mer sequences) takes <jats:inline-formula><jats:alternatives><jats:tex-math>$$O(N\\frac{k}{w})$$<\/jats:tex-math><mml:math xmlns:mml=\"http:\/\/www.w3.org\/1998\/Math\/MathML\">\n                  <mml:mrow>\n                    <mml:mi>O<\/mml:mi>\n                    <mml:mo>(<\/mml:mo>\n                    <mml:mi>N<\/mml:mi>\n                    <mml:mfrac>\n                      <mml:mi>k<\/mml:mi>\n                      <mml:mi>w<\/mml:mi>\n                    <\/mml:mfrac>\n                    <mml:mo>)<\/mml:mo>\n                  <\/mml:mrow>\n                <\/mml:math><\/jats:alternatives><\/jats:inline-formula> computer words, <jats:italic>N<\/jats:italic> being the number of distinct <jats:italic>k<\/jats:italic>-mers and <jats:italic>w<\/jats:italic> the computer word size, which is impractical for long values of <jats:italic>k<\/jats:italic>. This space usage is an important limitation as analysis of long and accurate HiFi sequencing reads can require larger values of <jats:italic>k<\/jats:italic>. We propose , a space-efficient hash table for <jats:italic>k<\/jats:italic>-mers using <jats:inline-formula><jats:alternatives><jats:tex-math>$$O(N+u\\frac{k}{w})$$<\/jats:tex-math><mml:math xmlns:mml=\"http:\/\/www.w3.org\/1998\/Math\/MathML\">\n                  <mml:mrow>\n                    <mml:mi>O<\/mml:mi>\n                    <mml:mo>(<\/mml:mo>\n                    <mml:mi>N<\/mml:mi>\n                    <mml:mo>+<\/mml:mo>\n                    <mml:mi>u<\/mml:mi>\n                    <mml:mfrac>\n                      <mml:mi>k<\/mml:mi>\n                      <mml:mi>w<\/mml:mi>\n                    <\/mml:mfrac>\n                    <mml:mo>)<\/mml:mo>\n                  <\/mml:mrow>\n                <\/mml:math><\/jats:alternatives><\/jats:inline-formula> words of space, where <jats:italic>u<\/jats:italic> is the number of reads. Our framework exploits the fact that consecutive <jats:italic>k<\/jats:italic>-mers overlap by <jats:inline-formula><jats:alternatives><jats:tex-math>$$k-1$$<\/jats:tex-math><mml:math xmlns:mml=\"http:\/\/www.w3.org\/1998\/Math\/MathML\">\n                  <mml:mrow>\n                    <mml:mi>k<\/mml:mi>\n                    <mml:mo>-<\/mml:mo>\n                    <mml:mn>1<\/mml:mn>\n                  <\/mml:mrow>\n                <\/mml:math><\/jats:alternatives><\/jats:inline-formula> symbols. Thus, we only store the last symbol of a <jats:italic>k<\/jats:italic>-mer and a pointer within the hash table to a previous one, which we can use to recover the remaining <jats:inline-formula><jats:alternatives><jats:tex-math>$$k-1$$<\/jats:tex-math><mml:math xmlns:mml=\"http:\/\/www.w3.org\/1998\/Math\/MathML\">\n                  <mml:mrow>\n                    <mml:mi>k<\/mml:mi>\n                    <mml:mo>-<\/mml:mo>\n                    <mml:mn>1<\/mml:mn>\n                  <\/mml:mrow>\n                <\/mml:math><\/jats:alternatives><\/jats:inline-formula> symbols. We adapt  to compute canonical <jats:italic>k<\/jats:italic>-mers as well. This variant also uses pointers within the hash table to save space but requires more work to decode the <jats:italic>k<\/jats:italic>-mers. Specifically, it takes <jats:inline-formula><jats:alternatives><jats:tex-math>$$O(\\sigma ^{k})$$<\/jats:tex-math><mml:math xmlns:mml=\"http:\/\/www.w3.org\/1998\/Math\/MathML\">\n                  <mml:mrow>\n                    <mml:mi>O<\/mml:mi>\n                    <mml:mo>(<\/mml:mo>\n                    <mml:msup>\n                      <mml:mi>\u03c3<\/mml:mi>\n                      <mml:mi>k<\/mml:mi>\n                    <\/mml:msup>\n                    <mml:mo>)<\/mml:mo>\n                  <\/mml:mrow>\n                <\/mml:math><\/jats:alternatives><\/jats:inline-formula> time in the worst case, <jats:inline-formula><jats:alternatives><jats:tex-math>$$\\sigma$$<\/jats:tex-math><mml:math xmlns:mml=\"http:\/\/www.w3.org\/1998\/Math\/MathML\">\n                  <mml:mi>\u03c3<\/mml:mi>\n                <\/mml:math><\/jats:alternatives><\/jats:inline-formula> being the DNA alphabet, but our experiments show this is hardly ever the case. The canonical variant does not improve our theoretical results but greatly reduces space usage in practice while keeping a competitive performance to get the <jats:italic>k<\/jats:italic>-mers and their frequencies. We compare canonical  to a regular hash table storing canonical <jats:italic>k<\/jats:italic>-mers explicitly as keys and show that our method uses up to five times less space while being less than 1.5 times slower. We also show that canonical  uses significantly less memory than state-of-the-art <jats:italic>k<\/jats:italic>-mer counters when they do not resort to disk to keep intermediate results.<\/jats:p>","DOI":"10.1186\/s13015-024-00259-1","type":"journal-article","created":{"date-parts":[[2024,4,5]],"date-time":"2024-04-05T08:02:01Z","timestamp":1712304121000},"update-policy":"https:\/\/doi.org\/10.1007\/springer_crossmark_policy","source":"Crossref","is-referenced-by-count":5,"title":["Space-efficient computation of k-mer dictionaries for large values of k"],"prefix":"10.1186","volume":"19","author":[{"given":"Diego","family":"D\u00edaz-Dom\u00ednguez","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Miika","family":"Leinonen","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Leena","family":"Salmela","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"297","published-online":{"date-parts":[[2024,4,5]]},"reference":[{"key":"259_CR1","doi-asserted-by":"crossref","unstructured":"Baeza-Yates RA. String searching algorithms revisited. In: Proceedings of the 1st workshop on algorithms and data structures (WADS); 1989. p. 75\u201396.","DOI":"10.1007\/3-540-51542-9_9"},{"key":"259_CR2","doi-asserted-by":"publisher","first-page":"1075","DOI":"10.1038\/s41587-022-01220-6","volume":"40","author":"A Bankevich","year":"2022","unstructured":"Bankevich A, Bzikadze AV, Kolmogorov M, et al. Multiplex de Bruijn graphs enable genome assembly from long, high-fidelity reads. Nat Biotechnol. 2022;40:1075\u201381.","journal-title":"Nat Biotechnol"},{"issue":"7","key":"259_CR3","doi-asserted-by":"publisher","first-page":"422","DOI":"10.1145\/362686.362692","volume":"13","author":"BH Bloom","year":"1970","unstructured":"Bloom BH. Space\/time trade-offs in hash coding with allowable errors. Commun ACM. 1970;13(7):422\u20136.","journal-title":"Commun ACM"},{"key":"259_CR4","doi-asserted-by":"crossref","unstructured":"Bowe A, Onodera T, Sadakane K, Shibuya T. Succinct de Bruijn graphs. In: Proceedings of the 12th international workshop on algorithms in bioinformatics (WABI); 2012. p. 225\u201335.","DOI":"10.1007\/978-3-642-33122-0_18"},{"issue":"96","key":"259_CR5","first-page":"1","volume":"22","author":"K B\u0159inda","year":"2021","unstructured":"B\u0159inda K, Baym M, Kucherov G. Simplitigs as an efficient and scalable representation of de Bruijn graphs. Genome Biol. 2021;22(96):1.","journal-title":"Genome Biol."},{"issue":"5","key":"259_CR6","doi-asserted-by":"publisher","first-page":"582","DOI":"10.1093\/bioinformatics\/bti039","volume":"21","author":"D Campagna","year":"2005","unstructured":"Campagna D, Romualdi C, Vitulo N, Del Favero M, Lexa M, Cannata N, Valle G. RAP: a new computer program for de novo identification of repeated sequences in whole genomes. Bioinformatics. 2005;21(5):582\u20138.","journal-title":"Bioinformatics"},{"issue":"13","key":"259_CR7","doi-asserted-by":"publisher","first-page":"2067","DOI":"10.1093\/bioinformatics\/bth205","volume":"20","author":"M Chaisson","year":"2004","unstructured":"Chaisson M, Pevzner P, Tang H. Fragment assembly with short reads. Bioinformatics. 2004;20(13):2067\u201374.","journal-title":"Bioinformatics."},{"issue":"10","key":"259_CR8","doi-asserted-by":"publisher","first-page":"1569","DOI":"10.1093\/bioinformatics\/btv022","volume":"31","author":"S Deorowicz","year":"2015","unstructured":"Deorowicz S, Kokot M, Grabowski S, Debudaj-Grabysz A. KMC 2: fast and resource-frugal k-mer counting. Bioinformatics. 2015;31(10):1569\u201376.","journal-title":"Bioinformatics"},{"key":"259_CR9","doi-asserted-by":"crossref","unstructured":"Erbert M, Rechner S, M\u00fcller-Hannemann M. Gerbil: a fast and memory-efficient $$k$$-mer counter with GPU-support. Algorithms Mol Biol. 2017;12(1):9.","DOI":"10.1186\/s13015-017-0097-9"},{"issue":"249","key":"259_CR10","first-page":"1","volume":"21","author":"G Holley","year":"2020","unstructured":"Holley G, Melsted P. Bifrost: highly parallel construction and indexing of colored and compacted de Bruijn graphs. Genome Biol. 2020;21(249):1.","journal-title":"Genome Biol"},{"issue":"2","key":"259_CR11","doi-asserted-by":"publisher","first-page":"291","DOI":"10.1089\/cmb.1995.2.291","volume":"2","author":"RM Idury","year":"1995","unstructured":"Idury RM, Waterman MS. A new algorithm for DNA sequence assembly. J Comput Biol. 1995;2(2):291\u2013306.","journal-title":"J Comput Biol"},{"issue":"2","key":"259_CR12","doi-asserted-by":"publisher","first-page":"249","DOI":"10.1147\/rd.312.0249","volume":"31","author":"RM Karp","year":"1987","unstructured":"Karp RM, Rabin MO. Efficient randomized pattern-matching algorithms. IBM J Res Dev. 1987;31(2):249\u201360.","journal-title":"IBM J Res Dev"},{"key":"259_CR13","doi-asserted-by":"publisher","first-page":"R116","DOI":"10.1186\/gb-2010-11-11-r116","volume":"11","author":"DR Kelley","year":"2010","unstructured":"Kelley DR, Schatz MC, Salzberg SL. Quake: quality-aware detection and correction of sequencing errors. Genome Biol. 2010;11:R116.","journal-title":"Genome Biol"},{"issue":"Supplement\u20131","key":"259_CR14","doi-asserted-by":"publisher","first-page":"i177","DOI":"10.1093\/bioinformatics\/btab309","volume":"37","author":"J Khan","year":"2021","unstructured":"Khan J, Patro R. Cuttlefish: fast, parallel and low-memory compaction of de Bruijn graphs from large-scale genome collections. Bioinformatics. 2021;37(Supplement\u20131):i177-86.","journal-title":"Bioinformatics."},{"issue":"3","key":"259_CR15","doi-asserted-by":"publisher","first-page":"319","DOI":"10.1093\/bioinformatics\/btf843","volume":"19","author":"A Lefebvre","year":"2003","unstructured":"Lefebvre A, Lecroq T, Dauchel H, Alexandre J. FORRepeats: detects repeats on entire chromosomes and between genomes. Bioinformatics. 2003;19(3):319\u201326.","journal-title":"Bioinformatics"},{"key":"259_CR16","unstructured":"Li Y, Yan X. MSPKmerCounter: a fast and memory efficient approach for $$k$$-mer counting; 2015. arXiv:1505.06550."},{"issue":"12","key":"259_CR17","first-page":"giy125","volume":"7","author":"SC Manekar","year":"2018","unstructured":"Manekar SC, Sathe SR. A benchmark study of $$k$$-mer counting methods for high-throughput sequencing. GigaScience. 2018;7(12):giy125.","journal-title":"GigaScience"},{"issue":"6","key":"259_CR18","doi-asserted-by":"publisher","first-page":"764","DOI":"10.1093\/bioinformatics\/btr011","volume":"27","author":"G Mar\u00e7ais","year":"2011","unstructured":"Mar\u00e7ais G, Kingsford C. A fast, lock-free approach for efficient parallel counting of occurrences of $$k$$-mers. Bioinformatics. 2011;27(6):764\u201370.","journal-title":"Bioinformatics"},{"issue":"24","key":"259_CR19","doi-asserted-by":"publisher","first-page":"4024","DOI":"10.1093\/bioinformatics\/btw609","volume":"33","author":"I Minkin","year":"2016","unstructured":"Minkin I, Pham S, Medvedev P. TwoPaCo: an efficient algorithm to build the compacted de Bruijn graph from many complete genomes. Bioinformatics. 2016;33(24):4024\u201332.","journal-title":"Bioinformatics."},{"key":"259_CR20","doi-asserted-by":"publisher","first-page":"2537","DOI":"10.1038\/s41598-017-02487-5","volume":"7","author":"F-D Pajuste","year":"2017","unstructured":"Pajuste F-D, Kaplinski L, M\u00f6ls M, Puurand T, Lepamets M, Remm M. FastGT: an alignment-free method for calling common SNVs directly from raw sequencing reads. Sci Rep. 2017;7:2537.","journal-title":"Sci Rep"},{"issue":"17","key":"259_CR21","doi-asserted-by":"publisher","first-page":"9748","DOI":"10.1073\/pnas.171285098","volume":"98","author":"PA Pevzner","year":"2001","unstructured":"Pevzner PA, Tang H, Waterman MS. An Eulerian path approach to DNA fragment assembly. Proc Natl Acad Sci. 2001;98(17):9748\u201353.","journal-title":"Proc Natl Acad Sci"},{"issue":"Supplement-1","key":"259_CR22","doi-asserted-by":"publisher","first-page":"i185","DOI":"10.1093\/bioinformatics\/btac245","volume":"38","author":"GE Pibiri","year":"2022","unstructured":"Pibiri GE. Sparse and skew hashing of k-mers. Bioinformatics. 2022;38(Supplement-1):i185\u201394.","journal-title":"Bioinformatics"},{"issue":"Supplement\u20131","key":"259_CR23","doi-asserted-by":"publisher","first-page":"i534","DOI":"10.1093\/bioinformatics\/btad219","volume":"39","author":"GE Pibiri","year":"2023","unstructured":"Pibiri GE, Shibuya Y, Limasset A. Locality-preserving minimal perfect hashing of k-mers. Bioinformatics. 2023;39(Supplement\u20131):i534\u201343.","journal-title":"Bioinformatics"},{"issue":"4","key":"259_CR24","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1089\/cmb.2020.0431","volume":"28","author":"A Rahman","year":"2021","unstructured":"Rahman A, Medvedev P. Representation of k-mer sets using spectrum-preserving string sets. J Comput Biol. 2021;28(4):1.","journal-title":"J Comput Biol."},{"issue":"16","key":"259_CR25","doi-asserted-by":"publisher","first-page":"2476","DOI":"10.1093\/bioinformatics\/btab004","volume":"37","author":"M Rautiainen","year":"2021","unstructured":"Rautiainen M, Marschall T. MBG: minimizer-based sparse de Bruijn Graph construction. Bioinformatics. 2021;37(16):2476\u20138.","journal-title":"Bioinformatics"},{"issue":"5","key":"259_CR26","doi-asserted-by":"publisher","first-page":"652","DOI":"10.1093\/bioinformatics\/btt020","volume":"29","author":"G Rizk","year":"2013","unstructured":"Rizk G, Lavenier D, Chikhi R. DSK: $$k$$-mer counting with very low memory usage. Bioinformatics. 2013;29(5):652\u20133.","journal-title":"Bioinformatics"},{"key":"259_CR27","doi-asserted-by":"crossref","unstructured":"Schleimer S, Wilkerson DS, Aiken A. Winnowing: local algorithms for document fingerprinting. In: Proceedings of the 29th ACM SIGMOD international conference on management of data (SIGMOD); 2003. p. 76\u201385.","DOI":"10.1145\/872757.872770"},{"issue":"5","key":"259_CR28","first-page":"1","volume":"18","author":"S Schmidt","year":"2023","unstructured":"Schmidt S, Alanko JN. Eulertigs: minimum plain text representation of k-mer sets without repetitions in linear time. Algorithms Mol Biol. 2023;18(5):1.","journal-title":"Algorithms Mol Biol"},{"issue":"5","key":"259_CR29","first-page":"1","volume":"17","author":"Y Shibuya","year":"2022","unstructured":"Shibuya Y, Belazzougui KG. Space-efficient representation of genomic k-mer count tables. Algorithms Mol Biol. 2022;17(5):1.","journal-title":"Algorithms Mol Biol"},{"issue":"2","key":"259_CR30","doi-asserted-by":"publisher","DOI":"10.1093\/nar\/gku1187","volume":"43","author":"R Uricaru","year":"2015","unstructured":"Uricaru R, Rizk G, Lacroix V, Quillery E, Plantard O, Chikhi R, Lemaitre C, Peterlongo P. Reference-free detection of isolated SNPs. Nucl Acids Res. 2015;43(2): e11.","journal-title":"Nucl Acids Res"},{"issue":"3","key":"259_CR31","first-page":"05","volume":"22","author":"JS Wang","year":"2020","unstructured":"Wang JS, Chen LD, Wang G. CHTKC: a robust and efficient k-mer counting algorithm based on a lock-free chaining hash table. Brief Bioinform. 2020;22(3):05.","journal-title":"Brief Bioinform"},{"key":"259_CR32","doi-asserted-by":"publisher","first-page":"R46","DOI":"10.1186\/gb-2014-15-3-r46","volume":"15","author":"DE Wood","year":"2014","unstructured":"Wood DE, Salzberg SL. Kraken: ultrafast metagenomic sequence classification using exact alignments. Genome Biol. 2014;15:R46.","journal-title":"Genome Biol"}],"container-title":["Algorithms for Molecular Biology"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1186\/s13015-024-00259-1.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/link.springer.com\/article\/10.1186\/s13015-024-00259-1\/fulltext.html","content-type":"text\/html","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1186\/s13015-024-00259-1.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2024,4,5]],"date-time":"2024-04-05T08:02:52Z","timestamp":1712304172000},"score":1,"resource":{"primary":{"URL":"https:\/\/almob.biomedcentral.com\/articles\/10.1186\/s13015-024-00259-1"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,4,5]]},"references-count":32,"journal-issue":{"issue":"1","published-online":{"date-parts":[[2024,12]]}},"alternative-id":["259"],"URL":"https:\/\/doi.org\/10.1186\/s13015-024-00259-1","relation":{},"ISSN":["1748-7188"],"issn-type":[{"value":"1748-7188","type":"electronic"}],"subject":[],"published":{"date-parts":[[2024,4,5]]},"assertion":[{"value":"19 October 2023","order":1,"name":"received","label":"Received","group":{"name":"ArticleHistory","label":"Article History"}},{"value":"2 March 2024","order":2,"name":"accepted","label":"Accepted","group":{"name":"ArticleHistory","label":"Article History"}},{"value":"5 April 2024","order":3,"name":"first_online","label":"First Online","group":{"name":"ArticleHistory","label":"Article History"}},{"order":1,"name":"Ethics","group":{"name":"EthicsHeading","label":"Declarations"}},{"value":"The authors declare no competing interests.","order":2,"name":"Ethics","group":{"name":"EthicsHeading","label":"Competing interests"}}],"article-number":"14"}}