Engineering rank queries on bit vectors and strings
Adding rank support to strings over a fixed-sized alphabet has numerous applications. Prominent among those is the (bidirectional) FM-Index which is commonly utilized to index and analyze genomic data. At its core lies the rank operation on the Burrows-Wheeler-Transform (BWT) which, given a position in the BWT and a character, answers how often the specified character appears from the start to that position. Implementing those rank queries is usually based on bit vectors with rank support. In this work, we discuss three implementation improvements. First, a novel approach named paired-blocks that reduces the space overhead of the support structure by half to a total of only <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mn>1.6</mml:mn> <mml:mo>%</mml:mo></mml:mrow> </mml:math> . Second, a method for masking bits for the population count (also known as popcount) which greatly improves the runtime of 512-bit wide blocks in conjunction with AVX512 SIMD extensions. Third, a revised method for EPR-dictionaries (Pockrandt et al. in International conference on research in computational molecular biology. Springer, New York, 2017) called flattened bit vectors (fBV) with less space consumption and faster rank operations on strings, which is competitive in size and depending on the parameters between <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mn>2</mml:mn> <mml:mo>×</mml:mo></mml:mrow> </mml:math> and <mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:mn>9</mml:mn> <mml:mo>×</mml:mo></mml:mrow> </mml:math> faster than Wavelet Trees (Gog et al. in 13th International Symposium on Experimental Algorithms. Springer, New York, 2014).
Authors
- Knut Reinert (ORCID: https://orcid.org/0000-0003-3078-8129)
- Simon Gene Gottlieb
Institutions
- Berlin Mathematical School (DE)
- Max Planck Institute for Molecular Genetics (DE)
- Freie Universität Berlin (DE)
Publication Details
- Journal
- Algorithms for Molecular Biology
- Published
- 2025-12-11
- DOI
- https://doi.org/10.1186/s13015-025-00291-9
- Primary Topic
- Algorithms and Data Compression
- Type
- article
- Field-Weighted Citation Impact
- 0.00