Download presentation
Presentation is loading. Please wait.
1
BNFO 602 Lecture 2 Usman Roshan
2
DNA Sequence Evolution
-3 mil yrs -2 mil yrs -1 mil yrs today TAGGCCTT (Human) TAGCCCTTA (Monkey) A_C_CTT (Cat) A_CACTTC (Lion) _G_GCTT (Mouse) _GGGCTT TAGACCTT A_CACTT AAGGCTT T_GACTT AAGACTT AAGACTT T_GACTT AAGGCTT _GGGCTT TAGACCTT A_CACTT ACCTT (Cat) ACACTTC (Lion) TAGCCCTTA (Monkey) TAGGCCTT (Human) GGCTT (Mouse) _GGGCTT TAGACCTT A_CACTT AAGGCTT T_GACTT AAGACTT T_GACTT AAGGCTT AAGACTT AAGACTT
3
Sequence alignments They tell us about
Function or activity of a new gene/protein Structure or shape of a new protein Location or preferred location of a protein Stability of a gene or protein Origin of a gene or protein Origin or phylogeny of an organelle Origin or phylogeny of an organism And more…
4
Pairwise alignment X: ACA, Y: GACAT Match=8, mismatch=2, gap-5
ACA-- -ACA- --ACA ACA---- GACAT GACAT GACAT G--ACAT Score =
5
Optimal alignment An alignment can be specified by the traceback matrix. How do we determine the traceback for the highest scoring alignment? Needleman-Wunsch algorithm for global alignment First proposed in 1970 Widely used in genomics/bioinformatics Dynamic programming algorithm
6
Needleman-Wunsch Input:
X = x1x2…xn, Y=y1y2…ym (X is seq2 and Y is seq1) Define V to be a two dimensional matrix with len(X)+1 rows and len(Y)+1 columns Let V[i][j] be the score of the optimal alignment of X1…i and Y1…j. Let m be the match cost, mm be mismatch, and g be the gap cost.
7
Dynamic programming Initialization:
for i = 1 to len(seq2) { V[i][0] = i*g; } For i = 1 to len(seq1) { V[0][i] = i*g; } Recurrence: for i = 1 to len(seq2){ for j = 1 to len(seq1){ V[i-1][j-1] + m(or mm) V[i][j] = max { V[i-1][j] + g V[i][j-1] + g if(maximum is V[i-1][j-1] + m(or mm)) then T[i][j] = ‘D’ else if (maximum is V[i-1][j] + g) then T[i][j] = ‘U’ else then T[i][j] = ‘L’ }
8
Traceback code aligned_seq1 = "" aligned_seq2 = "" i = len(seq1)
j = len(seq2) while(i !=0 or j != 0): if(T[i][j] == “L”): aligned_seq1 = “-” + aligned_seq1 aligned_seq2 = seq2[j-1] + aligned_seq2 j = j - 1 elif(T[i][j] == "U"): aligned_seq2 = "-" + aligned_seq2 aligned_seq1 = seq1[i-1] + aligned_seq1 i = i - 1 else:
9
Example V G A C A T A C T Input: seq2: ACA seq1: GACAT m = 5 mm = -4
gap = -20 seq2 is lined along the rows and seq2 is along the columns G A C A T -20 -40 -60 -80 -100 -4 -15 -35 -55 -75 -24 -8 -10 -30 -50 -44 -19 -12 -5 -25 A C T L U D
10
Affine gap penalties Affine gap model allows for long insertions in distant proteins by charging a lower penalty for extension gaps. We define g as the gap open penalty (first gap) and e as the gap extension penalty (additional gaps) Alignment: ACACCCT ACACCCC ACCT T AC CTT Score = Score = 0.9 Trivial cost matrix: match=+1, mismatch=0, gapopen=-2, gapextension=-0.1
11
Affine penalty recurrence
M(i,j) denotes alignments of x1..i and y1..j ending with a match/mismatch. E(i,j) denotes alignments of x1..i and y1..j such that yj is paired with a gap. F(i,j) defined similarly. Recursion takes O(mn) time where m and n are lengths of x and y respectively.
12
How do we pick gap parameters?
13
Structural alignments
Recall that proteins have 3-D structure.
14
Structural alignment - example 1
Alignment of thioredoxins from human and fly taken from the Wikipedia website. This protein is found in nearly all organisms and is essential for mammals. PDB ids are 3TRX and 1XWC.
15
Structural alignment - example 2
Taken from Unaligned proteins. 2bbm and 1top are proteins from fly and chicken respectively. Computer generated aligned proteins
16
Structural alignments
We can produce high quality manual alignments by hand if the structure is available. These alignments can then serve as a benchmark to train gap parameters so that the alignment program produces correct alignments.
17
Benchmark alignments Protein alignment benchmarks
BAliBASE, SABMARK, PREFAB, HOMSTRAD are frequently used in studies for protein alignment. Proteins benchmarks are generally large and have been in the research community for sometime now. BAliBASE 3.0
18
Biologically realistic scoring matrices
PAM and BLOSUM are most popular PAM was developed by Margaret Dayhoff and co-workers in 1978 by examining 1572 mutations between 71 families of closely related proteins BLOSUM is more recent and computed from blocks of sequences with sufficient similarity
19
PAM We need to compute the probability transition matrix M which defines the probability of amino acid i converting to j Examine a set of closely related sequences which are easy to align---for PAM 1572 mutations between 71 families Compute probabilities of change and background probabilities by simple counting
20
Expected accuracy alignment
The dynamic programming formulation allows us to find the optimal alignment defined by a scoring matrix and gap penalties. This may not necessarily be the most “accurate” or biologically informative. We now look at a different formulation of alignment that allows us to compute the most accurate one instead of the optimal one.
21
Posterior probability of xi aligned to yj
Let A be the set of all alignments of sequences x and y, and define P(a|x,y) to be the probability that alignment a (of x and y) is the true alignment a*. We define the posterior probability of the ith residue of x (xi) aligning to the jth residue of y (yj) in the true alignment (a*) of x and y as Do et. al., Genome Research, 2005
22
Expected accuracy of alignment
We can define the expected accuracy of an alignment a as The maximum expected accuracy alignment can be obtained by the same dynamic programming algorithm Do et. al., Genome Research, 2005
23
Example for expected accuracy
True alignment AC_CG ACCCA Expected accuracy=( )/4=1 Estimated alignment ACC_G Expected accuracy=( )/4 ~ 0.75
24
Estimating posterior probabilities
If correct posterior probabilities can be computed then we can compute the correct alignment. Now it remains to estimate these probabilities from the data PROBCONS (Do et. al., Genome Research 2006): estimate probabilities from pairwise HMMs using forward and backward recursions (as defined in Durbin et. al. 1998) Probalign (Roshan and Livesay, Bioinformatics 2006): estimate probabilities using partition function dynamic programming matrices
25
Example
26
Local alignment Global alignment recurrence:
Local alignment recurrence
27
Local alignment traceback
Let T(i,j) be the traceback matrices and m and n be length of input sequences. Global alignment traceback: Begin from T(m,n) and stop at T(0,0). Local alignment traceback: Find i*,j* such that T(i*,j*) is the maximum over all T(i,j). Begin traceback from T(i*,j*) and stop when T(i,j) <= 0.
28
BLAST Local pairwise alignment heuristic
Faster than standard pairwise alignment programs such as SSEARCH, but less sensitive. Online server:
29
BLAST Given a query q and a target sequence, find substrings of length k (k-mers) of score at least t --- also called hits. k is normally 3 to 5 for amino acids and 12 for nucleotides. Extend each hit to a locally maximal segment. Terminate the extension when the reduction in score exceeds a pre-defined threshold Report maximal segments above score S.
30
Finding k-mers quickly
Preprocess the database of sequences: For each sequence in the database store all k-mers in hash-table. This takes linear time Query sequence: For each k-mer in the query sequence look up the hash table of the target to see if it exists Also takes linear time
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.