129_Lecture5_2014

# What is sequence alignment given two sequences of

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: -1 -3 F -2 -2 -2 -4 -2 -3 -3 -3 -3 -3 -1 -3 -3 0 0 0 -1 6 3 Y -2 -2 -2 -3 -2 -3 -2 -3 -2 -1 2 -2 -2 -1 -1 -1 -1 3 7 2 W -2 -3 -3 -4 -3 -2 -4 -4 -3 -2 -2 -3 -3 -1 -3 -2 -3 1 2 11 1 Patterns on DotPlot Internal Repeat Inser&lt;on (Dele&lt;on) Divergence 6 1/28/14 Patterns on DotPlot Sequence 1 Sequence 2 Patterns on DotPlot With many details! Overall view - no details! What is sequence alignment? Given two sequences of letters and a scoring scheme for evaluating letter matching, find the optimal pairing of letters from one sequence to the other. 7 1/28/14 Ungapped Alignment (From Biochemistry, Stryer, ﬁ=h edi6on) Alignment with gap(s) How do we generate the “best” gapped alignment ? min( N , M ) Total number of possible gapped alignment: ∑ k =1 &quot; N %&quot; M % \$ '\$ ' # k &amp;# k &amp; € Sequence Analysis 1.  Why do we compare sequences? 2.  Sequence comparison: from qualitative to quantitative methods 3.  Deterministic methods: Dynamic programming 1.  Concept 2.  Global Alignment 3.  Statistics 4.  Local Alignment 4.  Heuristics: BLAST 5.  Multiple Sequence Alignment 8 1/28/14 DP and Sequence Alignment Key idea: The score of the optimal alignment that ends at a given pair of positions in the sequences is the score of the best alignment previous to these positions plus the score of aligning these two positions. DP and Sequence Alignment Test all alignments that can lead to i aligned with j i ? j DP and Sequence Alignment Test all alignments that can lead to i aligned with j i ? j 3 possibilities: 1) i- 1 aligned with j- 1 i-1 j-1 i j 9 1/28/14 DP and Sequence Alignment Test all alignments that can lead to i aligned with j i ? j 3 possibilities: 1) i- 1 aligned with j- 1 i-1 j-1 2) i- 1 aligned with k, 1≤k ≤j- 2 i i-1 i k j j -&gt; Choose alignment yielding best score DP and Sequence Alignment Test all alignments that can lead to i aligned with j i ? j 3 possibilities: 1) i- 1 aligned with j- 1 i-1 j-1 2) i- 1 aligned with k, 1≤k ≤j- 2 i j i-1 k 3) j- 1 aligned with l, 1≤l ≤i- 2 i l i j j-1 j -&gt; Choose alignment yielding best score Implementing the DP algorithm for sequences Aligning 2 sequence S1 and S2 of lengths N and M: 1) Build a NxM alignment matrix A such that A(i,j) is the optimal score for alignments up to the pair (i,j) 2) Find the best score in A 3) Track back through the matrix to get the optimal alignment of S1 and S2. 10 1/28/14 Example Sequence 1: AWVCDEC Sequence 2: AWEC Score(i,j) = 10 if i=j, 0 otherwise no gap penalty Example 1) Initialize A W V C D E C A 10 0 0 0 0 0 0 W 0 E 0 C 0 Example 2) Propagate A W V C D E C A 10 0 0 0 0 0 0 W 0 20 E 0 C 0 11 1/28/14 Example 2) Propagate A W V C D E C A 10 0 0 0 0 0 0 W 0 20 10 E 0 C 0 Example 2) Propagate A W V C D E C A 10 0 0 0 0 0 0 W 0 20 10 10 10 10 10 E 0 10 20 20 20 30 20 C 0 10 20 30 20 Example 3) Trace back A W V C D E C A 10 0 0 0 0 0 0 W 0 20 10 10 10 10 10 E 0 10 20 20 20 30 20 C 0 10 20 30 20 20 40 Alignment: AWVCDEC AW------EC Total score: 40 12 1/28/14 Example 2 A A T G C A 10 10 0 0 0 G 0 10 10 20 10 G 0 10 10 20 20 C 0 10 10 10 30 High Score: 30 Alignments: AATGC AG GC AATGC A GGC AATGC AGGC AATG C A GGC AATG C A GGC Example 2 with Gap Gap cost: -2 A A T G C A 10 8 -2 -2 -2 G -2 10 8 18 8 G -2 8 10 18 16 C -2 8 8 10 28 High Score: 28 Alignments: AATGC AG GC AATGC...
View Full Document

## This document was uploaded on 03/12/2014 for the course CSCI 129 at UC Davis.

Ask a homework question - tutors are online