The open-closed mod-minimizer algorithm
Sampling algorithms that deterministically select a subset of <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>k</mml:mi></mml:math> -mers are an important building block in bioinformatics applications. For example, they are used to index large textual collections, like DNA, and to compare sequences quickly. In such applications, a sampling algorithm is required to select one <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>k</mml:mi></mml:math> -mer out of every window of w consecutive <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>k</mml:mi></mml:math> -mers. The folklore and most used scheme is the random minimizer that selects the smallest <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>k</mml:mi></mml:math> -mer in the window according to some random order. This scheme is remarkably simple and versatile, and has a density (expected fraction of selected <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mi>k</mml:mi></mml:math> -mers) of <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mn>2</mml:mn> <mml:mo>/</mml:mo> <mml:mo>(</mml:mo> <mml:mi>w</mml:mi> <mml:mo>+</mml:mo> <mml:mn>1</mml:mn> <mml:mo>)</mml:mo></mml:mrow> </mml:math> . In practice, lower density leads to faster methods and smaller indexes, and it turns out that the random minimizer is not the best one can do. Indeed, some schemes are known to approach optimal density 1/w when <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mi>k</mml:mi> <mml:mo>→</mml:mo> <mml:mi>∞</mml:mi></mml:mrow> </mml:math> , like the recently introduced mod-minimizer (Groot Koerkamp and Pibiri, WABI 2024). In this work, we study methods that achieve low density when <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mi>k</mml:mi> <mml:mo>≤</mml:mo> <mml:mi>w</mml:mi></mml:mrow> </mml:math> . In this small-k regime, a practical method with provably better density than the random minimizer is the miniception (Zheng et al., Bioinformatics 2021). This method can be elegantly described as sampling the smallest closed sycnmer (Edgar, PeerJ 2021) in the window according to some random order. We show that extending the miniception to prefer sampling open syncmers yields much better density. This new method-the open-closed minimizer-offers improved density for small <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mi>k</mml:mi> <mml:mo>≤</mml:mo> <mml:mi>w</mml:mi></mml:mrow> </mml:math> while being as fast to compute as the random minimizer. Compared to methods based on decycling sets, that achieve very low density in the small-k regime, our method has comparable density while being computationally simpler and intuitive. Furthermore, we extend the mod-minimizer to improve density of any scheme that works well for small k to also work well when <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mi>k</mml:mi> <mml:mo>></mml:mo> <mml:mi>w</mml:mi></mml:mrow> </mml:math> is large. We hence obtain the open-closed mod-minimizer, a practical method that improves over the mod-minimizer for all k.
Authors
- Giulio Ermanno Pibiri (ORCID: https://orcid.org/0000-0003-0724-7092)
- Ragnar Groot Koerkamp (ORCID: https://orcid.org/0000-0002-2091-1237)
- Daniel Liu (ORCID: https://orcid.org/0000-0002-2385-2957)
Institutions
- Istituto di Scienza e Tecnologie dell'Informazione "Alessandro Faedo" (IT)
- Ca' Foscari University of Venice (IT)
- University of California, Los Angeles (US)
- ETH Zurich (CH)
Publication Details
- Journal
- Algorithms for Molecular Biology
- Published
- 2025-03-17
- DOI
- https://doi.org/10.1186/s13015-025-00270-0
- Citations
- 6
- Primary Topic
- Machine Learning and Algorithms
- Type
- article
- Field-Weighted Citation Impact
- 14.89