English

Faster Iterative $\phi$ Queries on the Positional BWT

Data Structures and Algorithms 2026-05-07 v1

Abstract

The Positional Burrows-Wheeler Transform (PBWT) is a fundamental data structure for the efficient representation and analysis of large-scale haplotype panels. For a panel of hh sequences {S1,,Sh}\{S_1, \dots, S_h\} over mm sites, a key operation is the ϕj(i)\phi_j(i) query, which returns the haplotype index immediately preceding SiS_i in co-lexicographic order at site jj. Efficient support for kk iterative queries ϕ1,,ϕk\phi^1, \dots, \phi^k is essential for haplotype matching and variation analysis. In this work, we introduce a simple and novel decomposition scheme that decomposes each haplotype row into sub-intervals, called refined segments, within which a haplotype's co-lexicographic predecessor for the sites remains unchanged. We show that refined segments satisfy two key properties: (i) each segment [b,e][b,e] associated with SiS_i overlaps with at most a constant number of segments of Sϕe(i)S_{\phi_e(i)}, and (ii) the total number of segments is bounded by O(r~+h)O(\tilde{r} + h), where r~\tilde{r} denotes the number of runs in the PBWT. Building on this decomposition, we present two space-time tradeoffs for supporting kk iterative ϕ\phi queries: (i) a structure using O((r~+h)logn)O((\tilde{r} + h)\log n) bits of space that answers kk iterative queries in O(loglogwmin(m,h)+k)O(\log \log_w \min(m,h) + k) time, where n=mhn = m \cdot h, and (ii) a more compact structure using O(r~logh+hlogn)O(\tilde{r} \log h + h \log n) bits of space that supports queries in O(kloglogwh)O(k \log \log_w h) time. Prior to our work, supporting these queries required O((r~+h)logn)O((\tilde{r} + h)\log n) bits of space and O(kloglogwm)O(k \cdot \log \log_w m) time. Our second tradeoff is expected to be effective in practice for modern genomic datasets, where the number hh of haplotypes is typically much smaller than the number mm of sites.

Keywords

Cite

@article{arxiv.2605.04244,
  title  = {Faster Iterative $\phi$ Queries on the Positional BWT},
  author = {Paola Bonizzoni and Travis Gagie and Younan Gao},
  journal= {arXiv preprint arXiv:2605.04244},
  year   = {2026}
}
R2 v1 2026-07-01T12:51:46.236Z