Sequence Alignment Mark Voorhies 5/29/2013 Mark Voorhies Sequence - - PowerPoint PPT Presentation

sequence alignment
SMART_READER_LITE
LIVE PREVIEW

Sequence Alignment Mark Voorhies 5/29/2013 Mark Voorhies Sequence - - PowerPoint PPT Presentation

Sequence Alignment Mark Voorhies 5/29/2013 Mark Voorhies Sequence Alignment Exercise: Scoring an ungapped alignment Given two sequences and a scoring matrix, find the offset that yields the best scoring ungapped alignment. Mark Voorhies


slide-1
SLIDE 1

Sequence Alignment

Mark Voorhies 5/29/2013

Mark Voorhies Sequence Alignment

slide-2
SLIDE 2

Exercise: Scoring an ungapped alignment

Given two sequences and a scoring matrix, find the offset that yields the best scoring ungapped alignment.

Mark Voorhies Sequence Alignment

slide-3
SLIDE 3

Exercise: Scoring an ungapped alignment

Given two sequences and a scoring matrix, find the offset that yields the best scoring ungapped alignment.

def s c o r e (S , x , y ) : " " " Ret urn al i gnment scor e f or subsequences x and y f or scor i n g m at r i x S ( r ep r esen t ed as a d i c t ) " " " a s s e r t ( l e n ( x ) == l e n ( y )) r et u r n sum(S [ i ] [ j ] f o r ( i , j ) i n z i p ( x , y ) ) def subseqs ( x , y , i ) : " " " Ret urn subsequences

  • f

x and y f or

  • f f set

i . " " " i f ( i > 0 ) : y = y [ i : ] e l i f ( i < 0 ) : x = x[− i : ] L = min ( l e n ( x ) , l e n ( y ) ) r et u r n x [ : L ] , y [ : L ] def ungapped (S , x , y ) : " " " Ret urn best

  • f f set ,

scor e , and al i gnment bet ween sequences x and y f or m at r i x S. " " " best = None b e s t s c o r e = None f o r i i n range(−l e n ( x )+1 , l e n ( y ) ) : ( sx , sy ) = subseqs ( x , y , i ) s = s c o r e (S , sx , sy ) i f ( s > b e s t s c o r e ) : b e s t s c o r e = s best = i r et u r n best , b e s t s c o r e , subseqs ( x , y , best ) Mark Voorhies Sequence Alignment

slide-4
SLIDE 4

Dotplots

1

slide-5
SLIDE 5

Dotplots

1

Unbiased view of all ungapped alignments of two sequences

2

Noise can be filtered by applying a smoothing window to the diagonals.

Mark Voorhies Sequence Alignment