Theseus: fast and optimal affine-gap sequence-to-graph alignment
Albert Jiménez-Blanco1,2, Lorién López-Villellas3, Juan Carlos Moure4
1Department of Computer Science, Universitat Politècnica de Catalunya, Barcelona, 08034, Spain.
Motivation:
Sequence-to-graph alignment is a central problem in bioinformatics, with applications in multiple sequence alignment (MSA) and pangenome analysis, among others. However, current algorithms for optimal affine-gap alignment impose high memory and computational requirements, limiting their scalability to aligning long sequences to complex graphs. Practical solutions partially address this problem using heuristic strategies that ultimately trade off optimality for speed.
Results:
This work presents Theseus, a novel, fast, and optimal affine-gap sequence-to-graph alignment algorithm. Theseus leverages similarities between genomic sequences to accelerate the alignment computation and reduces the overall memory requirements without compromising optimality. To that end, Theseus processes only a subset of the dynamic programming cells, using a sparse-data strategy that enables efficient sequence-to-graph alignment. Moreover, our algorithm supports optimal affine-gap alignment on arbitrary directed graphs, including those with cycles. We evaluate Theseus on two key problems: MSA and pangenome read mapping. For MSA, we compare it against SPOA, abPOA, and POASTA. Theseus is 1.6× to 17.6× faster than POASTA, and 7.3× faster, on average, than SPOA, both optimal aligners. Compared with abPOA, Theseus ensures optimality and scales to the largest problems. For pangenome read mapping, we benchmark Theseus against the alignment stage of the mapping tool vg map, along with the alignment kernels of SPOA, abPOA, and POASTA. Theseus outperforms the other methods, showing a 1.9× to 16.9× speedup on short reads. Moreover, Theseus is 1.5× to 36.3× faster than vg when aligning against synthetic cyclic graphs.
Availability And Implementation:
Theseus code and documentation are publicly available at https://github.com/albertjimenezbl/theseus-lib.
Related Concept Videos
Convergence of Sequences
Maxam-Gilbert Sequencing
Challenges of the Maxam-Gilbert Method
The...
Divergence Theorem in 3D Space
Geometric Sequences
Parallel-axis Theorem
Graphical Representation of Inequalities


