Optimal gap-affine alignment in O(s) space
Santiago Marco‐SolaiD, Jordan M. EizengaiD, Andrea GuarracinoiD, Benedict PateniD, Erik P. GarrisoniD, Miquel MoretóiD
Abstract
MotivationPairwise sequence alignment remains a fundamental problem in computational biology and bioinformatics. Recent advances in genomics and sequencing technologies demand faster and scalable algorithms that can cope with the ever-increasing sequence lengths. Classical pairwise alignment algorithms based on dynamic programming are strongly limited by quadratic requirements in time and memory. The recently proposed wavefront alignment algorithm (WFA) introduced an efficient algorithm to perform exact gap-affine alignment in O(ns) time, where s is the optimal score and n is the sequence length. Notwithstanding these bounds, WFAs O(s2) memory requirements become computationally impractical for genome-scale alignments, leading to a need for further improvement. ResultsIn this paper, we present the bidirectional WFA algorithm (BiWFA), the first gap-affine algorithm capable of computing optimal alignments in O(s) memory while retaining WFAs time complexity of O(ns). As a result, this work improves the lowest known memory bound O(n) to compute gap-affine alignments. In practice, our implementation never requires more than a few hundred MBs aligning noisy Oxford Nanopore Technologies reads up to 1 Mbp long while maintaining competitive execution times. AvailabilityAll code is publicly available at https://github.com/smarco/BiWFA-paper Contactsantiagomsola@gmail.com
02 /Specification & Classification
Click any tag to browse matching papers- Citations
- 67
- FWCI
- 5.84
- Field percentile
- top 3%
- Approach
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.
Related papers
- Improving the time and space complexity of the WFA algorithm and generalizing its scoring
Jordan M. Eizenga, Benedict Paten·bioRxiv·Jan 12, 2022
- WFA-GPU: Gap-affine pairwise alignment using GPUs
Quim Aguado-Puig, Max Doblas, … Miquel Moretó·bioRxiv·Apr 18, 2022
- Singletrack: An Algorithm for Improving Memory Consumption and Performance of Gap-Affine Sequence Alignment
Lorién López‐Villellas, Cristian Iñiguez, … Santiago Marco‐Sola·BioinformaticsPeer-reviewed·Apr 10, 2026
- Fast and exact gap-affine partial order alignment with POASTA
Lucas R. van Dijk, Abigail L. Manson, … Thomas Abeel·BioinformaticsPeer-reviewed·Dec 26, 2024
- Theseus: Fast and Optimal Affine-Gap Sequence-to-Graph Alignment
Albert Jiménez-Blanco, Lorién López‐Villellas, … Santiago Marco‐Sola·BioinformaticsPeer-reviewed·Jul 25, 2026
- Block aligner: fast and flexible pairwise sequence alignment with SIMD-accelerated adaptive blocks
Daniel Liu, Martin Steinegger·bioRxiv·Nov 8, 2021