Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 6293 Advanced Topics: Current Bioinformatics Lectures 3-4: Pair-wise Sequence Alignment.

Similar presentations


Presentation on theme: "CS 6293 Advanced Topics: Current Bioinformatics Lectures 3-4: Pair-wise Sequence Alignment."— Presentation transcript:

1 CS 6293 Advanced Topics: Current Bioinformatics Lectures 3-4: Pair-wise Sequence Alignment

2 Outline Biological background Global sequence alignment Local sequence alignment Optional: linear-space alignment algorithm Heuristic alignment: BLAST

3 Evolution at the DNA level …ACGGTGCAGTCACCA… …ACGTTGC-GTCCACCA… C DNA evolutionary events (sequence edits): Mutation, deletion, insertion

4 Sequence conservation implies function OK X X Still OK? next generation

5 Why sequence alignment? Conserved regions are more likely to be functional –Can be used for finding genes, regulatory elements, etc. Similar sequences often have similar origin and function –Can be used to predict functions for new genes / proteins Sequence alignment is one of the most widely used computational tools in biology

6 Global Sequence Alignment -AGGCTATCACCTGACCTCCAGGCCGA--TGCCC--- TAG-CTATCAC--GACCGC--GGTCGATTTGCCCGAC Definition An alignment of two strings S, T is a pair of strings S ’, T ’ (with spaces) s.t. (1) |S ’ | = |T ’ |, and (|S| = “ length of S ” ) (2) removing all spaces in S ’, T ’ leaves S, T AGGCTATCACCTGACCTCCAGGCCGATGCCC TAGCTATCACGACCGCGGTCGATTTGCCCGAC S T S’ T’

7 What is a good alignment? Alignment: The “ best ” way to match the letters of one sequence with those of the other How do we define “ best ” ?

8 The score of aligning (characters or spaces) x & y is σ (x,y). Score of an alignment: An optimal alignment: one with max score S’: -AGGCTATCACCTGACCTCCAGGCCGA--TGCCC--- T’: TAG-CTATCAC--GACCGC--GGTCGATTTGCCCGAC

9 Scoring Function Sequence edits: AGGCCTC –Mutations AGGACTC –InsertionsAGGGCCTC –DeletionsAGG-CTC Scoring Function: Match: +m~~~AAC~~~ Mismatch: -s~~~A-A~~~ Gap (indel):-d

10 Match = 2, mismatch = -1, gap = -1 Score = 3 x 2 – 2 x 1 – 1 x 1 = 3

11 More complex scoring function Substitution matrix –Similarity score of matching two letters a, b should reflect the probability of a, b derived from the same ancestor –It is usually defined by log likelihood ratio –Active research area. Especially for proteins. –Commonly used: PAM, BLOSUM

12 An example substitution matrix ACGT A3-2-2 C3 G3-2 T3

13 How to find an optimal alignment? A naïve algorithm: for all subseqs A of S, B of T s.t. |A| = |B| do align A[i] with B[i], 1 ≤i ≤|A| align all other chars to spaces compute its value retain the max end output the retained alignment S = abcd A = cd T = wxyz B = xz -abc-d a-bc-d w--xyz -w-xyz

14 Analysis Assume |S| = |T| = n Cost of evaluating one alignment: ≥n How many alignments are there: –pick n chars of S,T together –say k of them are in S –match these k to the k unpicked chars of T Total time: E.g., for n = 20, time is > 2 40 >10 12 operations

15 Dynamic Programming for sequence alignment Suppose we wish to align x 1 ……x M y 1 ……y N Let F(i,j) = optimal score of aligning x 1 ……x i y 1 ……y j Scoring Function: Match: +m Mismatch: -s Gap (indel):-d

16 Elements of dynamic programming Optimal sub-structures –Optimal solutions to the original problem contains optimal solutions to sub-problems Overlapping sub-problems –Some sub-problems appear in many solutions Memorization and reuse –Carefully choose the order that sub-problems are solved

17 Optimal substructure If x[i] is aligned to y[j] in the optimal alignment between x[1..M] and y[1..N], then The alignment between x[1..i] and y[1..j] is also optimal Easy to prove by contradiction... 12iM 12 j N x:x: y:y:

