local alignment
DESCRIPTION
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. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/1.jpg)
Local Alignment
Tutorial 2
![Page 2: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/2.jpg)
• When to use local alignment?• How to solve a local alignment matrix• Comparison to global alignment
• Cool story of the day
Local alignment
![Page 3: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/3.jpg)
When to use local alignment?
When the aim is to find short similarities inside a sequence.
short -> compared to the sequence they’re in
![Page 4: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/4.jpg)
When to use local alignment?
Example: When looking for motifs in a sequence
Binding site: ATGGC
ATGGCATGGGTATGCTCGCTCGCTGATGGCATAGCTGATGCTGATCGGGCTCGCTCGCTCGCTC
ATGGCGCTGCTCGCTCGCTCGCATGTCTAGATAAGAGATAATAAGCTGATGCTAGCTGATGCTT
ATGGCTGCGTAGAGTATAGCGTGTGATGCTAGCTAGCTAGCTGGTAGCA-GGCTGATCGTAGCT
![Page 5: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/5.jpg)
Dynamic programming – local alignment
N1Nn
M1
Mm
![Page 6: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/6.jpg)
Alignment
N1Nn
M1
Mm
[I,J ]Best alignment M1..I, N1..J
![Page 7: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/7.jpg)
Alignment
All possible alignments encoded as path in matrix
![Page 8: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/8.jpg)
The differences:
1. We can start a new match instead of extending a previous alignment.
2. Instead of looking only at the far corner, we look anywhere in the table for the best score.
Global vs Local
Global Local
![Page 9: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/9.jpg)
Local Alignment
Scoring System– Match : +1 Ni=Mj
– Mismatch: -1 Ni=Mj
– Indel : -2
N1Nn
M1
Mm
![Page 10: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/10.jpg)
Local Alignment
Scoring System– Match : +1 Ni=Mj
– Mismatch: -1 Ni=Mj
– Indel : -2
N1Nn
M1
Mm
![Page 11: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/11.jpg)
Local Alignment
Scoring System– Match : +1– Mismatch : -1
– Indel : -2
N1Nn
M1
Mm
![Page 12: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/12.jpg)
Local Alignment
Scoring System– Match : +1– Mismatch : -1
– Indel : -2
N1Nn
M1
Mm
N1-
![Page 13: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/13.jpg)
Local Alignment
Scoring System– Match : +1– Mismatch : -1
– Indel : -2
N1Nn
M1
Mm
-
M1
![Page 14: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/14.jpg)
Local Alignment
Scoring System– Match : +1– Mismatch: -1– Indel : -2 N1N2
M1
M2
N1-M1M2
![Page 15: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/15.jpg)
Local AlignmentFill: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
+1 if M2=N2; -1 if M2=N2
-2
N1N2Nn
M1
M2
Mm
N1N2
M1M2
N1 -M1M2
N1N2
M1 -
![Page 16: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/16.jpg)
Local Alignment
Trace:We trace back from the highest scoring cells.
+1 if M2=N2; -1 if M2=N2
-2
N1N2Nn
M1
M2
Mm
N1N2
M1M2
N1 -M1M2
N1N2
M1 -
![Page 17: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/17.jpg)
17
If you like formulas…
Z = max (Si,j+w, Si+1,j+w, Si,j+1+w)Z
i i+1
j
j+1
When w is the score according to the scoring matrix
w= +1 match
-2 mismatch/indel
For example
Z = max (Si,j+2/-1, Si+1,j-1, Si,j+1-1)
match or mismatch
indel
![Page 18: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/18.jpg)
Seq 1TACTAASeq 2TAATA
Local Alignment – let’s get this party started
![Page 19: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/19.jpg)
0
T
1
A
2
C
3
T
4
A
5
A
6
0 0
T 1
A 2
A 3
T 4
A 5
![Page 20: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/20.jpg)
0
T
1
A
2
C
3
T
4
A
5
A
6
0 0000000
T 1
A 2
A 3
T 4
A 5
![Page 21: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/21.jpg)
0
T
1
A
2
C
3
T
4
A
5
A
6
0 0000000
T 1 0
A 2 0
A 3 0
T 4 0
A 5 0
![Page 22: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/22.jpg)
0
T
1
A
2
C
3
T
4
A
5
A
6
0 0000000
T 1 0
A 2 0
A 3 0
T 4 0
A 5 0
-T
![Page 23: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/23.jpg)
0
T
1
A
2
C
3
T
4
A
5
A
6
0 0000000
T 1 0
A 2 0
A 3 0
T 4 0
A 5 0
T-
![Page 24: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/24.jpg)
0
T
1
A
2
C
3
T
4
A
5
A
6
0 0000000
T 1 0?
A 2 0
A 3 0
T 4 0
A 5 0
![Page 25: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/25.jpg)
0
T
1
A
2
C
3
T
4
A
5
A
6
0 0000000
T 1 0?
A 2 0
A 3 0
T 4 0
A 5 0
-T
T-
TT
-2
+1-2
![Page 26: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/26.jpg)
0
T
1
A
2
C
3
T
4
A
5
A
6
0 0000000
T 1 01
A 2 0
A 3 0
T 4 0
A 5 0
![Page 27: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/27.jpg)
0
T
1
A
2
C
3
T
4
A
5
A
6
0 0000000
T 1 010
A 2 0
A 3 0
T 4 0
A 5 0
![Page 28: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/28.jpg)
0A 5
0T 4
0A 3
0A 2
0010010T 1
00000000
A
6
A
5
T
4
C
3
A
2
T
10
![Page 29: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/29.jpg)
0A 5
0T 4
0A 3
1200200A 2
0010010T 1
00000000
A
6
A
5
T
4
C
3
A
2
T
10
![Page 30: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/30.jpg)
0A 5
0T 4
3101100A 3
1200200A 2
0010010T 1
00000000
A
6
A
5
T
4
C
3
A
2
T
10
![Page 31: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/31.jpg)
0A 5
1020010T 4
3101100A 3
1200200A 2
0010010T 1
00000000
A
6
A
5
T
4
C
3
A
2
T
10
![Page 32: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/32.jpg)
1300200A 5
1020010T 4
3101100A 3
1200200A 2
0010010T 1
00000000
A
6
A
5
T
4
C
3
A
2
T
10
![Page 33: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/33.jpg)
0
T
1
A
2
C
3
T
4
A
5
A
6
0 000000
T 1 010010
A 2 0020021
A 3 0011013T 4 0100201
A 5 0020031
![Page 34: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/34.jpg)
0
T
1
A
2
C
3
T
4
A
5
A
6
0 000000
T 1 010010
A 2 0020021
A 3 0011013
T 4 0100201
A 5 0020031
Leave only paths from highest score
![Page 35: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/35.jpg)
TAATAA
TACTATAATA
1300200A 5
1020010T 4
3101100A 3
1200200A 2
010010T 1
0000000
A
6
A
5
T
4
C
3
A
2
T
10
1300200A 5
1020010T 4
3101100A 3
1200200A 2
010010T 1
0000000
A
6
A
5
T
4
C
3
A
2
T
10
Both have a score of 3
![Page 36: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/36.jpg)
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
+1 if M2=N2; -1 if M2=N2
-2
N1N2Nn
M1
M2
Mm
N1N2..M1M2..
N1 ..-M1M2..
N1N2..M1 ..-
![Page 37: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/37.jpg)
A 5
T 4
A 3
A 2
T 1
0
A
6
A
5
T
4
C
3
A
2
T
10
Match: +1
Mismatch:-1
Indel: -2
-12-10-8-6-4-2
-10
-8
-6
-4
-2
0
-9-7-5-3-11
130-3-4-7
-202-1-2-5
-3-1-110-3
-6-4-202-1
![Page 38: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/38.jpg)
A 5
T 4
A 3
A 2
T 1
0
A
6
A
5
T
4
C
3
A
2
T
10
Match: +1
Mismatch:-1
Indel: -2
-12-10-8-6-4-2
-10
-8
-6
-4
-2
0
-9-7-5-3-11
130-3-4-7
-202-1-2-5
-3-1-110-3
-6-4-202-1
![Page 39: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/39.jpg)
130-3-1-4-5A 5
-102-1-2-2-4T 4
1-1-110-3-3A 3
-20-202-1-2A 2
-6-4-2-3-11-1T 1
-6-5-4-3-2-100
A
6
A
5
T
4
C
3
A
2
T
10
![Page 40: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/40.jpg)
TACTAATAATA-
TACTAATAAT-A
130-3-1-4-5A 5
-102-1-2-2-4T 4
1-1-110-3-3A 3
-20-202-1-2A 2
-6-4-2-3-11-1T 1
-6-5-4-3-2-100
A
6
A
5
T
4
C
3
A
2
T
10
Both have a score of 1
![Page 41: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/41.jpg)
TAATAA
TACTATAATA
1300200A 5
1020010T 4
3101100A 3
1200200A 2
010010T 1
0000000
A
6
A
5
T
4
C
3
A
2
T
10
1300200A 5
1020010T 4
3101100A 3
1200200A 2
010010T 1
0000000
A
6
A
5
T
4
C
3
A
2
T
10
TACTAATAATA-
TACTAATAAT-A
130-3-1-4-5A 5
-102-1-2-2-4T 4
1-1-110-3-3A 3
-20-202-1-2A 2
-6-4-2-3-11-1T 1
-6-5-4-3-2-100
A
6
A
5
T
4
C
3
A
2
T
10
LocalGlobal
![Page 42: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/42.jpg)
Cool Story of the day
How Archaea was discovered
![Page 43: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/43.jpg)
• 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
![Page 44: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/44.jpg)
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
![Page 45: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/45.jpg)
![Page 46: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/46.jpg)
Nicholas Barton et al (2007) 'Evolution' Backcover
![Page 47: Local Alignment](https://reader035.vdocuments.site/reader035/viewer/2022062221/56813e60550346895da86927/html5/thumbnails/47.jpg)
Stay tuned…
More on phylogenetic trees, multiple sequence alignment and clustering in the next lessons…