470 likes | 503 Views
Tutorial 2. Local Alignment. Local alignment. When to use local alignment? How to solve a local alignment matrix Comparison to global alignment Cool story of the day. When to use local alignment?. When the aim is to find short similarities inside a sequence.
E N D
Tutorial 2 Local Alignment
Local alignment • When to use local alignment? • How to solve a local alignment matrix • Comparison to global alignment • Cool story of the day
When to use local alignment? When the aim is to find short similarities inside a sequence. short -> compared to the sequence they’re in
When to use local alignment? Example: When looking for motifs in a sequence Binding site: ATGGC ATGGC ATGGGTATGCTCGCTCGCTGATGGCATAGCTGATGCTGATCGGGCTCGCTCGCTCGCTC ATGGC GCTGCTCGCTCGCTCGCATGTCTAGATAAGAGATAATAAGCTGATGCTAGCTGATGCTT ATGGC TGCGTAGAGTATAGCGTGTGATGCTAGCTAGCTAGCTGGTAGCA-GGCTGATCGTAGCT
Alignment [I,J] Best alignment M1..I, N1..J
Alignment All possible alignments encoded as path in matrix
Global vs Local The differences: • We can start a new match instead of extending a previous alignment. • Instead of looking only at the far corner, we look anywhere in the table for the best score. Global Local
Local Alignment Scoring System • Match : +1 Ni=Mj • Mismatch: -1 Ni=Mj • Indel : -2
Local Alignment Scoring System • Match : +1 Ni=Mj • Mismatch: -1 Ni=Mj • Indel : -2
Local Alignment Scoring System • Match : +1 • Mismatch : -1 • Indel : -2
Local Alignment Scoring System • Match : +1 • Mismatch : -1 • Indel : -2 N1 -
Local Alignment Scoring System • Match : +1 • Mismatch : -1 • Indel : -2 -M1
Local Alignment Scoring System • Match : +1 • Mismatch: -1 • Indel : -2 N1- M1M2
+1 if M2=N2; -1 if M2=N2 Local Alignment Fill: 1.We fill the table like in global alignment, but we don’t allow negative numbers (turn every negative number to 0) 2.No arrows coming out from cells with a 0. Scoring System • Match : +1 • Mismatch: -1 • Indel : -2 N1N2 M1M2 N1N2 M1 - -2 N1 - M1M2
+1 if M2=N2; -1 if M2=N2 Local Alignment Trace: We trace back from the highest scoring cells. N1N2 M1M2 N1N2 M1 - -2 N1 - M1M2
If you like formulas… i i+1 j Z = max (Si,j+w, Si+1,j+w, Si,j+1+w) j+1 Z When w is the score according to the scoring matrix For example match or mismatch +1 match w = -2 mismatch/indel Z = max (Si,j+2/-1, Si+1,j-1, Si,j+1-1) indel
Local Alignment – let’s get this party started • Seq 1 TACTAA • Seq 2 TAATA
- T
T -
T - -2 T T - T +1 -2
0 T 1 A 2 C 3 T 4 A 5 A 6 0 0 0 0 0 0 0 0 T1 0 1 0 0 1 0 0 A2 0 A3 0 T4 0 A5 0
0 T 1 A 2 C 3 T 4 A 5 A 6 0 0 0 0 0 0 0 0 T1 0 1 0 0 1 0 0 A2 0 0 2 0 0 2 1 A3 0 T4 0 A5 0
0 T 1 A 2 C 3 T 4 A 5 A 6 0 0 0 0 0 0 0 0 T1 0 1 0 0 1 0 0 A2 0 0 2 0 0 2 1 A3 0 0 1 1 0 1 3 T4 0 A5 0
0 T 1 A 2 C 3 T 4 A 5 A 6 0 0 0 0 0 0 0 0 T1 0 1 0 0 1 0 0 A2 0 0 2 0 0 2 1 A3 0 0 1 1 0 1 3 T4 0 1 0 0 2 0 1 A5 0
0 T 1 A 2 C 3 T 4 A 5 A 6 0 0 0 0 0 0 0 0 T1 0 1 0 0 1 0 0 A2 0 0 2 0 0 2 1 A3 0 0 1 1 0 1 3 T4 0 1 0 0 2 0 1 A5 0 0 2 0 0 3 1
Leave only paths from highest score
TAA TAA TACTA TAATA Both have a score of 3
+1 if M2=N2; -1 if M2=N2 And Now… Global Alignment 1.We keep negative numbers. 2.Arrows coming out from any cell. 3.We trace back from right-bottom to left-top of the table. Scoring System • Match : +1 • Mismatch: -1 • Indel : -2 N1N2.. M1M2.. N1N2.. M1 -.. -2 N1 -.. M1M2..
Match: +1 Mismatch:-1 Indel: -2 0 T 1 A 2 C 3 T 4 A 5 A 6 0 0 -2 -4 -6 -8 -10 -12 T1 -2 1 -1 -3 -5 -7 -9 A2 -4 -1 2 0 -2 -4 -6 A3 -6 -3 0 1 -1 -1 -3 T4 -8 -5 -2 -1 2 0 -2 A5 -10 -7 -4 -3 0 3 1
Match: +1 Mismatch:-1 Indel: -2 0 T 1 A 2 C 3 T 4 A 5 A 6 0 0 -2 -4 -6 -8 -10 -12 T1 -2 1 -1 -3 -5 -7 -9 A2 -4 -1 2 0 -2 -4 -6 A3 -6 -3 0 1 -1 -1 -3 T4 -8 -5 -2 -1 2 0 -2 A5 -10 -7 -4 -3 0 3 1
0 T 1 A 2 C 3 T 4 A 5 A 6 0 0 -1 -2 -3 -4 -5 -6 T1 -1 1 -1 -3 -2 -4 -6 A2 -2 -1 2 0 -2 0 -2 A3 -3 -3 0 1 -1 -1 1 T4 -4 -2 -2 -1 2 0 -1 A5 -5 -4 -1 -3 0 3 1
Both have a score of 1 TACTAA TAATA- TACTAA TAAT-A
Global Local TACTAA TAAT-A TAA TAA TACTAA TAATA- TACTA TAATA
Cool Story of the day How Archaea was discovered
Until the 20th century, most biologists considered all living things to be classifiable as either a plant or an animal. • But in the 1950s and 1960s, most biologists came to the realization that this system failed to accommodate the fungi, protists, and bacteria. • The scientific community was understandably shocked in the late 1970s by the discovery of an entirely new group of organisms - the Archaea. http://www.ucmp.berkeley.edu/archaea/archaea.html
Carl Woese In order to study and compare different creatures one needs to find a common trait. Ribosomal RNA “…the component of all self-replicating systems…” “…its sequence changes but slowly with time, permitting the detection od relatedness among very distant species…” Woese and his colleagues compared the sequences of rRNAs from different creatures
Stay tuned… More on phylogenetic trees, multiple sequence alignment and clustering in the next lessons…