18 Recursive solution Notice three possible cases: 1.x M aligns to y N ~~~~~~~ x M ~~~~~~~ y N 2.x M aligns to a gap ~~~~~~~ x M ~~~~~~~  3.y N aligns to a gap ~~~~~~~  ~~~~~~~ y N m, if x M = y N F(M,N) = F(M-1, N-1) + -s, if not F(M,N) = F(M-1, N) - d F(M,N) = F(M, N-1) - d max

19 Recursive solution Generalize: F(i-1, j-1) +  (X i,Y j ) F(i,j) = max F(i-1, j) – d F(i, j-1) – d  (X i,Y j ) = m if X i = Y j, and –s otherwise Boundary conditions: –F(0, 0) = 0. –F(0, j) = ? –F(i, 0) = ? -jd: y[1..j] aligned to gaps. -id: x[1..i] aligned to gaps.

20 What order to fill? F(0,0) F(M,N) F(i, j)F(i, j-1) F(i-1, j)F(i-1, j-1) 1 12 3 i j

21 What order to fill? F(0,0) F(M,N)

22 Example x = AGTAm = 1 y = ATAs = 1 d = 1 AGTA A T A F(i,j) i = 0 1 2 3 4 j = 0 1 2 3

23 Example x = AGTAm = 1 y = ATAs = 1 d = 1 AGTA 0-2-3-4 A T-2 A-3 j = 0 1 2 3 F(i,j) i = 0 1 2 3 4

24 Example x = AGTAm = 1 y = ATAs = 1 d = 1 AGTA 0-2-3-4 A10 -2 T A-3 j = 0 1 2 3 F(i,j) i = 0 1 2 3 4

25 Example x = AGTAm = 1 y = ATAs = 1 d = 1 AGTA 0-2-3-4 A10 -2 T 0010 A-3 j = 0 1 2 3 F(i,j) i = 0 1 2 3 4

26 Example x = AGTAm = 1 y = ATAs = 1 d = 1 AGTA 0-2-3-4 A10 -2 T 0010 A-3 02 j = 0 1 2 3 Optimal Alignment: F(4,3) = 2 F(i,j) i = 0 1 2 3 4

27 Example x = AGTAm = 1 y = ATAs = 1 d = 1 AGTA 0-2-3-4 A10 -2 T 0010 A-3 02 j = 0 1 2 3 Optimal Alignment: F(4,3) = 2 This only tells us the best score F(i,j) i = 0 1 2 3 4

28 Trace-back x = AGTAm = 1 y = ATAs = 1 d = 1 AGTA 0-2-3-4 A10 -2 T 0010 A-3 02 j = 0 1 2 3 F(i-1, j-1) +  (Xi,Yj) F(i,j) = max F(i-1, j) – d F(i, j-1) – d F(i,j) i = 0 1 2 3 4 A A

29 Trace-back AGTA 0-2-3-4 A10 -2 T 0010 A-3 02 F(i-1, j-1) +  (Xi,Yj) F(i,j) = max F(i-1, j) – d F(i, j-1) – d x = AGTAm = 1 y = ATAs = 1 d = 1 j = 0 1 2 3 F(i,j) i = 0 1 2 3 4 TA TA

30 Trace-back x = AGTAm = 1 y = ATAs = 1 d = 1 AGTA 0-2-3-4 A10 -2 T 0010 A-3 02 j = 0 1 2 3 F(i-1, j-1) +  (Xi,Yj) F(i,j) = max F(i-1, j) – d F(i, j-1) – d F(i,j) i = 0 1 2 3 4 GTA -TA

31 Trace-back x = AGTAm = 1 y = ATAs = 1 d = 1 AGTA 0-2-3-4 A10 -2 T 0010 A-3 02 j = 0 1 2 3 F(i-1, j-1) +  (Xi,Yj) F(i,j) = max F(i-1, j) – d F(i, j-1) – d F(i,j) i = 0 1 2 3 4 AGTA A-TA

