Docsity

Sequence Alignment Variations: Local, Repeated, Overlap, Hybrid, and Other Models, Study notes of Computer Science

Toggle sidebar
bg1
Sequence Alignment - Variations
Local Alignment: Smith-Waterman algorithm
•Example: a shared common domain of two protein sequences; extended sections of
genomic DNA sequence.
•Sensitive to detect similarity in highly diverged sequences.
•Algorithm: similar to global alignment with modified boundary conditions and
recurrence rules.
–The top row and left column are now filled with 0.
–If the (sub-)alignment score becomes negative, restart the search:
F(i, j)=max
0,
F(i−1,j−1) + s(xi,y
j),
F(i−1,j)−d,
F(i, j −1) −d.
–Traceback: from the maximum of F(i, j)in the whole matrix to the first 0.
•Example: the optimal local alignment between HEAGAWGHEE and PAWHEAE is
AWGHE::AW-HE.
•Issue: In gapped alignments, the expected score for a random match may be positive.
Nam Tran 1
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Sequence Alignment Variations: Local, Repeated, Overlap, Hybrid, and Other Models and more Study notes Computer Science in PDF only on Docsity!

Local Alignment: Smith-Waterman algorithm

genomic DNA sequence.Example: a shared common domain of two protein sequences; extended sections of

Sensitive to detect similarity in highly diverged sequences.

recurrence rules.Algorithm: similar to global alignment with modified boundary conditions and

The top row and left column are now filled with 0.

If the (sub-)alignment score becomes negative, restart the search:

F

i, j

max

  

F

i −

, j

s ( x

i , y

j ) ,

F

i −

, j

d,

F

i, j

d.

Traceback: from the maximum of

F

i, j

in the whole matrix

to the first 0.

AWGHE::AW-HE.Example: the optimal local alignment between HEAGAWGHEE and PAWHEAE is

Issue: In gapped alignments, the expected score for a random match may be positive.

Repeated matches

Example: repeated domains in proteins.

the other.Asymetric alignment: finding multiple (non-overlapping) matches of one sequence in

We want each match’s score to be greater than

T

(^). The alignment score is the sum of

the match scores substracted by

T

score

alignment

∑

i ( score

match

i )

−

T

Boundary conditions:

F

F

i,

(^) 0) =

max

  

F ( i − 1 ,

F

i −

, j

T, j

, ..., m

Recurrence rules:

F

i, j

max

  

F

i,

F

i −

, j

s ( x

i , y

j ) ,

F

i −

, j

d,

F

i, j

d.

F

i,

  1. is the score of optimal alignment of

y

1 ..m

to

x

1 ...

( i −

.

Overlap matches

sequence may overlap the other, partially or completely.Example: when comparing fragments of genomic DNA sequence to each other, one

from the top or left border of the matrix, and finishes on the right or bottom border.This is similar to global alignment, except for overhaning ends. An alignment will start

Boundary conditions:

F

i, j

) = 0 if

i

= 0 or

j

Recurrence rules like those of the global alignment.

Repeat version:

F

i,

max

  

F

i

−

F

i

−

, j

) − T ; j = m

if

i

≤

n,

otherwise

j

= 1

..m

F

i, j

max

  

F

i

−

, j

s ( x

i (^) , y

j ) ,

F

i

−

, j

d,

F

i, j

d.

Hybrid match conditions

Variants can be formulated by changing boundary conditions and recurrence rules.

Example 1: to find mutiple matches of

y

that appear in tandem copies, we use

recurrence rules in the previous slide with a slight modification.

F

i,

max

  

F

i

−

s ( x

i , y

1 ) ,

F

i

−

, n

s ( x

i (^) , y

1 ) ,

F

i

−

d,

F

i,

d.

  • setting onlypoint.Example 2: finding a match starting at the beginning of both sequences, ending at any

F

  • using global recurrence rules, find maximum over the whole matrix.

postprocess the results.practice, people use good implementations available for a few standard cases thenIdeally, we should be able to use algorithm designed with specific prior knowledge. In

O

n

2

) implementation for affine gap scores

M

i, j

), or

I

x ( i, j

), or

I

y ( i, j

) is respectively the best score given that

x i

is aligned to

y j , or

x

i

to a gap, or

y j

to a gap.

The recurrence rules:

M

i, j

max

  

M

i

−

, j

s ( x i (^) , y

j ) ,

I x ( i − 1

, j

s ( x

i , y

j ) ,

I y ( i − 1

, j

s ( x i (^) , y

j );

I

x ( i, j

max

  

M

i

−

, j

d,

I x ( i − 1

, j

e ;

I

y ( i, j

max

  

M

i, j

d,

I

y ( i, j

e.

true ifImplicit assumption: a deletion won’t be followed directly by an insertion. Generally

d

e

lowest mismatch score.

be turned into a HMM!The recurrence rules can be simulated by a finite state automation (FSA), which can

Linear space alignment

Simple to achieve if only maximal score is needed.

To find the optimal global alignment:

divide and conquer

principle.

Let

u

2 n (^) 

and

v

be the row such that the cell (

u, v

) is on the optimal alignment.

Split the DP matrix into 2 smaller submatrices: one from (

  1. to (

u, v

), one from

u, v

) to (

n, m

O Recursively split down until the submatrices are small enough for using standard

n

2 ) DP procedure.

Runtime still

O

n

2 ).

Way to find

v : keep tracks of

c ( i, j

) such that

c ( i, j

v

for

i > u

. If the cell (

i ′ , j

′ )

precedes (

i, j

), set

c ( i, j

j

′

if

i

=

u

, else

c

( i, j

c ( i ′ , j

′ ).

P

M

x, y

) increases with

S

′

. If we fixed the prior log-odds ratio

log

( P^ (^) ( M

(^) )

P (^) ( R ) ) , we only

need to maximize

S

′ .

S

′

∑ i

log

 

p x i y i

q x i q y i  

The substitution matrix contains the log likelihood ratio of residue pair (

a, b

) being

related as opposed to being unrelated:

s ( a, b

log

p ab

q a q b (^) )

  • when divergence is higher,each other.- protein sequences come in families, so alignments tend not to be independent fromCounting frequencies in confirmed alignments won’t work!

p ab

tends to background frequency

q a q b , so scores should

correspond to expected divergence of the sequences.

Common matrices PAM and BLOSUM take the difficulties into account.

number of queries. Changing the ratio can corrigate this probability.match. When the ratio is fixed, the probability of finding a match increases with thePrior odds ratio becomes important when searching database for a possible significant