Download presentation
Presentation is loading. Please wait.
Published byMorgan Spencer Modified over 8 years ago
1
Sequence Alignment Kun-Mao Chao ( 趙坤茂 ) Department of Computer Science and Information Engineering National Taiwan University, Taiwan E-mail: kmchao@csie.ntu.edu.tw WWW: http://www.csie.ntu.edu.tw/~kmchao
2
2 Bioinformatics
3
3 Bioinformatics and Computational Biology- Related Journals: Bioinformatics (previously called CABIOS) Bulletin of Mathematical Biology Genome Research Genomics IEEE/ACM Transactions on Computational Biology and Bioinformatics Journal of Bioinformatics and Computational Biology Journal of Computational Biology Journal of Molecular Biology Nature Nucleic Acid Research Science
4
4 Bioinformatics and Computational Biology- Related Conferences: Intelligent Systems for Molecular Biology (ISMB) Pacific Symposium on Biocomputing (PSB) The Annual International Conference on Research in Computational Molecular Biology (RECOMB) Workshop on Algorithms in Bioinformatics (WABI) The IEEE Computer Society Bioinformatics Conference (CSB)
5
5 Bioinformatics and Computational Biology-Related Books: Calculating the Secrets of Life: Applications of the Mathematical Sciences in Molecular Biology, by Eric S. Lander and Michael S. Waterman (1995) Introduction to Computational Biology: Maps, Sequences, and Genomes, by Michael S. Waterman (1995) Introduction to Computational Molecular Biology, by Joao Carlos Setubal and Joao Meidanis (1996) Algorithms on Strings, Trees, and Sequences: Computer Science and Computational Biology, by Dan Gusfield (1997) Computational Molecular Biology: An Algorithmic Approach, by Pavel Pevzner (2000) Introduction to Bioinformatics, by Arthur M. Lesk (2002)
6
6 Useful Websites MIT Biology Hypertextbook –http://www.mit.edu:8001/afs/athena/course/other/esgbio/www/ 7001main.htmlhttp://www.mit.edu:8001/afs/athena/course/other/esgbio/www/ 7001main.html The International Society for Computational Biology: –http://www.iscb.org/http://www.iscb.org/ National Center for Biotechnology Information (NCBI, NIH): –http://www.ncbi.nlm.nih.gov/http://www.ncbi.nlm.nih.gov/ European Bioinformatics Institute (EBI): –http://www.ebi.ac.uk/http://www.ebi.ac.uk/ DNA Data Bank of Japan (DDBJ): –http://www.ddbj.nig.ac.jp/http://www.ddbj.nig.ac.jp/
7
7 Sequence Alignment
8
8 Dot Matrix Sequence A : CTTAACT Sequence B : CGGATCAT C G G A T C A T CTTAACTCTTAACT
9
9 C---TTAACT CGGATCA--T Pairwise Alignment Sequence A: CTTAACT Sequence B: CGGATCAT An alignment of A and B: Sequence A Sequence B
10
10 C---TTAACT CGGATCA--T Pairwise Alignment Sequence A: CTTAACT Sequence B: CGGATCAT An alignment of A and B: Insertion gap Match Mismatch Deletion gap
11
11 Alignment Graph Sequence A: CTTAACT Sequence B: CGGATCAT C G G A T C A T CTTAACTCTTAACT C---TTAACT CGGATCA--T
12
12 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 T C G G A T C A - - T +8 -3 -3 -3 +8 -5 +8 -3 -3 +8 = +12 Alignment score
13
13 An optimal alignment -- the alignment of maximum score Let A=a 1 a 2 …a m and B=b 1 b 2 …b n. S i,j : the score of an optimal alignment between a 1 a 2 …a i and b 1 b 2 …b j With proper initializations, S i,j can be computed as follows.
14
14 Computing S i,j i j w(a i,-) w(-,b j ) w(a i,b j ) S m,n
15
15 Initializations 0-3-6-9-12-15-18-21-24 -3 -6 -9 -12 -15 -18 -21 C G G A T C A T CTTAACTCTTAACT
16
16 S 3,5 = ? 0-3-6-9-12-15-18-21-24 -3852-4-7-10-13 -6530-3741-2 -920-2-5? -12 -15 -18 -21 C G G A T C A T CTTAACTCTTAACT
17
17 S 3,5 = 5 0-3-6-9-12-15-18-21-24 -3852-4-7-10-13 -6530-3741-2 -920-2-55 9 -12-3-563076 -15-4-6-831-285 -18-7-9-110-2963 -21-10-12-14-386414 C G G A T C A T CTTAACTCTTAACT optimal score
18
18 C T T A A C – T C G G A T C A T 0-3-6-9-12-15-18-21-24 -3852-4-7-10-13 -6530-3741-2 -920-2-55 9 -12-3-563076 -15-4-6-831-285 -18-7-9-110-2963 -21-10-12-14-386414 C G G A T C A T CTTAACTCTTAACT 8 – 5 –5 +8 -5 +8 -3 +8 = 14
19
19 Now try this example in class Sequence A: CAATTGA Sequence B: GAATCTGC Their optimal alignment ?
20
20 Initializations 0-3-6-9-12-15-18-21-24 -3 -6 -9 -12 -15 -18 -21 G A A T C T G C CAATTGACAATTGA
21
21 S 4,2 = ? 0-3-6-9-12-15-18-21-24 -3-5-8-11-14-4-7-10-13 -6-830-3-6-9-12-15 -9-11011852-4 -12-14? -15 -18 -21 G A A T C T G C CAATTGACAATTGA
22
22 S 5,5 = ? 0-3-6-9-12-15-18-21-24 -3-5-8-11-14-4-7-10-13 -6-830-3-6-9-12-15 -9-11011852-4 -12-14-38191613107 -15-11-6516? -18 -21 G A A T C T G C CAATTGACAATTGA
23
23 S 5,5 = 14 0-3-6-9-12-15-18-21-24 -3-5-8-11-14-4-7-10-13 -6-830-3-6-9-12-15 -9-11011852-4 -12-14-38191613107 -15-11-651614242118 -18-7-921311213229 -21-101108182927 G A A T C T G C CAATTGACAATTGA optimal score
24
24 0-3-6-9-12-15-18-21-24 -3-5-8-11-14-4-7-10-13 -6-830-3-6-9-12-15 -9-11011852-4 -12-14-38191613107 -15-11-651614242118 -18-7-921311213229 -21-101108182927 G A A T C T G C CAATTGACAATTGA -5 +8 +8 +8 -3 +8 +8 -5 = 27 C A A T - T G A G A A T C T G C
25
25 Global Alignment vs. Local Alignment global alignment : local alignment :
26
26 An optimal local alignment S i,j : the score of an optimal local alignment ending at a i and b j With proper initializations, S i,j can be computed as follows.
27
27 local alignment 000000000 085200852 0530085313 0200085211 0000853? 0 0 0 C G G A T C A T CTTAACTCTTAACT Match: 8 Mismatch: -5 Gap symbol: -3
28
28 local alignment 000000000 085200852 0530085313 0200085211 00008531310 0000852118 08525313107 053021310818 C G G A T C A T CTTAACTCTTAACT Match: 8 Mismatch: -5 Gap symbol: -3 The best score
29
29 000000000 085200852 0530085313 0200085211 00008531310 0000852118 08525313107 053021310818 C G G A T C A T CTTAACTCTTAACT The best score A – C - T A T C A T 8-3+8-3+8 = 18
30
30 Now try this example in class Sequence A: CAATTGA Sequence B: GAATCTGC Their optimal local alignment ?
31
31 Did you get it right? 000000000 000008528 008855305 008161310742 005132421181512 002102119292623 08571816263734 0516131513233432 G A A T C T G C CAATTGACAATTGA
32
32 000000000 000008528 008855305 008161310741 005132421181512 002102119292623 08571816263734 0516131513233432 G A A T C T G C CAATTGACAATTGA A A T – T G A A T C T G 8+8+8-3+8+8 = 37
33
33 Affine gap penalties 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) Each gap is charged an extra gap-open penalty: -4. C - - - T T A A C T C G G A T C A - - T +8 -3 -3 -3 +8 -5 +8 -3 -3 +8 = +12 -4 Alignment score: 12 – 4 – 4 = 4
34
34 Affine gap panalties A gap of length k is penalized x + k·y. gap-open penalty gap-symbol penalty Three cases for alignment endings: 1....x...x 2....x...- 3....-...x an aligned pair a deletion an insertion
35
35 Affine gap penalties Let D(i, j) denote the maximum score of any alignment between a 1 a 2 …a i and b 1 b 2 …b j ending with a deletion. Let I(i, j) denote the maximum score of any alignment between a 1 a 2 …a i and b 1 b 2 …b j ending with an insertion. Let S(i, j) denote the maximum score of any alignment between a 1 a 2 …a i and b 1 b 2 …b j.
36
36 Affine gap penalties (A gap of length k is penalized x + k·y.)
37
37 Affine gap penalties SI D SI D SI D SI D -y -x-y -y w(a i,b j )
38
38 Constant gap penalties Match: +8 (w(x, y) = 8, if x = y) Mismatch: -5 (w(x, y) = -5, if x ≠ y) Each gap symbol: 0 (w(-,x)=w(x,-)=0) Each gap is charged a constant penalty: -4. C - - - T T A A C T C G G A T C A - - T +8 0 0 0 +8 -5 +8 0 0 +8 = +27 -4 Alignment score: 27 – 4 – 4 = 19
39
39 Constant gap penalties Let D(i, j) denote the maximum score of any alignment between a 1 a 2 …a i and b 1 b 2 …b j ending with a deletion. Let I(i, j) denote the maximum score of any alignment between a 1 a 2 …a i and b 1 b 2 …b j ending with an insertion. Let S(i, j) denote the maximum score of any alignment between a 1 a 2 …a i and b 1 b 2 …b j.
40
40 Constant gap penalties
41
41 Restricted affine gap panalties A gap of length k is penalized x + f(k)·y. where f(k) = k for k c Five cases for alignment endings: 1....x...x 2....x...- 3....-...x 4.and 5. for long gaps an aligned pair a deletion an insertion
42
42 Restricted affine gap penalties
43
43 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 = 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)
44
44 Max{S(i,j)-x-ky, S(i,j)-x-cy} k c
45
45 k best local alignments Smith-Waterman (Smith and Waterman, 1981; Waterman and Eggert, 1987) FASTA (Wilbur and Lipman, 1983; Lipman and Pearson, 1985) BLAST (Altschul et al., 1990; Altschul et al., 1997)
46
46 FASTA 1)Find runs of identities, and identify regions with the highest density of identities. 2)Re-score using PAM matrix, and keep top scoring segments. 3)Eliminate segments that are unlikely to be part of the alignment. 4)Optimize the alignment in a band.
47
47 FASTA Step 1: Find runes of identities, and identify regions with the highest density of identities. Sequence A Sequence B
48
48 FASTA Step 2: Re-score using PAM matrix, and keep top scoring segments.
49
49 FASTA Step 3: Eliminate segments that are unlikely to be part of the alignment.
50
50 FASTA Step 4: Optimize the alignment in a band.
51
51 BLAST Basic Local Alignment Search Tool (by Altschul, Gish, Miller, Myers and Lipman) The central idea of the BLAST algorithm is that a statistically significant alignment is likely to contain a high-scoring pair of aligned words.
52
52 The maximal segment pair measure A maximal segment pair (MSP) is defined to be the highest scoring pair of identical length segments chosen from 2 sequences. (for DNA: Identities: +5; Mismatches: -4) the highest scoring pair The MSP score may be computed in time proportional to the product of their lengths. (How?) An exact procedure is too time consuming. BLAST heuristically attempts to calculate the MSP score.
53
53 BLAST 1)Build the hash table for Sequence A. 2)Scan Sequence B for hits. 3)Extend hits.
54
54 BLAST Step 1: Build the hash table for Sequence A. (3-tuple example) For DNA sequences: Seq. A = AGATCGAT 12345678 AAA AAC.. AGA 1.. ATC 3.. CGA 5.. GAT 2 6.. TCG 4.. TTT For protein sequences: Seq. A = ELVIS Add xyz to the hash table if Score(xyz, ELV) ≧ T; Add xyz to the hash table if Score(xyz, LVI) ≧ T; Add xyz to the hash table if Score(xyz, VIS) ≧ T;
55
55 BLAST Step2: Scan sequence B for hits.
56
56 BLAST Step2: Scan sequence B for hits. Step 3: Extend hits. hit Terminate if the score of the sxtension fades away. (That is, when we reach a segment pair whose score falls a certain distance below the best score found for shorter extensions.) BLAST 2.0 saves the time spent in extension, and considers gapped alignments.
57
57 Remarks Filtering is based on the observation that a good alignment usually includes short identical or very similar fragments. The idea of filtration was used in both FASTA and BLAST.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.