32 Trace-back x = AGTAm = 1 y = ATAs = 1 d = 1 AGTA 0-2-3-4 A10 -2 T 0010 A-3 02 j = 0 1 2 3 Optimal Alignment: F(4,3) = 2 AGTA A  TA F(i-1, j-1) +  (Xi,Yj) F(i,j) = max F(i-1, j) – d F(i, j-1) – d F(i,j) i = 0 1 2 3 4

33 Using trace-back pointers x = AGTAm = 1 y = ATAs = 1 d = 1 AGTA 0-2-3-4 A T-2 A-3 j = 0 1 2 3 F(i,j) i = 0 1 2 3 4

34 Using trace-back pointers x = AGTAm = 1 y = ATAs = 1 d = 1 AGTA 0-2-3-4 A10 -2 T A-3 j = 0 1 2 3 F(i,j) i = 0 1 2 3 4

35 Using trace-back pointers x = AGTAm = 1 y = ATAs = 1 d = 1 AGTA 0-2-3-4 A10 -2 T 0010 A-3 j = 0 1 2 3 F(i,j) i = 0 1 2 3 4

36 Using trace-back pointers x = AGTAm = 1 y = ATAs = 1 d = 1 AGTA 0-2-3-4 A10 -2 T 0010 A-3 02 j = 0 1 2 3 F(i,j) i = 0 1 2 3 4

37 Using trace-back pointers x = AGTAm = 1 y = ATAs = 1 d = 1 AGTA 0-2-3-4 A10 -2 T 0010 A-3 02 j = 0 1 2 3 F(i,j) i = 0 1 2 3 4

38 Using trace-back pointers x = AGTAm = 1 y = ATAs = 1 d = 1 AGTA 0-2-3-4 A10 -2 T 0010 A-3 02 j = 0 1 2 3 F(i,j) i = 0 1 2 3 4

39 Using trace-back pointers x = AGTAm = 1 y = ATAs = 1 d = 1 AGTA 0-2-3-4 A10 -2 T 0010 A-3 02 j = 0 1 2 3 F(i,j) i = 0 1 2 3 4

40 Using trace-back pointers x = AGTAm = 1 y = ATAs = 1 d = 1 AGTA 0-2-3-4 A10 -2 T 0010 A-3 02 j = 0 1 2 3 Optimal Alignment: F(4,3) = 2 AGTA A  TA F(i,j) i = 0 1 2 3 4

41 The Needleman-Wunsch Algorithm 1.Initialization. a.F(0, 0) = 0 b.F(0, j) = - j  d c.F(i, 0)= - i  d 2.Main Iteration. Filling in scores a.For each i = 1……M For each j = 1……N F(i-1,j) – d [case 1] F(i, j) = max F(i, j-1) – d [case 2] F(i-1, j-1) + σ(x i, y j ) [case 3] UP, if [case 1] Ptr(i,j)= LEFTif [case 2] DIAGif [case 3] 3.Termination. F(M, N) is the optimal score, and from Ptr(M, N) can trace back optimal alignment

42 Complexity Time: O(NM) Space: O(NM) Linear-space algorithms do exist (with the same time complexity)

43 Equivalent graph problem (0,0) (3,4) A G TA A A T 1 1 1 1 S1 = S2 = Number of steps: length of the alignment Path length: alignment score Optimal alignment: find the longest path from (0, 0) to (3, 4) General longest path problem cannot be found with DP. Longest path on this graph can be found by DP since no cycle is possible.  : a gap in the 2 nd sequence  : a gap in the 1 st sequence : match / mismatch Value on vertical/horizontal line: -d Value on diagonal: m or -s 1

44 Question If we change the scoring scheme, will the optimal alignment be changed? –Old: Match = 1, mismatch = gap = -1 –New: match = 2, mismatch = gap = 0 –New: Match = 2, mismatch = gap = -2?

45 Question What kind of alignment is represented by these paths? A BCBC A BCBC A BCBC A BCBC A BCBC A- BC A-- -BC --A BC- -A- B-C -A BC Alternating gaps are impossible if –s > -2d

46 A variant of the basic algorithm Scoring scheme: m = s = d: 1 Seq1: CAGCA-CTTGGATTCTCGG || |:||| Seq2: ---CAGCGTGG-------- Seq1: CAGCACTTGGATTCTCGG |||| | | || Seq2: CAGC-----G-T----GG The first alignment may be biologically more realistic in some cases (e.g. if we know s2 is a subsequence of s1) Score = -7 Score = -2

