Presentation is loading. Please wait.

Presentation is loading. Please wait.

Sequence comparison: Local alignment

Similar presentations


Presentation on theme: "Sequence comparison: Local alignment"— Presentation transcript:

1 Sequence comparison: 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 Questions and concerns
Would like more examples of DP matrices. I was wondering if there is a way to practice using the operations we were shown in class? Maybe online practice sets? Ideally, the homework will provide you with this opportunity. When do you want to generate string versus list? A string is similar to a tuple of characters, but strings have lots of string-specific operations defined on them. Could you clarify whether something input to a command line is a list or string? sys.argv is a list of strings. I didn’t realize we’d be learning things today that were needed for the homework. Maybe work one problem together before additional ones individually to learn how to approach the problem.

3 Could we have more clarification on the del operator?
The del operator deletes one object from a list. The object to be deleted is specified by index. >>> myList = [1, 2, 3] >>> myList [1, 2, 3] >>> del myList[1] [1, 3] It is an error to delete beyond the end of the list. >>> del myList[3] Traceback (most recent call last):   File "<stdin>", line 1, in <module> IndexError: list assignment index out of range The remove operator looks for and removes a given object in the list. >>> myList.remove(3) >>> myList [1] It is an error to try to remove an object that is not there. >>> myList.remove(2) Traceback (most recent call last):   File "<stdin>", line 1, in <module> ValueError: list.remove(x): x not in list

4 Things folks liked I liked the longer time dedicated to Python for this lecture. Good examples of inputs and results. I appreciate you going back to the previous lecture material. Problems in class were useful. The sample questions today were helpful. I like the pace and being able to work on problems in class.

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

6 BLAST allows local alignments
Global alignment Local alignment

7 Global alignment DP Align sequence x and y.
F is the DP matrix; s is the substitution matrix; d is the linear gap penalty.

8 Local alignment DP Align sequence x and y.
F is the DP matrix; s is the substitution matrix; d is the linear gap penalty.

9 Local DP in equation form

10 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

11 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

12 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

13 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

14 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

15 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

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

17 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

18 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

19 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

20 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

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


Download ppt "Sequence comparison: Local alignment"

Similar presentations


Ads by Google