Introduction
Sequence alignment is a fundamental tool in molecular and evolutionary biology, used to quantify similarity between DNA, RNA, or protein sequences. While Dynamic Programming (DP) algorithms like Needleman-Wunsch and Smith-Waterman are highly accurate, they often prioritize numerical scores by inserting or deleting bases (gaps), which can obscure the primary biological information. Furthermore, standard implementations typically return a single optimal path, even when multiple paths yield the same score. This paper proposes an optimization algorithm using a binary path matrix to track all optimal alignment paths simultaneously, bridging the gap between global and local alignment.
Methodology
The Scoring and Binary Path Matrices
The proposed method enhances the classic DP framework by constructing two matrices in parallel: a scoring matrix ($M$) and a binary path matrix ($L$). The scoring matrix follows standard DP rules to calculate alignment scores based on matches, mismatches, and gaps.
Simultaneously, the binary path matrix ($L$) encodes the directional source of each score using bit-flags:
- 1 ($2^0$): Diagonal (match/mismatch)
- 2 ($2^1$): Horizontal (gap in sequence 1)
- 4 ($2^2$): Vertical (gap in sequence 2)
If multiple directions result in the same maximum score for a cell, their corresponding flags are summed. For instance, a value of 3 indicates that both diagonal and horizontal moves are optimal. This encoding allows the matrix to store every possible optimal path in a single pass.
Multi-Path Backtracking and Stem Filtration
After matrix construction, the algorithm backtracks from the highest score to extract all optimal alignments. To select the most biologically relevant alignment from the resulting set, the authors introduce a stem region filtration technique. A "stem" is defined as a continuous sequence of successful matches. The heuristic assumes that biological sequences are more likely to share long, continuous regions of similarity rather than fragmented matches. Alignments with fewer, longer stem regions are prioritized.
Results and Discussion
The algorithm was evaluated using synthetic sequences and microRNA data from miRBase.
Comparative Performance
In tests against established benchmarks like BLAST, Needleman-Wunsch, and Smith-Waterman, the proposed method consistently identified a higher number of identical base pairs. In a comparison of two 22-base sequences, the binary path approach found 19 identical pairs, outperforming Needleman-Wunsch (18), Smith-Waterman (17), and BLAST (15).
MicroRNA Benchmarking
Using microRNA pairs from miRBase, the algorithm demonstrated superior information preservation. For the hsa-miR-452/484 pair, it identified 45 matches, significantly more than the 34 matches found by the standard Needleman-Wunsch algorithm. This suggests that the binary path approach better maintains the "basic information presence" of the original sequences.
Conclusion and Future Work
By utilizing a binary path matrix and stem-based filtration, this algorithm provides a more comprehensive view of sequence similarity than traditional single-path methods. It effectively performs local and global alignment tasks simultaneously while maximizing the preservation of identical bases.
However, the approach faces challenges with branching complexity. As sequence length increases, the number of potential optimal paths can grow exponentially, increasing computational overhead. Future research will focus on optimizing branch pruning and exploring hardware acceleration to handle large-scale genomic datasets. Extending this framework to multiple sequence alignment (MSA) remains a key objective for future development.
Summary updated