47 A variant of the basic algorithm Maybe it is OK to have an unlimited # of gaps in the beginning and end: ----------CTATCACCTGACCTCCAGGCCGATGCCCCTTCCGGC GCGAGTTCATCTATCAC--GACCGC--GGTCG-------------- Then, we don ’ t want to penalize gaps in the ends

48 The Overlap Detection variant Changes: 1.Initialization For all i, j, F(i, 0) = 0 F(0, j) = 0 2.Termination max i F(i, N) F OPT = max max j F(M, j) x 1 ……………………………… x M y N ……………………………… y 1

49 Different types of overlaps x y x y

50 The local alignment problem Given two strings X = x 1 ……x M, Y = y 1 ……y N Find substrings x’, y’ whose similarity (optimal global alignment value) is maximum e.g. X = abcxdex X’ = cxde Y = xxxcde Y’ = c-de x y

51 Why local alignment Conserved regions may be a small part of the whole –Global alignment might miss them if flanking “junk” outweighs similar regions Genes are shuffled between genomes A A B CD BC D

52 Naïve algorithm for all substrings X’ of X and Y’ of Y Align X’ & Y’ via dynamic programming Retain pair with max value end ; Output the retained pair Time: O(n 2 ) choices for A, O(m 2 ) for B, O(nm) for DP, so O(n 3 m 3 ) total.

53 Reminder The overlap detection algorithm –We do not give penalty to gaps at either end Free gap

54 The local alignment idea Do not penalize the unaligned regions (gaps or mismatches) The alignment can start anywhere and ends anywhere Strategy: whenever we get to some low similarity region (negative score), we restart a new alignment –By resetting alignment score to zero

55 The Smith-Waterman algorithm Initialization: F(0, j) = F(i, 0) = 0 0 F(i – 1, j) – d F(i, j – 1) – d F(i – 1, j – 1) +  (x i, y j ) Iteration: F(i, j) = max

56 The Smith-Waterman algorithm Termination: 1.If we want the best local alignment… F OPT = max i,j F(i, j) 2.If we want all local alignments scoring > t For all i, j find F(i, j) > t, and trace back

57 xxxcde 0000000 a0 b0 c0 x0 d0 e0 x0 Match: 2 Mismatch: -1 Gap: -1

58 xxxcde 0000000 a0000000 b0000000 c0 x0 d0 e0 x0 Match: 2 Mismatch: -1 Gap: -1

59 xxxcde 0000000 a0000000 b0000000 c0000210 x0 d0 e0 x0 Match: 2 Mismatch: -1 Gap: -1

60 xxxcde 0000000 a0000000 b0000000 c0000210 x0222100 d0 e0 x0 Match: 2 Mismatch: -1 Gap: -1

61 xxxcde 0000000 a0000000 b0000000 c0000210 x0222100 d0111132 e0 x0 Match: 2 Mismatch: -1 Gap: -1

62 xxxcde 0000000 a0000000 b0000000 c0000210 x0222100 d0111132 e0000025 x0 Match: 2 Mismatch: -1 Gap: -1

63 xxxcde 0000000 a0000000 b0000000 c0000210 x0222110 d0111132 e0000025 x0222114 Match: 2 Mismatch: -1 Gap: -1

64 Trace back xxxcde 0000000 a0000000 b0000000 c0000210 x0222110 d0111132 e0000025 x0222114 Match: 2 Mismatch: -1 Gap: -1

65 Trace back xxxcde 0000000 a0000000 b0000000 c0000210 x0222110 d0111132 e0000025 x0222114 Match: 2 Mismatch: -1 Gap: -1 cxde | || c-de x-de | || xcde

66 No negative values in local alignment DP array Optimal local alignment will never have a gap on either end Local alignment: “Smith-Waterman” Global alignment: “Needleman-Wunsch”

67 Analysis Time: –O(MN) for finding the best alignment –Time to report all alignments depends on the number of sub-opt alignments Memory: –O(MN) –O(M+N) possible

68 Optional: more efficient alignment algorithms

