Download presentation
Presentation is loading. Please wait.
Published byLilian Carmella Griffin Modified over 6 years ago
1
Sequence comparison: Traceback and local alignment
Genome 559: Introduction to Statistical and Computational Genomics Prof. William Stafford Noble Notes from 2009: This lecture is very light on new content, especially because I had basically explained traceback in the last class. On the other hand, few students complained.
2
Things people liked I was surprised how poorly I understood, until the formula made it clear. Like the inclusion of mathematical form of DP. Great explanation of DP. x2 Going through DP matrix by hand was helpful. x3 Going through Python programs by hand was also helpful. Like the review at the beginning of the lecture. Thank you for the summary slides with operations and methods. x2 I like the format of the class. Examples / practice in class was really good. In-class exercises were very do-able. Loved everything. Level is challenging but not overwhelming. Already feel I’ve learned a lot. Python part of the class is good. Really, really like practice problems. I like how you take time to address concerns at the start of each class. Slides were very clear.
3
Pacing The lecture was a bit fast but kept me engaged. Great pace.
Speed was perfect. Pacing was good for Python problem. Everything seemed to go at a good pace. Pace of the class was good. Much better on timing this time. Pace was a bit quick for Python part of class. I found the first part on DP pretty fast moving, slightly confusing. I thought the programming section went a bit fast. Be sure each student understands the first problem before moving to the second.
4
Suggestions and problems
Can you include the solutions to the problems in the notes? Solutions are in the online versions of the slides. The alignment section is a bit unclear. We will go over this again today. Black on blue hard to read. Agreed. This had to do with “upgrading” PowerPoint. I have now fixed the problem. Text a bit small. Mixed feelings about second part of class. Having laptops out helps us follow along, but it can be distracting, especially when I get stuck on my terrible syntax and the class moves on. I would like more practice in class. I retain more that way. 2nd exercise could be more clear about dealing with inputs of different lengths. Maybe more detailed about the algorithm. Need more time to digest it after the class.
5
DP matrix G A T C -4 -8 -12 -16 -20 -5 -9 -13 -6 5 1 -3 -7 11 7 2 6 -2
-4 -8 -12 -16 -20 -5 -9 -13 -6 5 1 -3 -7 11 7 2 6 -2 17
6
Three legal moves A diagonal move aligns a character from the left sequence with a character from the top sequence. A vertical move introduces a gap in the sequence along the top edge. A horizontal move introduces a gap in the sequence along the left edge.
7
DP matrix GA-ATC CATA-C G A T C -4 -8 -12 -16 -20 -5 -9 -13 -6 5 1 -3
-4 -8 -12 -16 -20 -5 -9 -13 -6 5 1 -3 -7 11 7 2 6 -2 17
8
DP matrix GAAT-C CA-TAC G A T C -4 -8 -12 -16 -20 -5 -9 -13 -6 5 1 -3
-4 -8 -12 -16 -20 -5 -9 -13 -6 5 1 -3 -7 11 7 2 6 -2 17
9
DP matrix GAAT-C C-ATAC G A T C -4 -8 -12 -16 -20 -5 -9 -13 -6 5 1 -3
-4 -8 -12 -16 -20 -5 -9 -13 -6 5 1 -3 -7 11 7 2 6 -2 17
10
DP matrix GAAT-C -CATAC G A T C -4 -8 -12 -16 -20 -5 -9 -13 -6 5 1 -3
-4 -8 -12 -16 -20 -5 -9 -13 -6 5 1 -3 -7 11 7 2 6 -2 17
11
Multiple solutions GA-ATC CATA-C When a program returns a sequence alignment, it may not be the only best alignment. GAAT-C CA-TAC GAAT-C C-ATAC GAAT-C -CATAC
12
DP in equation form Align sequence x and y.
F is the DP matrix; s is the substitution matrix; d is the linear gap penalty.
13
A simple example A G C Find the optimal alignment of AAG and AGC.
Use a gap penalty of d=-5. A C G T 2 -7 -5 A G C
14
A simple example A G C Find the optimal alignment of AAG and AGC.
Use a gap penalty of d=-5. A C G T 2 -7 -5 A G C
15
A simple example A G -5 -10 -15 C
Find the optimal alignment of AAG and AGC. Use a gap penalty of d=-5. A C G T 2 -7 -5 A G -5 -10 -15 C
16
A simple example A G -5 -10 -15 2 -3 -8 -1 C -6
Find the optimal alignment of AAG and AGC. Use a gap penalty of d=-5. A C G T 2 -7 -5 A G -5 -10 -15 2 -3 -8 -1 C -6
17
Traceback Start from the lower right corner and trace back to the upper left. Each arrow introduces one character at the end of each aligned sequence. A horizontal move puts a gap in the left sequence. A vertical move puts a gap in the top sequence. A diagonal move uses one character from each sequence.
18
A simple example A G -5 2 -3 -1 C -6
Find the optimal alignment of AAG and AGC. Use a gap penalty of d=-5. Start from the lower right corner and trace back to the upper left. Each arrow introduces one character at the end of each aligned sequence. A horizontal move puts a gap in the left sequence. A vertical move puts a gap in the top sequence. A diagonal move uses one character from each sequence. A G -5 2 -3 -1 C -6
19
A simple example A G -5 2 -3 -1 C -6
Find the optimal alignment of AAG and AGC. Use a gap penalty of d=-5. Start from the lower right corner and trace back to the upper left. Each arrow introduces one character at the end of each aligned sequence. A horizontal move puts a gap in the left sequence. A vertical move puts a gap in the top sequence. A diagonal move uses one character from each sequence. A G -5 2 -3 -1 C -6 AAG- AAG- -AGC A-GC
20
Traceback problem #1 G A T C -4 -8 -12 -16 -20 -5 -9 -13 -6 5 1 -3 -7
-4 -8 -12 -16 -20 -5 -9 -13 -6 5 1 -3 -7 11 7 2 6 -2 17 Write down the alignment corresponding to the circled score.
21
Solution #1 GA CA G A T C -4 -8 -12 -16 -20 -5 -9 -13 -6 5 1 -3 -7 11
-4 -8 -12 -16 -20 -5 -9 -13 -6 5 1 -3 -7 11 7 2 6 -2 17 Write down the alignment corresponding to the circled score.
22
Traceback problem #2 G A T C -4 -8 -12 -16 -20 -5 -9 -13 -6 5 1 -3 -7
-4 -8 -12 -16 -20 -5 -9 -13 -6 5 1 -3 -7 11 7 2 6 -2 17 Write down three alignments corresponding to the circled score.
23
Solution #2 GAATC CA--- G A T C -4 -8 -12 -16 -20 -5 -9 -13 -6 5 1 -3
-4 -8 -12 -16 -20 -5 -9 -13 -6 5 1 -3 -7 11 7 2 6 -2 17 Write down three alignments corresponding to the circled score.
24
Solution #2 GAATC C-A-- GAATC CA--- G A T C -4 -8 -12 -16 -20 -5 -9
-4 -8 -12 -16 -20 -5 -9 -13 -6 5 1 -3 -7 11 7 2 6 -2 17 Write down three alignments corresponding to the circled score.
25
Solution #2 GAATC -CA-- GAATC C-A-- GAATC CA--- G A T C -4 -8 -12 -16
-4 -8 -12 -16 -20 -5 -9 -13 -6 5 1 -3 -7 11 7 2 6 -2 17 Write down three alignments corresponding to the circled score.
26
Local alignment A single-domain protein may be homologous to a region within a multi-domain protein. Usually, an alignment that spans the complete length of both sequences is not required.
27
BLAST allows local alignments
Global alignment Local alignment
28
Global alignment DP Align sequence x and y.
F is the DP matrix; s is the substitution matrix; d is the linear gap penalty.
29
Local alignment DP Align sequence x and y.
F is the DP matrix; s is the substitution matrix; d is the linear gap penalty.
30
Local DP in equation form
31
A simple example Find the optimal local alignment of AAG and AGC. Use a gap penalty of d=-5. A C G T 2 -7 -5 A G C
32
A simple example Find the optimal local alignment of AAG and AGC. Use a gap penalty of d=-5. A C G T 2 -7 -5 A G C
33
A simple example Find the optimal local alignment of AAG and AGC. Use a gap penalty of d=-5. A C G T 2 -7 -5 A G C 2 -5 -5
34
A simple example Find the optimal local alignment of AAG and AGC. Use a gap penalty of d=-5. A C G T 2 -7 -5 A G 2 ? C
35
A simple example Find the optimal local alignment of AAG and AGC. Use a gap penalty of d=-5. A C G T 2 -7 -5 A G 2 ? C
36
A simple example Find the optimal local alignment of AAG and AGC. Use a gap penalty of d=-5. A C G T 2 -7 -5 A G 2 4 C
37
Local alignment Two differences with respect to global alignment:
No score is negative. Traceback begins at the highest score in the matrix and continues until you reach 0. Global alignment algorithm: Needleman-Wunsch. Local alignment algorithm: Smith-Waterman.
38
A simple example Find the optimal local alignment of AAG and AGC. Use a gap penalty of d=-5. A C G T 2 -7 -5 A G 2 4 C AG
39
Local alignment Find the optimal local alignment of AAG and GAAGGC. Use a gap penalty of d=-5. A C G T 2 -7 -5 A G C
40
Local alignment Find the optimal local alignment of AAG and GAAGGC. Use a gap penalty of d=-5. A C G T 2 -7 -5 A G 2 4 6 C
41
Local alignment AAG A G 2 4 6 C
Find the optimal local alignment of AAG and GAAGGC. Use a gap penalty of d=-5. A C G T 2 -7 -5 A G 2 4 6 C AAG
42
Summary Local alignment finds the best match between subsequences.
Smith-Waterman local alignment algorithm: No score is negative. Trace back from the largest score in the matrix.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.