1 / 45

Sequence Alignment

Sequence Alignment. Kun-Mao Chao ( 趙坤茂 ) Department of Computer Science and Information Engineering National Taiwan University, Taiwan WWW: http://www.csie.ntu.edu.tw/~kmchao. Useful Websites. MIT Biology Hypertextbook http://www.mit.edu:8001/afs/athena/course/other/esgbio/www/7001main.html

nalani
Download Presentation

Sequence Alignment

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. Sequence Alignment Kun-Mao Chao (趙坤茂) Department of Computer Science and Information Engineering National Taiwan University, Taiwan WWW: http://www.csie.ntu.edu.tw/~kmchao

  2. Useful Websites • MIT Biology Hypertextbook • http://www.mit.edu:8001/afs/athena/course/other/esgbio/www/7001main.html • The International Society for Computational Biology: • http://www.iscb.org/ • National Center for Biotechnology Information (NCBI, NIH): • http://www.ncbi.nlm.nih.gov/ • European Bioinformatics Institute (EBI): • http://www.ebi.ac.uk/ • DNA Data Bank of Japan (DDBJ): • http://www.ddbj.nig.ac.jp/

  3. orz’s sequence evolution • the origin? • their evolutionary relationships? • their putative functional relationships? • orz (kid) • OTZ (adult) • Orz (big head) • Crz (motorcycle driver) • on_ (soldier) • or2 (bottom up) • oΩ (back high) • STO (the other way around) • Oroz (me)

  4. What? THETR UTHIS MOREI MPORT ANTTH ANTHE FACTS The truth is more important than the facts.

  5. Dot Matrix C G G A T C A T Sequence A:CTTAACT Sequence B:CGGATCAT CTTAACT

  6. Pairwise Alignment Sequence A: CTTAACT Sequence B: CGGATCAT An alignment of A and B: C---TTAACTCGGATCA--T Sequence A Sequence B

  7. Pairwise Alignment Sequence A: CTTAACT Sequence B: CGGATCAT An alignment of A and B: Mismatch Match C---TTAACTCGGATCA--T Deletion gap Insertion gap

  8. Alignment Graph C G G A T C A T Sequence A: CTTAACT Sequence B: CGGATCAT CTTAACT C---TTAACTCGGATCA--T

  9. A simple scoring scheme • Match: +8 (w(x, y) = 8, if x = y) • Mismatch: -5 (w(x, y) = -5, if x ≠ y) • Each gap symbol: -3 (w(-,x)=w(x,-)=-3) C - - - T T A A C TC G G A T C A - - T +8 -3 -3 -3 +8 -5 +8 -3 -3 +8 = +12 Alignment score

  10. An optimal alignment-- the alignment of maximum score • Let A=a1a2…am and B=b1b2…bn . • Si,j: the score of an optimal alignment between a1a2…ai and b1b2…bj • With proper initializations, Si,j can be computedas follows.

  11. ComputingSi,j j w(ai,bj) w(ai,-) i w(-,bj) Sm,n

  12. Initializations C G G A T C A T CTTAACT

  13. S3,5 = ? C G G A T C A T CTTAACT

  14. S3,5 = 5 C G G A T C A T CTTAACT optimal score

  15. C T T A A C – TC G G A T C A T 8 – 5 –5 +8 -5 +8 -3 +8 = 14 C G G A T C A T CTTAACT

  16. Now try this example in class Sequence A: CAATTGA Sequence B: GAATCTGC Their optimal alignment?

  17. Initializations G A A T C T G C CAATTGA

  18. S4,2 = ? G A A T C T G C CAATTGA

  19. S5,5 = ? G A A T C T G C CAATTGA

  20. S5,5 = 14 G A A T C T G C CAATTGA optimal score

  21. C A A T - T G AG A A T C T G C -5 +8 +8 +8 -3 +8 +8 -5 = 27 G A A T C T G C CAATTGA

  22. Global Alignment vs. Local Alignment • global alignment: • local alignment:

  23. Maximum-sum interval • Given a sequence of real numbers a1a2…an, find a consecutive subsequence with the maximum sum. 9 –3 1 7 –15 2 3 –4 2 –7 6 –2 8 4 -9 For each position, we can compute the maximum-sum interval starting at that position in O(n) time. Therefore, a naive algorithm runs in O(n2) time.

  24. ai Maximum-sum interval(The recurrence relation) • Define S(i) to be the maximum sum of the intervals ending at position i. If S(i-1) < 0, concatenating ai with its previous interval gives less sum than ai itself.

  25. Maximum-sum interval(Tabular computation) 9 –3 1 7 –15 2 3 –4 2 –7 6 –2 8 4 -9 S(i) 9 6 7 14 –1 2 5 1 3 –4 6 4 12 16 7 The maximum sum

  26. Maximum-sum interval(Traceback) 9 –3 1 7 –15 2 3 –4 2 –7 6 –2 8 4 -9 S(i) 9 6 7 14 –1 2 5 1 3 –4 6 4 12 16 7 The maximum-sum interval: 6 -2 8 4

  27. An optimal local alignment • Si,j: the score of an optimal local alignment ending at ai and bj • With proper initializations, Si,j can be computedas follows.

  28. Match: 8 Mismatch: -5 Gap symbol: -3 local alignment C G G A T C A T CTTAACT

  29. Match: 8 Mismatch: -5 Gap symbol: -3 local alignment C G G A T C A T CTTAACT The best score

  30. A – C - TA T C A T 8-3+8-3+8 = 18 C G G A T C A T CTTAACT The best score

  31. Now try this example in class Sequence A: CAATTGA Sequence B: GAATCTGC Their optimal local alignment?

  32. Did you get it right? G A A T C T G C CAATTGA

  33. A A T – T GA A T C T G 8+8+8-3+8+8 = 37 G A A T C T G C CAATTGA

  34. Affine gap penalties • Match: +8 (w(a, b) = 8, if a = b) • Mismatch: -5 (w(a, b) = -5, if a ≠ b) • Each gap symbol: -3 (w(-,b) = w(a,-) = -3) • Each gap is charged an extra gap-open penalty: -4. -4 -4 C - - - T T A A C TC G G A T C A - - T +8 -3 -3 -3 +8 -5 +8 -3 -3 +8 = +12 Alignment score: 12 – 4 – 4 = 4

  35. Affine gap panalties • A gap of length k is penalized x + k·y. gap-open penalty • Three cases for alignment endings: • ...x...x • ...x...- • ...-...x gap-symbol penalty an aligned pair a deletion an insertion

  36. Affine gap penalties • Let D(i, j) denote the maximum score of any alignment between a1a2…ai and b1b2…bj endingwith a deletion. • Let I(i, j) denote the maximum score of any alignment between a1a2…ai and b1b2…bj endingwith an insertion. • Let S(i, j) denote the maximum score of any alignment between a1a2…ai and b1b2…bj.

  37. Affine gap penalties (A gap of length k is penalized x + k·y.)

  38. D D D I I I S S S Affine gap penalties -y w(ai,bj) -x-y D -x-y I S -y

  39. Constant gap penalties • Match: +8 (w(a, b) = 8, if a = b) • Mismatch: -5 (w(a, b) = -5, if a ≠ b) • Each gap symbol: 0 (w(-,b) = w(a,-) = 0) • Each gap is charged a constant penalty: -4. -4 -4 C - - - T T A A C TC G G A T C A - - T +8 0 0 0 +8 -5 +8 0 0 +8 = +27 Alignment score: 27 – 4 – 4 = 19

  40. Constant gap penalties • Let D(i, j) denote the maximum score of any alignment between a1a2…ai and b1b2…bj endingwith a deletion. • Let I(i, j) denote the maximum score of any alignment between a1a2…ai and b1b2…bj endingwith an insertion. • Let S(i, j) denote the maximum score of any alignment between a1a2…ai and b1b2…bj.

  41. Constant gap penalties

  42. Restricted affine gap panalties • A gap of length k is penalized x + f(k)·y. where f(k) = k for k <= c and f(k) = c for k > c • Five cases for alignment endings: • ...x...x • ...x...- • ...-...x • and 5. for long gaps an aligned pair a deletion an insertion

  43. Restricted affine gap penalties

  44. D(i, j) vs. D’(i, j) • Case 1: the best alignment ending at (i, j) with a deletion at the end has the last deletion gap of length <= c D(i, j) >= D’(i, j) • Case 2: the best alignment ending at (i, j) with a deletion at the end has the last deletion gap of length >= c D(i, j) <= D’(i, j)

  45. Max{S(i,j)-x-ky, S(i,j)-x-cy} S(i,j)-x-cy c k

More Related