Dynamic Programing

Dynamic Programing Dynamic Programing

biochemistry.utoronto.ca
from biochemistry.utoronto.ca More from this publisher
03.01.2015 Views

Needleman-Wunsch Algorithm (Cont.) A dynamic programming algorithm for optimal global alignment Given: Two sequences V = (v1v2...vn) and W =(w1w2...wm). (|V| = n and |W|= m) Goal: Find the best scoring alignment in which all residues of both sequences are included. The score is usually a measure of similarity. Requirement: - A matrix NW of optimal scores of subsequence alignments. NW has size (n+1)x(m+1). - Score matrix - Defined gap penalty

Needleman-Wunsch Algorithm (Cont.) Calculation Let NW(i,j) be the optimal alignment score of aligning V[1...i] and W[1...j] 0 w1 ... wj ... wm v1 : (I) +s(vi, wj) (III) +gap vi (II) +gap : vn Optimal alignment score

Needleman-Wunsch Algorithm (Cont.)<br />

Calculation<br />

Let NW(i,j) be the optimal alignment score of aligning V[1...i] and W[1...j]<br />

0<br />

w1 ... wj ... wm<br />

v1<br />

:<br />

(I)<br />

+s(vi, wj)<br />

(III)<br />

+gap<br />

vi<br />

(II)<br />

+gap<br />

:<br />

vn<br />

Optimal<br />

alignment<br />

score

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!