henhaobio
Sign in

bioRxivBioinformaticsPreprint

Optimized k-mer search across millions of bacterial genomes on laptops

Francesca BrunettiiD, Karel BřindaiD

PDFDOI

Abstract

Comprehensive bacterial collections have reached millions of genomes, opening new opportunities for point-of-care diagnostics and epidemiological surveillance. However, local real-time search over such collections on commodity hardware remains difficult. Currently, only LexicMap and Phylign enable local search and alignment at such a scale; among them, only Phylign is designed to run on laptops, via a subindex approach informed by phylogenetic compression. However, Phyligns performance deteriorates on long and divergent queries because it uses COBS as a k-mer-based prefilter before alignment with Minimap2. Meanwhile, recent k-mer indexes such as Fulgor and Themisto have emerged, but there is no practical methodology for selecting, combining, and parameterizing them for phylogenetically partitioned million-genome search under constraints. Here, we develop an end-to-end methodology for k-mer matching in phylogenetically compressed bacterial collections. We formalize a matching strategy defined by matching mode, query type, and reference characteristics, and use this to shortlist candidate indexes and benchmark them under space-time trade-offs. As a case study, we address plasmid search over AllTheBacteria, compare multiple index types, and identify configurations optimizing the Pareto frontier of space and speed. Guided by these results, we implement a phylogenetically compressed variant of Fulgor, integrate it into Phylign, and obtain Phylign-Fulgor, a laptop-ready pipeline for million-genome search. On the 661k collection, Phylign-Fulgor makes the prefiltering step [~]4x faster than Phylign-COBS at the cost of a 1.2x larger index. On AllTheBacteria, its k-mer filter is 20x-300x faster in real time than LexicMaps alignment-based search and uses [~]20x smaller disk space. The full Phylign-Fulgor workflow including Minimap2 alignments is slower than LexicMap for a single plasmid but competitive or faster for batched plasmid queries. Phylign-Fulgor has comparable matching sensitivity to LexicMap, is less sensitive at the alignment level, but always stays within a laptop RAM budget ([~]5x-20x lower memory than LexicMap).

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.

Similarity Map
SelectedSame fieldCross-field
THISBřinda '25Fan '24Alanko '23Shen '25Levallois '26Şapcı '26
70% semantic matchBioinformatics
Karel Břinda, Leandro Lima, Simone Pignotti+6 more·Nature Methods·Apr 1, 2025· 28 citations