69 Given two sequences of length M, N Time: O(MN) –ok Space: O(MN) –bad –1Mb seq x 1Mb seq = 1000G memory Can we do better?

70 Bounded alignment Good alignment should appear near the diagonal

71 Bounded Dynamic Programming If we know that x and y are very similar Assumption: # gaps(x, y) < k xixi Then,|implies | i – j | < k yj yj

72 Bounded Dynamic Programming Initialization: F(i,0), F(0,j) undefined for i, j > k Iteration: For i = 1…M For j = max(1, i – k)…min(N, i+k) F(i – 1, j – 1)+  (x i, y j ) F(i, j) = max F(i, j – 1) – d, if j > i – k F(i – 1, j) – d, if j < i + k Termination:same x 1 ………………………… x M y N ………………………… y 1 k

73 Analysis Time: O(kM) << O(MN) Space: O(kM) with some tricks 2k M => M

74

75 Given two sequences of length M, N Time: O(MN) –ok Space: O(MN) –bad –1mb seq x 1mb seq = 1000G memory Can we do better?

76 Linear space algorithm If all we need is the alignment score but not the alignment, easy! We only need to keep two rows (You only need one row, with a little trick) But how do we get the alignment?

77 Linear space algorithm When we finish, we know how we have aligned the ends of the sequences Naïve idea: Repeat on the smaller subproblem F(M-1, N-1) Time complexity: O((M+N)(MN)) XMYNXMYN

78 (0, 0) (M, N) M/2 Key observation: optimal alignment (longest path) must use an intermediate point on the M/2-th row. Call it (M/2, k), where k is unknown.

79 Longest path from (0, 0) to (6, 6) is max_k (LP(0,0,3,k) + LP(6,6,3,k)) (0,0) (6,6) (3,2) (3,4)(3,6)(3,0)

80 Hirschberg’s idea Divide and conquer! M/2 F(M/2, k) represents the best alignment between x 1 x 2 …x M/2 and y 1 y 2 …y k Forward algorithm Align x 1 x 2 …x M/2 with Y X Y

81 Backward Algorithm M/2 B(M/2, k) represents the best alignment between reverse(x M/2+1 …x M ) and reverse(y k y k+1 …y N ) Backward algorithm Align reverse(x M/2+1 …x M ) with reverse(Y) Y X

82 Linear-space alignment Using 2 (4) rows of space, we can compute for k = 1…N, F(M/2, k), B(M/2, k) M/2

83 Linear-space alignment Now, we can find k * maximizing F(M/2, k) + B(M/2, k) Also, we can trace the path exiting column M/2 from k * Conclusion: In O(NM) time, O(N) space, we found optimal alignment path at row M/2

84 Linear-space alignment Iterate this procedure to the two sub-problems! N-k * M/2 k*k*

85 Analysis Memory: O(N) for computation, O(N+M) to store the optimal alignment Time: –MN for first iteration –k M/2 + (N-k) M/2 = MN/2 for second –… k N-k M/2

86 MNMN/2MN/4 MN/8 MN + MN/2 + MN/4 + MN/8 + … = MN (1 + ½ + ¼ + 1/8 + 1/16 + …) = 2MN = O(MN)

87 Heuristic Local Sequence Alignment: BLAST

88 State of biological databases Sequenced Genomes: Human 3  10 9 Yeast1.2  10 7 Mouse2.7  10 9 Rat2.6  10 9 Neurospora 4  10 7 Fugu fish3.3  10 8 Tetraodon3  10 8 Mosquito 2.8  10 8 Drosophila1.2  10 8 Worm 1.0  10 8 Rice1.0  10 9 Arabidopsis1.2  10 8 sea squirts 1.6  10 8 Current rate of sequencing (before new-generation sequencing): 4 big labs  3  10 9 bp /year/lab 10s small labs Private sectors With new-generation sequencing: Easily generating billions of reads daily

89 Some useful applications of alignments Given a newly discovered gene, - Does it occur in other species? Assume we try Smith-Waterman: The entire genomic database Our new gene 10 4 10 10 - 10 11 May take several weeks!

