Approximate Pattern Matching Using Search Schemes and In-Text Verification
Luca Renders, Lore Depuydt, Jan Fostier · Zenodo (CERN European Organization for Nuclear Research) · 2022
Approximate pattern matching entails finding approximate occurrences of a search pattern P in a search text T. In a typical bioinformatics scenario, P is a DNA fragment (a read) and T a (collection of) reference genomes(s). Search schemes are an efficient computational technique that guarantee to exhaustively identify all occurrences within a pre-specified number of allowed errors (substitutions and indels). Using a bidirectional FM-index, they describe how to traverse the search space in such a way that runtime is minimized. Despite their optimal time complexity, basic operations on the FM-index require expensive random memory access. We examine whether in-text verification, in which a candidate occurrence is validated in the search text via a bit-parallel pairwise alignment approach, can be used to supplement in-index matching using search schemes. In comparison to pure in-index matching, we find that hybrid in-index/in-text matching can reduce running time by more than a factor of two. We introduce Columba 1.1, an open-source C++ software program that efficiently implements these ideas. Columba 1.1 can locate, within a maximum edit distance of 4, all occurrences of 100,000 reads (150 bp) in the human reference genome in about 30 seconds. This outperforms existing, state-of-the-art lossless alignment tools such as Bwolo, Yara and GEM and is comparable to the lossy aligner BWA in mem mode.