Local Alignment

1 / 47

# Local Alignment - PowerPoint PPT Presentation

## Local Alignment

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
##### Presentation Transcript

1. Tutorial 2 Local Alignment

2. Local alignment • When to use local alignment? • How to solve a local alignment matrix • Comparison to global alignment • Cool story of the day

3. When to use local alignment? When the aim is to find short similarities inside a sequence. short -> compared to the sequence they’re in

4. When to use local alignment? Example: When looking for motifs in a sequence Binding site: ATGGC ATGGC ATGGGTATGCTCGCTCGCTGATGGCATAGCTGATGCTGATCGGGCTCGCTCGCTCGCTC ATGGC GCTGCTCGCTCGCTCGCATGTCTAGATAAGAGATAATAAGCTGATGCTAGCTGATGCTT ATGGC TGCGTAGAGTATAGCGTGTGATGCTAGCTAGCTAGCTGGTAGCA-GGCTGATCGTAGCT

5. Dynamic programming – local alignment

6. Alignment [I,J] Best alignment M1..I, N1..J

7. Alignment All possible alignments encoded as path in matrix

8. 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

9. Local Alignment Scoring System • Match : +1 Ni=Mj • Mismatch: -1 Ni=Mj • Indel : -2

10. Local Alignment Scoring System • Match : +1 Ni=Mj • Mismatch: -1 Ni=Mj • Indel : -2

11. Local Alignment Scoring System • Match : +1 • Mismatch : -1 • Indel : -2

12. Local Alignment Scoring System • Match : +1 • Mismatch : -1 • Indel : -2 N1 -

13. Local Alignment Scoring System • Match : +1 • Mismatch : -1 • Indel : -2 -M1

14. Local Alignment Scoring System • Match : +1 • Mismatch: -1 • Indel : -2 N1- M1M2

15. +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

16. +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

17. 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

18. Local Alignment – let’s get this party started • Seq 1 TACTAA • Seq 2 TAATA

19. - T

20. T -

21. T - -2 T T - T +1 -2

22. 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

23. 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

24. 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

25. 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

26. 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

27. Leave only paths from highest score

28. TAA TAA TACTA TAATA Both have a score of 3

29. +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..

30. 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

31. 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

32. 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

33. Both have a score of 1 TACTAA TAATA- TACTAA TAAT-A

34. Global Local TACTAA TAAT-A TAA TAA TACTAA TAATA- TACTA TAATA

35. Cool Story of the day How Archaea was discovered

36. 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

37. 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

38. Nicholas Barton et al (2007) 'Evolution'  Backcover

39. Stay tuned… More on phylogenetic trees, multiple sequence alignment and clustering in the next lessons…