90 Some useful applications of alignments Given a newly sequenced organism, - Which subregions align with other organisms? -Potential genes - Other functional units Assume we try Smith-Waterman: The entire genomic database Our newly sequenced mammal 3  10 9 10 10 - 10 11 > 1000 years ???

91 BLAST Basic Local Alignment Search Tool –Altschul, Gish, Miller, Myers, Lipman, J Mol Biol 1990 –The most widely used bioinformatics tool Which is better: long mediocre match or a few nearby, short, strong matches with the same total score? –Score-wise, exactly equivalent –Biologically, later may be more interesting, & is common –At least, if must miss some, rather miss the former BLAST is a heuristic algorithm emphasizing the later –speed/sensitivity tradeoff: BLAST may miss former, but gains greatly in speed

92 BLAST Available at NCBI (National Center for Biotechnology Information) for download and online use. http://blast.ncbi.nlm.nih.gov/http://blast.ncbi.nlm.nih.gov/ Along with many sequence databases Main idea: 1.Construct a dictionary of all the words in the query 2.Initiate a local alignment for each word match between query and DB Running Time: O(MN) However, orders of magnitude faster than Smith-Waterman query DB

93 BLAST  Original Version Dictionary: All words of length k (~11 for DNA, 3 for proteins) Alignment initiated between words of alignment score  T (typically T = k) Alignment: Ungapped extensions until score below statistical threshold Output: All local alignments with score > statistical threshold …… query DB query scan

94 BLAST  Original Version A C G A A G T A A G G T C C A G T C C C T T C C T G G A T T G C G A Example: k = 4, T = 4 The matching word GGTC initiates an alignment Extension to the left and right with no gaps until alignment falls < 50% Output: GTAAGGTCC GTTAGGTCC

95 Gapped BLAST A C G A A G T A A G G T C C A G T C T G A T C C T G G A T T G C G A Added features: Pairs of words can initiate alignment Extensions with gaps in a band around anchor Output: GTAAGGTCCAGT GTTAGGTC-AGT

96 Example Query: gattacaccccgattacaccccgattaca (29 letters) [2 mins] Database: All GenBank+EMBL+DDBJ+PDB sequences (but no EST, STS, GSS, or phase 0, 1 or 2 HTGS sequences) 1,726,556 sequences; 8,074,398,388 total letters >gi|28570323|gb|AC108906.9| Oryza sativa chromosome 3 BAC OSJNBa0087C10 genomic sequence, complete sequence Length = 144487 Score = 34.2 bits (17), Expect = 4.5 Identities = 20/21 (95%) Strand = Plus / Plusgi|28570323|gb|AC108906.9| Query: 4 tacaccccgattacaccccga 24 ||||||| ||||||||||||| Sbjct: 125138 tacacccagattacaccccga 125158 Score = 34.2 bits (17), Expect = 4.5 Identities = 20/21 (95%) Strand = Plus / Plus Query: 4 tacaccccgattacaccccga 24 ||||||| ||||||||||||| Sbjct: 125104 tacacccagattacaccccga 125124 >gi|28173089|gb|AC104321.7| Oryza sativa chromosome 3 BAC OSJNBa0052F07 genomic sequence, complete sequence Length = 139823 Score = 34.2 bits (17), Expect = 4.5 Identities = 20/21 (95%) Strand = Plus / Plusgi|28173089|gb|AC104321.7| Query: 4 tacaccccgattacaccccga 24 ||||||| ||||||||||||| Sbjct: 3891 tacacccagattacaccccga 3911

