You are on page 1of 9

Unit No: 1: Pairwise Sequence Analysis

Lecture No: 6
Dynamic Programming
approach-Needleman Wunsch
Algorithm Problem solving
Needleman and Wunsch (global alignment)

Sequence 1: HEAGAWGHEE
Sequence 2: PAW H EAE

Scoring parameters: BLOSUM50

Gap penalty: Linear gap penalty of 8

2 Lecture 6 –Needleman Wunsch Algorithm Problem solving


Substitution Matrix - BLOSUM 50

H E A G A W G H E E
P -2 -1 -1 -2 -1 -4 -2 -2 -1 -1
A -2 -1 5 0 5 -3 0 -2 -1 -1
W -3 -3 -3 -3 -3 15 -3 -3 -3 -3
H 10 0 -2 -2 -2 -3 -2 10 0 0
E 0 6 -1 -3 -1 -3 -3 0 6 6
A -2 -1 5 0 5 -3 0 -2 -1 -1
E 0 6 -1 -3 -1 -3 -3 0 6 6

3 Lecture 6 –Needleman Wunsch Algorithm Problem solving


Basic principles of dynamic programming

- Creation of an alignment path matrix

- Stepwise calculation of score values

- Backtracking (evaluation of the optimal path)

4 Lecture 6 –Needleman Wunsch Algorithm Problem solving


Creation of an alignment path matrix

F(i, j) = F(i-1, j-1) + s(xi ,yj)


F(i, j) = max F(i, j) = F(i-1, j) - d
F(i, j) = F(i, j-1) - d

F(i-1, j-1) F(i-1, j)


s(xi ,yj) -d
F(i, j-1) F(i, j)
-d

5 Lecture 6 –Needleman Wunsch Algorithm Problem solving


Creation of an alignment path matrix

6 Lecture 6 –Needleman Wunsch Algorithm Problem solving


Creation of an alignment path matrix

7 Lecture 6 –Needleman Wunsch Algorithm Problem solving


Backtracking

8 Lecture 6 –Needleman Wunsch Algorithm Problem solving


Thank You

You might also like