Find the best local alignment between two sequences using dynamic programming. Ideal for identifying similar regions in divergent sequences.
The Smith-Waterman algorithm is a dynamic programming method for finding the optimal local alignment between two sequences. Unlike global alignment, it identifies the best matching subsequences, making it ideal for finding similar regions in otherwise divergent sequences.
Simple steps to find local alignments:
This tool is essential for:
Sample sequences for alignment:
Sequence 1: AAAAACGTACGTTTAAA
Sequence 2: CCCCCGTACGTCCCCC
The algorithm will find "CGTACGT" as the best local match.
Expected local alignment:
Seq1: CGTACGT
|||||||
Seq2: CGTACGT
Score: 14, Identity: 100%
Only the best matching region is aligned.
Q: How does this differ from Needleman-Wunsch?
A: Smith-Waterman finds the best local alignment (subsequence), while Needleman-Wunsch aligns entire sequences globally.
Q: Why are negative scores set to zero?
A: This allows the algorithm to start fresh alignments, finding only the best local regions without penalty from surrounding mismatches.