lect3 Blast Local Alignment and other flavors

An Introduction to Bioinformatics Algorithms (Computational Molecular Biology)

Info iconThis preview shows pages 1–15. Sign up to view the full content.

View Full Document Right Arrow Icon
Fa05 CSE 182 L3: Blast: Local Alignment and other flavors
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Fa05 CSE 182 An Example Align s=TCAT with t=TGCAA Match Score = 1 Mismatch score = -1, Indel Score = -1 Score A1?, Score A2?  T C A T - T G C A A T C A T T G C A A A1 A2
Background image of page 2
Fa05 CSE 182 Sequence Alignment Recall: Instead of computing the optimum alignment, we are  computing the score of the optimum alignment Let S[i,j] denote the score of the optimum alignment of the prefix  s[1. .i] and t [1. .j] 
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Fa05 CSE 182 An O(nm) algorithm for score computation The iteration ensures that all values on the right are computed in earlier steps. S [ i , j ] = max S [ i - 1, j - 1]+ C ( s i , t j ) S [ i j ]+ C ( s i ,- ) S [ i , j - 1]+ C (- , t j ) For i = 1 to n For j = 1 to m
Background image of page 4
Fa05 CSE 182 Base case (Initialization) S [0,0] = 0 S [ i ,0] = C ( s i ,- ) + S [ i - 1,0] " i S [0, j ] = C (- , s j ) + S j - 1] " j
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Fa05 CSE 182 A tableaux approach s n 1 i 1 j n Μ S[i,j-1] S[i,j] S[i-1,j] S[i-1,j-1] t Cell (i,j) contains the score S[i,j]. Each cell only looks at 3  neighboring cells S [ i , j ] = max S [ i - 1, j - 1]+ C ( s i , t j ) S [ i j ]+ C ( s i ,- ) S [ i , j - 1]+ C (- , t j )
Background image of page 6
Fa05 CSE 182 0 -1 -2 -3 -4 -5 -1 1 0 -1 -2 -3 -2 0 0 1 0 -1 -3 -1 -1 0 2 1 -4 -2 -2 -1 1 1 T G C A A T C A T Alignment Table
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Fa05 CSE 182 1 1 -1 -2 -2 -4 1 2 0 -1 -1 -3 -1 0 1 0 0 -2 -3 -2 -1 0 1 -1 -5 -4 -3 -2 -1 0 T G C A A T C A T Alignment Table S[4,5] = 1 is the score of an  optimum alignment Therefore, A2 is an optimum  alignment We know how to obtain the  optimum Score. How do we get  the best alignment?
Background image of page 8
Fa05 CSE 182 Computing Optimum Alignment At each cell, we have 3 choices We maintain additional information to record the choice at each step. For i = 1 to n For j = 1 to m S [ i , j ] = max S [ i - 1, j - 1]+ C ( s i , t j ) S [ i j ]+ C ( s i ,- ) S [ i , j - 1]+ C (- , t j ) If (S[i,j]= S[i-1,j-1] + C(s i ,t j )) M[i,j] = If (S[i,j]= S[i-1,j] + C(s i ,-)) M[i,j] = If (S[i,j]= S[i,j-1] + C(-,t j ) ) M[i,j] = j-1 i-1 j i
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Fa05 CSE 182 T G C A A T C A T 1 1 -1 -2 -2 -4 1 2 0 -1 -1 -3 -1 0 1 0 0 -2 -3 -2 -1 0 1 -1 -5 -4 -3 -2 -1 0 Computing Optimal Alignments
Background image of page 10
Fa05 CSE 182 Retrieving Opt.Alignment 1 1 -1 -2 -2 -4 1 2 0 -1 -1 -3 -1 0 1 0 0 -2 -3 -2 -1 0 1 -1 -5 -4 -3 -2 -1 0 T G C A A T C A T M[4,5]=     Implies that S[4,5]=S[3,4]+C( A,T )                   or A T M[3,4]= Implies that S[3,4]=S[2,3] +C( A,A ) or A T A A 1 2 3 4 5 1 3 2 4
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Fa05 CSE 182 Retrieving Opt.Alignment 1 1 -1 -2 -2 -4 1 2 0 -1 -1 -3 -1 0 1 0 0 -2 -3 -2 -1 0 1 -1 -5 -4 -3 -2 -1 0 T G C A A T C A T M[2,3]=     Implies that S[2,3]=S[1,2]+C( C,C )                   or A T M[1,2]= Implies that S[1,2]=S[1,1] +C (-,G ) or A T A A A A C C C C - G T T 1 2 3 4 5 1 3 2 4
Background image of page 12
Fa05 CSE 182 Algorithm to retrieve optimal alignment RetrieveAl(i,j) if (M[i,j] == `\’)  return (RetrieveAl (i-1,j-1) .         )   else if (M[i,j] == `|’)  return (RetrieveAl (i-1,j) .         ) s i t j s i - - t j else if (M[i,j] == `--’) else if (M[i,j] == `--’)                   return (RetrieveAl (i,j-1) .            ) return (RetrieveAl (i,j-1) .            )
Background image of page 13

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Fa05 CSE 182 Summary An optimal alignment of strings of length n and m can be computed  in O(nm) time There is a tight connection between computation of optimal score,  and computation of opt. Alignment True for all DP based solutions
Background image of page 14
Image of page 15
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/14/2008 for the course CSE 182 taught by Professor Bafna during the Fall '06 term at UCSD.

Page1 / 58

lect3 Blast Local Alignment and other flavors - L3: Blast:...

This preview shows document pages 1 - 15. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online