1 / 74

Dynamic Programming for Pairwise Alignment 2

Dynamic Programming for Pairwise Alignment 2. Dr Alexei Drummond Department of Computer Science alexei@cs.auckland.ac.nz. Semester 2, 2006. Review. Dynamic programming algorithm for global alignment (Needleman & Wunsch) Given sequences: F(i,j) = score of best alignment between and.

avon
Download Presentation

Dynamic Programming for Pairwise Alignment 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Dynamic Programmingfor Pairwise Alignment 2 Dr Alexei Drummond Department of Computer Science alexei@cs.auckland.ac.nz Semester 2, 2006

  2. Review Dynamic programming algorithm for global alignment (Needleman & Wunsch) Given sequences: F(i,j) = score of best alignment between and

  3. Principle of Optimality Optimal alignment

  4. Principle of Optimality Optimal alignment Looks like ……

  5. Principle of Optimality Optimal alignment Looks like …… or ……………

  6. Principle of Optimality Optimal alignment Looks like …… or …………… or ……………

  7. Principle of Optimality Optimal alignment Looks like …… or …………… or …………… so ……………

  8. Basis

  9. Filling up table Y F matrix 0 1 2 n 0 1 2 Optimal alignment score X m

  10. Constructing alignment Y F matrix 0 1 2 n 0 1 2 Optimal alignment score X m

  11. Example Y F matrix 0 1 2 n 0 1 2 Optimal alignment score X m Y Alignment Alignment X

  12. Time and space 0 1 2 n 0 1 2 F matrix m table entries space Each entry computed in constant time time

  13. 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

  14. Recurrences Basis:

  15. Example

  16. Example Y Alignment X

  17. Repeated (local) matches Long sequences - interested in alllocal alignments with significant score, > threshold T. e.g. copies of repeated domain or motif in a protein. X = sequence containing motif Y = target sequence Y Matching parts of X Method is asymmetric

  18. Principle of Optimality Given sequences DefineF(i,j)(i ≥ 1) = best sum of match scores in and assuming is in a matched region and match ends in or

  19. Ends of matches best sum of completed match scores to is notin a matched region assuming that Row 0 therefore marks unmatched regions and ends of matches in Y.

  20. General recurrence Start of new match Extension of previous match

  21. Filling up table Y F matrix 0 1 2 n 0 1 2 X m

  22. Filling up table Y F matrix 0 1 2 n 0 1 2 X m

  23. Filling up table Y F matrix 0 1 2 n 0 1 2 X m

  24. Filling up table Y F matrix 0 1 2 n 0 1 2 X m

  25. Filling up table Y F matrix 0 1 2 n 0 1 2 X m

  26. Filling up table Y F matrix 0 1 2 n 0 1 2 X m

  27. Filling up table Y F matrix 0 1 2 n 0 1 2 X m

  28. Filling up table Y F matrix 0 1 2 n 0 1 2 X m

  29. Filling up table Y F matrix 0 1 2 n 0 1 2 X m

  30. Filling up table Y F matrix 0 1 2 n 0 1 2 X m

  31. Filling up table Y F matrix 0 1 2 n 0 1 2 Optimal Sum of alignment scores X m

  32. Example Extra cell for final total score

  33. Example Extra cell for final total score Y Alignment X

  34. Overlap matches Y Y X X Y Y X X Don’t penalize overhanging ends i.e. set F(i,0) = F(0,j) = 0 Otherwise

  35. Example

  36. Example Y Alignment X

  37. Affine gap penalities • Affine score:g(g) = -d- (g-1)e gap-open penality gap-extension penalty • Different penalties associated with extending alignment with gap symbol Y = C C T W P X = C S T W - Y = C C T W P X = C S T - - different from

  38. General recurrence Extend by matching Extend by matching suffix of Y to gap of length i-k Extend by matching suffix of X to gap of length j-k Problem: Procedure runs in worst-case time

  39. version Extra variables

  40. Recurrences aligned to start of gap aligned to continuation of gap aligned to start of gap aligned to continuation of gap Procedure runs in worst-case time

  41. Linear space alignment Y F matrix 0 1 2 n 0 1 2 X m

  42. Linear space alignment Y F matrix 0 1 2 n 0 1 2 X m

  43. Linear space alignment Y F matrix 0 1 2 n 0 1 2 X m

  44. Linear space alignment Y F matrix 0 1 2 n 0 1 2 X m

  45. Linear space alignment Y F matrix 0 1 2 n 0 1 2 X m

  46. Linear space alignment Y F matrix 0 1 2 n 0 1 2 X m

  47. Linear space alignment Y F matrix 0 1 2 n 0 1 2 X m

  48. Linear space alignment Y F matrix 0 1 2 n 0 1 2 X m

  49. Linear space alignment Y F matrix 0 1 2 n 0 1 2 X m

  50. Linear space alignment Y F matrix 0 1 2 n 0 1 2 X m

More Related