230 likes | 509 Views
Dynamic Programming (DP). Three Steps: Initialization Matrix fill (scoring) Traceback (alignment) Global Alignment: Needleman-Wunsch Local Alignment: Smith-Waterman. G A A T T C A G T T A (sequence #1) G G A T C G A (sequence #2). http://www.avatar.se/molbioinfo2001/dynprog/dynamic.html.
E N D
Dynamic Programming (DP) • Three Steps: • Initialization • Matrix fill (scoring) • Traceback (alignment) • Global Alignment: Needleman-Wunsch • Local Alignment: Smith-Waterman
G A A T T C A G T T A (sequence #1) • G G A T C G A (sequence #2) http://www.avatar.se/molbioinfo2001/dynprog/dynamic.html
DP (Initialization) • Create N+1 by M+1 Matrix • M = Seq1 length = 11 • N = Seq2 length = 7 • Assuming no gap opening penalty, 0’s fill the first row and column G A A T T C A G T T A (Seq1) G G A T C G A (Seq2) http://www.avatar.se/molbioinfo2001/dynprog/dynamic.html
DP (Scoring) Simple Scoring Scheme • Si,j = 1 (Match) • Si,j = 0 (Mismatch) • w = 0 (Gap) http://www.avatar.se/molbioinfo2001/dynprog/dynamic.html
F(i-1, j-1) + s(xi, yi) F(i-1, j) - w F(i, j-1) - w F(i,j) = max F(i-1, j-1) F(i, j-1) s(xi, yi) - w F(i-1, j) F(i,j) - w DP (Scoring) Si,j = 1 (Match), Si,j = 0 (Mismatch), w = 0 (Gap) http://www.avatar.se/molbioinfo2001/dynprog/dynamic.html
F(i-1, j-1) + s(xi, yi) F(i-1, j) - w F(i, j-1) - w F(i,j) = max F(i-1, j-1) F(i, j-1) s(xi, yi) - w F(i-1, j) F(i,j) - w DP (Scoring) Si,j = 1 (Match), Si,j = 0 (Mismatch), w = 0 (Gap) http://www.avatar.se/molbioinfo2001/dynprog/dynamic.html
F(i-1, j-1) + s(xi, yi) F(i-1, j) - w F(i, j-1) - w F(i,j) = max F(i-1, j-1) F(i, j-1) s(xi, yi) - w F(i-1, j) F(i,j) - w DP (Scoring) Si,j = 1 (Match), Si,j = 0 (Mismatch), w = 0 (Gap) http://www.avatar.se/molbioinfo2001/dynprog/dynamic.html
F(i-1, j-1) + s(xi, yi) F(i-1, j) - w F(i, j-1) - w F(i,j) = max F(i-1, j-1) F(i, j-1) s(xi, yi) - w F(i-1, j) F(i,j) - w DP (Scoring) Si,j = 1 (Match), Si,j = 0 (Mismatch), w = 0 (Gap) http://www.avatar.se/molbioinfo2001/dynprog/dynamic.html
F(i-1, j-1) + s(xi, yi) F(i-1, j) - w F(i, j-1) - w F(i,j) = max F(i-1, j-1) F(i, j-1) s(xi, yi) - w F(i-1, j) F(i,j) - w DP (Scoring) Completed Matrix http://www.avatar.se/molbioinfo2001/dynprog/dynamic.html
DP (Traceback) G A A T T C A G T T A (Seq1) G G A T C G A (Seq2) http://www.avatar.se/molbioinfo2001/dynprog/dynamic.html
DP (Traceback) Seq1 A | Seq2 A G A A T T C A G T T A (Seq1) G G A T C G A (Seq2) http://www.avatar.se/molbioinfo2001/dynprog/dynamic.html
DP (Traceback) Seq1 T A | Seq2 _ A G A A T T C A G T T A (Seq1) G G A T C G A (Seq2) http://www.avatar.se/molbioinfo2001/dynprog/dynamic.html
DP (Traceback) Seq1 T T A | Seq2 _ _ A G A A T T C A G T T A (Seq1) G G A T C G A (Seq2) http://www.avatar.se/molbioinfo2001/dynprog/dynamic.html
DP (Traceback) Seq1 G A A T T C A G T T A | | | | | | Seq2 G G A _ T C _ G _ _ A G A A T T C A G T T A (Seq1) G G A T C G A (Seq2) http://www.avatar.se/molbioinfo2001/dynprog/dynamic.html
DP (Traceback) Alternative: Seq1 G _ A A T T C A G T T A | | | | | | Seq2 G G _ A _ T C _ G _ _ A G A A T T C A G T T A (Seq1) G G A T C G A (Seq2) http://www.avatar.se/molbioinfo2001/dynprog/dynamic.html
Basic Local Alignment Search Tool (BLAST) Heuristic Method
DNA vs DNA Protein vs Protein DNA vs Protein Protein vs DNA What can we search and compare?