1Bowtie conducts a quality-aware, greedy, randomized, depth-first search to find alignments that satisfy a specified alignment policy, allowing a limited number of mismatches and preferring those with low sum of quality values at mismatched positions.
“Our alignment policy allows a limited number of mismatches and prefers alignments where the sum of the quality values at all mismatched positions is low. The search proceeds similarly to EXACTMATCH, calculating matrix ranges for successively longer query suffixes. If the range becomes empty (a suffix does not occur in the text), then the algorithm may select an already-matched query position and substitute a different base there, introducing a mismatch into the alignment.”
2Bowtie uses backtracking to explore possible substitutions when a suffix range becomes empty, selecting only substitutions consistent with the alignment policy and yielding a modified suffix that occurs in the text, and greedily choosing positions with minimal quality values.
“If the range becomes empty (a suffix does not occur in the text), then the algorithm may select an already-matched query position and substitute a different base there, introducing a mismatch into the alignment. The EXACTMATCH search resumes from just after the substituted position. The algorithm selects only those substitutions that are consistent with the alignment policy and which yield a modified suffix that occurs at least once in the text. If there are multiple candidate substitution positions, then the algorithm greedily selects a position with a minimal quality value.”