97 Example Query: Human atoh enhancer, 179 letters[1.5 min] Result: 57 blast hits 1. gi|7677270|gb|AF218259.1|AF218259 Homo sapiens ATOH1 enhanc... 355 1e-95 gi|7677270|gb|AF218259.1|AF218259355 2.gi|22779500|gb|AC091158.11| Mus musculus Strain C57BL6/J ch... 264 4e-68gi|22779500|gb|AC091158.11|264 3.gi|7677269|gb|AF218258.1|AF218258 Mus musculus Atoh1 enhanc... 256 9e-66gi|7677269|gb|AF218258.1|AF218258256 4.gi|28875397|gb|AF467292.1| Gallus gallus CATH1 (CATH1) gene... 78 5e-12gi|28875397|gb|AF467292.1|78 5.gi|27550980|emb|AL807792.6| Zebrafish DNA sequence from clo... 54 7e-05gi|27550980|emb|AL807792.6|54 6.gi|22002129|gb|AC092389.4| Oryza sativa chromosome 10 BAC O... 44 0.068gi|22002129|gb|AC092389.4|44 7.gi|22094122|ref|NM_013676.1| Mus musculus suppressor of Ty... 42 0.27gi|22094122|ref|NM_013676.1|42 8.gi|13938031|gb|BC007132.1| Mus musculus, Similar to suppres... 42 0.27gi|13938031|gb|BC007132.1|42 gi|7677269|gb|AF218258.1|AF218258gi|7677269|gb|AF218258.1|AF218258 Mus musculus Atoh1 enhancer sequence Length = 1517 Score = 256 bits (129), Expect = 9e-66 Identities = 167/177 (94%), Gaps = 2/177 (1%) Strand = Plus / Plus Query: 3 tgacaatagagggtctggcagaggctcctggccgcggtgcggagcgtctggagcggagca 62 ||||||||||||| ||||||||||||||||||| |||||||||||||||||||||||||| Sbjct: 1144 tgacaatagaggggctggcagaggctcctggccccggtgcggagcgtctggagcggagca 1203 Query: 63 cgcgctgtcagctggtgagcgcactctcctttcaggcagctccccggggagctgtgcggc 122 |||||||||||||||||||||||||| ||||||||| |||||||||||||||| ||||| Sbjct: 1204 cgcgctgtcagctggtgagcgcactc-gctttcaggccgctccccggggagctgagcggc 1262 Query: 123 cacatttaacaccatcatcacccctccccggcctcctcaacctcggcctcctcctcg 179 ||||||||||||| || ||| |||||||||||||||||||| ||||||||||||||| Sbjct: 1263 cacatttaacaccgtcgtca-ccctccccggcctcctcaacatcggcctcctcctcg 1318

98 Different types of BLAST blastn: search nucleic acid databases blastp: search protein databases blastx: you give a nucleic acid sequence, search protein databases tblastn: you give a protein sequence, search nucleic acid databases tblastx: you give a nucleic sequence, search nucleic acid database, implicitly translate both into protein sequences

99 BLAST cons and pros Advantages –Fast!!!! –A few minutes to search a database of 10 11 bases Disadvantages –Sensitivity may be low –Often misses weak homologies New improvement –Make it even faster Mainly for aligning very similar sequences or really long sequences –E.g. whole genome vs whole genome –Make it more sensitive PSI-BLAST: iteratively add more homologous sequences PatternHunter: discontinuous seeds

100 Variants of BLAST NCBI-BLAST: most widely used version WU-BLAST: (Washington University BLAST): another popular version Optimized, added features MEGABLAST: Optimized to align very similar sequences. Linear gap penalty BLAT: Blast-Like Alignment Tool BlastZ: Optimized for aligning two genomes PSI-BLAST: BLAST produces many hits Those are aligned, and a pattern is extracted Pattern is used for next search; above steps iterated Sensitive for weak homologies Slower

101 Pattern hunter Instead of exact matches of consecutive matches of k-mer, we can look for discontinuous matches –My query sequence looks like: ACGTAGACTAGCAGTTAAG –Search for sequences in database that match AXGXAGXCTAXC X stands for don’t care Seed: 101011011101

102 Pattern hunter A good seed may give you both a higher sensitivity and higher specificity You may think 110110110110 is the best seed –Because mutation in the third position of a codon often doesn’t change the amino acid –Best seed is actually 110100110010101111 Empirically determined How to design such seed is an open problem May combine multiple random seeds

103 Things we’ve covered so far Global alignment –Needleman-Wunsch and variants Local Alignment –Smith-Waterman Improvement on space and time Heuristic algorithms –BLAST families Things we did not cover: –Statistics for sequence alignment –To handle gaps more accurately: affine gap penalty –Multiple sequence alignment


Download ppt "CS 6293 Advanced Topics: Current Bioinformatics Lectures 3-4: Pair-wise Sequence Alignment."

Similar presentations


Ads by Google