Dynamic Programming for Pairwise Alignment. Dr Alexei Drummond Department of Computer Science alexei@cs.auckland.ac.nz. BIOSCI 359, Semester 2, 2006. Dynamic Programming. method for solving combinatorial optimisation problems guaranteed to give optimal solution
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation
Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement.Téléchargez la présentation en cliquant sur ce lien.Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.
Dynamic Programming • method for solving combinatorial optimisation problems • guaranteed to give optimal solution • generalisation of “divide-and-conquer” • relies on “Principle of Optimality” i.e. sub-optimal solution of subproblem cannot be part of optimal solution of original problem instance.
Key to efficiency • computation is carried out bottom-up • store solutions to subproblems in a table • all possible subproblems solved once each, beginning with smallest subproblems • work up to original problem instance • only optimal solutions to subproblems are used to compute solution to problem at next level • DO NOT carry out computation in recursive, top-down manner • same subproblems would be solved many times
Pairwise alignment Sequences x = a c g g t s y = a w g c c t t Alignment x¢ = a – c g g – t s y¢ = a w – g c c t t
Scoring • Numeric score associated with each column • Total score = sum of column scores • Column types: • Identical (+ve) (2) Conservative (+ve) (3) Non-conservative (-ve) (4) Gap (-ve) x¢ = a – c g g– t s y¢ = a w – g cc t t
Gap penalties • Linear score:g(g) = -gd gap penality • Affine score:g(g) = -d- (g-1)e gap-open penality gap-extension penalty y¢ ---------- x¢ g
Needleman & Wunsch algorithm • Dynamic programming algorithm for global alignment • Needleman & Wunsch (‘70), modified Gotoh (‘82) • Assumptions: • Linear gap score d • Symmetric scoring matrix S • s(a,b) = s(b,a) score from lining up a and b • s(a,-) = s(-,a) = -d score from lining up a with -
Principle of Optimality Given sequences: Define: F(i,j) = score of best alignment between and
Example Y F matrix 0 1 2 n 0 1 2 Optimal alignment score X m
Example Y F matrix 0 1 2 n 0 1 2 Optimal alignment score X m Y Alignment X
Example Y F matrix 0 1 2 n 0 1 2 Optimal alignment score X m Y Alignment X
Example Y F matrix 0 1 2 n 0 1 2 Optimal alignment score X m Y Alignment X
Example Y F matrix 0 1 2 n 0 1 2 Optimal alignment score X m Y Alignment X
Example Y F matrix 0 1 2 n 0 1 2 Optimal alignment score X m Y Alignment X
Example Y F matrix 0 1 2 n 0 1 2 Optimal alignment score X m Y Alignment X
Example Y F matrix 0 1 2 n 0 1 2 Optimal alignment score X m Y Alignment X
Example Y F matrix 0 1 2 n 0 1 2 Optimal alignment score X m Y Alignment X
Example Y F matrix 0 1 2 n 0 1 2 Optimal alignment score X m Y Alignment X
Example Y F matrix 0 1 2 n 0 1 2 Optimal alignment score X m Y Alignment X
Example Y F matrix 0 1 2 n 0 1 2 Optimal alignment score X m Y Alignment X
Time and space 0 1 2 n 0 1 2 F matrix m table entries space Each entry computed in constant time time
Smith & Waterman algorithm Computes local alignment. i.e. look for best alignment of subsequences of X and Y, ignoring scores of regions on either side Y X Best subsequence alignment
Principle of Optimality Given sequences DefineF(i,j) = score of best suffix alignment between and N.B. Includes empty alignment with score 0