20 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, Global and local alignment of two sequences using dynamic programming

Size: px
Start display at page:

Download "20 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, Global and local alignment of two sequences using dynamic programming"

Transcription

1 20 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, Pairwise alignment We will discuss: 1. Strings 2. Dot matrix method for comparing sequences 3. Edit distance 4. Global and local alignment of two sequences using dynamic programming 4.1 Strings Definition An alphabet Σ is a finite, non-empty set. The elements of an alphabet are called symbols or letters. A string S over an alphabet Σ is obtained by writing a finite sequence S = s 1 s 2... s n of symbols from Σ. The length of a string S is the number of symbols in S, denoted by S. The alphabet for DNA is Σ = {A, G, C, T } and e.g. is a string over Σ of length 15. S = AT GGAAT GCT AAT AG Note: the words String and sequence are used as synonyms in bioinformatics. Usually we will use the word sequence in the biological context (such as DNA and protein sequences) and string in more abstract settings. Definition Let S and T be two strings over an alphabet Σ. concatenation of S and T. We will use ST to denote the Note: Generally ST T S for strings. Definition Let S and T be two strings over an alphabet Σ. We call S a substring of T if there exist strings U, V over Σ such that T = USV. Definition Let Σ be an alphabet and let S = s 1... s n with s i Σ. For all i, j {1,..., n}, i < j, we denote the substring s i... s j by S[i, j]. Example: T = AT GGAAT GCT AAT AG then S = AAT GCT is a substring of T, Definition Let S = s 1... s n be a sequence of length n over the DNA alphabet Σ = {A, G, C, T }. The sequence S C = s c n... s c 1 with A if s i = T s c G if s i = i = C T if s i = A C if s i = G is called the reverse complement of S.

2 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, Sequence formats The most widely used format for DNA and protein sequences is FASTA (pronounced fast-ay). Single FASTA format: Each record has a header line that starts with the symbol > and contains an identifier for the sequence. The following lines contain the actual sequence. Empty lines are skipped. Example: >gi sp P09184 VSR_ECOLI PATCH REPAIR PROTEIN MADVHDKATRSKNMRAIATDTAIEKRLASLLTGQGLAFRVQDASLPGRPDFVV DEYRCVIFTHGCFWHHHHCYLFKVPATRTEFWLEKIGKNVERDRRDISRLQEL GWRVLIVWECALRGREKLTDEALTERLEEWICGEGASAQIDTQGIHLLA Multiple-FASTA-Format: A file in multiple-fasta format contains a series of FASTA records. Example: >SEQUENCE 1 ACTCFTGCGCGCGC... >SEQUENCE 2 ACGCGCGCTCFTGCGCGCGC... >SEQUENCE 3 GTTGGGACTCFTGCGCGCGC... >SEQUENCE 4 TGCGCACTCFTGCGCGCGC Dot matrix sequence comparison A dot matrix analysis is primarily a method for comparing two sequences. An (n m) matrix relating two sequences of length n and m repectively is produced: by placing a dot at each cell for which the corresponding symbols match. Here is an example for the two sequences IMISSMISSISSIPPI and MYMISSISAHIPPIE: Definition Let S = s 1 s 2... s n and T = t 1... t m be two strings of length n and m respectively. A (simple) dot matrix is an n m matrix M defined as: for all i, j with 1 i n, 1 j m. M[i, j] = { 1 for si = t j 0 else,

3 22 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, 2008 Note: The longest common substring within the two strings S and T is then the longest matrix subdiagonal containing only 1s. However, rather than drawing the digit 1 we draw a dot. Some of the properties of a dot plot are the visualization is easy to understand it is easy to find common substrings, they appear as contiguous dots along a diagonal it is easy to find reversed substrings (see assignment) it is easy to discover displacements it is easy to find repeats Example: DNA sequences which encode the Bacteriophage lambda and Bacteriophage P22 repressor proteins: Dot plots of biological sequences will usually contain lots of dots, many of which are considered as noise. To reduce the noise, a window size w and a stringency s are used and a dot is only drawn at point (x, y) if in the next w positions at least s characters are equal. w = 1, s = 1 w = 11, s = 7 w = 23, s = 15 Dot matrix analysis of human LDL receptor protein 1 against itself: 1 The low density lipoprotein (LDL) receptor is a cell surface protein that plays a central role in the metabolism of cholesterol in humans and animals. Mutations affecting its structure and function give rise to one of the most prevalent human genetic diseases, familial hypercholesterolemia.

4 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, w = 1, s = 1 w = 23, s = 7 The dot plot on the right reveals many repeats in the first 300 positions. 4.4 Limitations of dot plots Only a visualization tool... No score to quantify identical or similar strings Runtime is quadratic; more efficient algorithms to identify identical substrings exist (e.g. based on suffix trees) 4.5 Comparing sequences The comparison of biological sequences is one of the most important operations in computational biology Biology s paradigm: High sequence similarity implies similar structure and/or function In an alignment of two sequences: place one sequences above the other one such that similar or identical characters are in the same column and non-identical/non-similar characters are either placed in the same column as a mismatch or opposite a gap in the other sequence. Example: Two strings: Alignment: IMISSMISSISSIPPI I-MISSMISSISIPPI- MYMISSISAHIPPIE MYMISS-ISAH-IPPIE Definition Given two sequences X and Y over an alphabet Σ. An alignment A of X and Y is obtained by inserting dashes ( - ) so that both resulting strings X and Y are of equal length and thus can be written one above the other in such a way that each character in the one string is opposite a unique character in the other string. Note: Usually, we require that no two dashes are aligned in this way. Example: is one alignment, another one is X= Y E - S T E R D A Y Y= - E A S T E R S - -

5 24 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, 2008 Which one is the best alignment? X= Y E - S T E R D A Y Y= - E A S T E R - S - In order to evaluate an alignment we need a scoring system. The score of two aligned characters in biology is mostly a similarity score, however we will first start with the mathematical concepts of distances of sequences and/or characters in sequences Hamming distance Definition Let X = (x 1,..., x n ) and Y = (y 1,..., y n ) be two strings of length n over an alphabet Σ. Then d H (X, Y ) = {i : x i y i } is called the Hamming distance. Example: X =ATGGAACTA Y =ATGCAAGAT d H (X, Y ) = Edit or Levenshtein distance One way of defining the distance between two strings follows from the possibilities and number of editing operations needed to transform one string into the other. Definition The edit distance (also known as Levenshtein distance) d edit between two sequences X and Y is is the minimum number of edit operations of type Replacement, Insertion, or Deletion, that one needs to transform sequence X into sequence Y : d edit (X, Y ) = min{r(x, Y ) + I(X, Y ) + D(X, Y )} Using M for match, an edit transcript is a string over the alphabet I, D, R, M that describes a transformation of X to Y. Example: Given two strings X = Y = YESTERDAY EASTERS Here is a minimum edit transcript for the above example: edit transcript= D M I M M M M R D D. X= Y E S T E R D A Y Y= E A S T E R S The edit distance d edit (X, Y ) of X, Y is 5. Edit transcripts and alignments are mathematically equivalent ways of describing a relationship between two strings.

6 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, However, an edit transcript implies a set of putative mutational events, whereas an alignment presents a static picture of the relationship. To obtain an algorithm for computing the edit distance, it is best to aim at computing an optimal alignment Dynamic programming calculation of the edit distance Given two sequences X = x 1... x n and Y = y 1... y m. We want to compute the edit distance D edit (X, Y ) between X and Y. Let D(i, j) denote the edit distance of the two prefixes x 1... x i and y 1... y j. We want to obtain D edit (X, Y ) = D(n, m) by computing D(i, j) for all pairs of prefixes x 1... x i and y 1... y j. We will use the standard dynamic programming approach that has three essential components: the recurrence relation, the tabular computation, and the traceback. The recursion is computed in tabular form: 0 x 1 x 2 x 3... x i 1 x i... x n 0 D(0, 0) y 1 y 2 y 3... y j 1 D(i 1, j 1) D(i, j 1) y j D(i 1, j) D(i, j)... y m The recurrence relation determines how we can obtain the value for D(i, j) from values for smaller indices. When there are no smaller indices, then we must explicitly state base conditions. Base conditions: We set D(i, 0) = i for all 0 i n. This corresponds to an alignment in which the first i characters of X are aligned to the left of the first character of Y. x 1 x 2... x i x i+1... y 1 We set D(0, j) = j for all 1 j m. This corresponds to an alignment in which the first j characters of Y occur to the left of the first character of X.... x 1 y 1 y 2... y j y j+1

7 26 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, The recurrence relation The recurrence relation for D(i, j) when both i and j are positive, is given by D(i, j) = min {D(i, j 1) + 1, D(i 1, j) + 1, D(i 1, j 1) + t(i, j)}, { 0 if xi = y where t(i, j) = j, 1 else. Example: We can compute the edit score between sequences GATTAG and ATTAC by filling the following matrix: Distance: D 0 G A T T A G 0 A T T A C Proof of the recurrence relation Theorem The above recurrence relation is correct. For the proof we will show: Lemma 1 The value of D(i, j) must be either D(i, j 1) + 1, D(i 1, j) + 1 or D(i 1, j 1) + t(i, j). Lemma 2 D(i, j) min {D(i, j 1) + 1, D(i 1, j) + 1, D(i 1, j 1) + t(i, j)}. Proof of Lemma 1 Given a minimum edit transcript t 1... t r of x 1... x i to y 1... y j. There are four possibilities for the last symbol t r : I The last operation was to insert y j at the end of the first string. Hence, t 1... t r 1 is a minimum edit transcript of x 1... x i to y 1... y j 1. By definition, the latter contains D(i, j 1) edit operations, thus D(i, j) = D(i, j 1) + 1. D The last operation was to delete x i. Hence, t 1... t r 1 is a minimum edit transcript of x 1... x i 1 to y 1... y j. By definition, the latter contains D(i 1, j) edit operations, thus D(i, j) = D(i 1, j) + 1. R, M The last operation was to replace (or match) x i by y j. Thus t 1... t r 1 is a minimum edit transcript of x 1... x i 1 to y 1... y j 1 that contains D(i 1, j 1) + t(i, j) edit operations. Proof of Lemma 2 We show that all three scores can be achieved, thus so can their minimum:

8 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, There exists a transcript with score D(i, j 1) + 1: transform x 1... x i to y 1... y j 1 using D(i, j 1) edit operations, then use one more to insert y j. There exists a transcript with score D(i 1, j) + 1: transform x 1... x i 1 to y 1... y j using D(i 1, j) edit operations, then use one more to delete x i. There exists a transcript with score D(i 1, j 1) + t(x i, y j ): transform x 1... x i 1 to y 1... y j 1 using D(i 1, j 1) edit operations, then replace by, or match, x i and y j, using one or zero more edit operations, respectively Traceback How to obtain an actual edit transcript that corresponds to the minimal edit distance? Starting at the last cell in the table, trace-back through the table via the predecessor cells that gave rise to the values of the cells Traceback D 0 G A T T A G A T T A C Edit transcript: I M M M M R Alignment: G A T T A G - A T T A C Weighted edit distance We can generalize the edit distance by weighting each of the edit operations I, D and R by a number. The operation weighted edit distance between two sequences X and Y is the minimum sum of weights of any edit transcript from X to Y. A second important generalization is obtained by making the score of an edit operation depend on the characters involved. This gives rise to the alphabet weighted edit distance. Definition Let Σ be a finite alphabet and d a metric on Σ. Let ɛ Σ denote the gap symbol. Then for two strings X and Y of length n and m, respectively, D(i, j):=min {D(i, j 1)+d(x i, ɛ), D(i 1, j)+d(y j, ɛ), D(i 1, j 1)+d(x i, y j )}, and D(n, m) is the alphabet-weighted edit distance between X and Y.

9 28 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, Sequence similarity We have seen how to express string relatedness using the edit distance. In biology, we are usually interested in similarity rather than distance. Given two sequences X = x 1... x n and Y = y 1... y m over an alphabet Σ. A similarity score matrix s : Σ {ɛ} Σ {ɛ} R assigns a similarity score to each pair of characters in Σ {ɛ}. Let A be an alignment of X and Y : X = x 1... x l and Y = y 1... y l denote the two strings obtained after inserting dashes (for the gap symbol ɛ), both of length l. The score S(A) of A is defined as S(A) = l s(x i, y i). i=1 4.7 Similarity alignment Example: for Σ = {A, B, L, } we use the similarity score matrix: s A B L A B L Example of an alignment and the calculation of its score: X = B L A - B L A Y = A L A B B L = Pairwise alignment: Example Alignment between very similar human alpha- and beta globins: HBA_HUMAN HBB_HUMAN GSAQVKGHGKKVADALTNAVAHVDDMPNALSALSDLHAHKL G+ +VK+HGKKV A+++++AH+D LS+LH KL GNPKVKAHGKKVLGAFSDGLAHLDNLKGTFATLSELHCDKL Here there are many positions at which the two corresponding residues are identical. Many others are functionally conserved, e.g. the D-E pair, both negatively charged amino acids. Plausible alignment to leghaemoglobin from yellow lupin: HBA_HUMAN GSAQVKGHGKKVADALTNAVAHV---D--DMPNALSALSDLHAHKL H+ KV + +A ++ +L+ L+++H+ K LGB2_LUPLU NNPELQAHAGKVFKLVYEAAIQLQVTGVVVTDATLKNLGSVHVSKG

10 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, These two proteins are known to be evolutionarily related, have the same 3D structure and both have the same function, thus this is most probably a biologically meaningful alignment. However, there are only a few identities and many gaps. A spurious high-scoring alignment of human alpha globin to a nematode glutathione S- transferase homologue: HBA_HUMAN F11G11.2 GSAQVKGHGKKVADALTNAVAHVDDMPNALSALSD----LHAHKL GS+ + G + +D L ++ H+ D+ A +AL D ++AH+ GSGYLVGDSLTFVDLLVAQHTADLL--AANAALLDEFPQFKAHQE This alignment has a similar number of identities and conservative changes as in the previous example. However, it is an alignment between two proteins that have completely different structure and function, and is thus considered spurious. 4.9 Substitution matrices To be able to score an alignment, we need to determine score terms for each aligned residue pair. Definition A substitution matrix S over an alphabet Σ = {a 1,..., a κ } has κ κ entries, where each entry (i, j) assigns a score for a substitution of the letter a i by the letter a j in an alignment. Substitution matrices are generated as follows: Consider a database of high quality non-gapped alignments. Compute the frequency f(a i ) of each symbol a i and the frequency f(a i, a j ) of each substitution a i a j in the database. Based on this counts, compare a null/random model against the match model Consider non-gapped alignments of the form: X = x 1 x 2... x n Y = y 1 y 2... y n The null hypothesis is: the two sequences are unrelated (not homologous). So, the alignment is then random with a probability described by a random model R: each letter a occurs independently with some probability p a, and the probability of the two sequences is the product: P (X, Y R) = p xi p yj. i j The alternative hypothesis is the match model M: the two sequences are related (homologous). Aligned pairs of residues occur with a joint probability p ab, the probability that a and b have each evolved from some (unknown) common ancestor residue c. In this case, the probability for the whole alignment is: P (X, Y M) = i p xi y i.

11 30 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, 2008 The ratio of the two gives a measure of the relative likelihood that the sequences are related (model M) as opposed to being unrelated (model R). This ratio is called the odds ratio: P (X, Y M) P (X, Y R) = i p x i y i i p x i i p y i = i p xi y i p xi p yi To obtain an additive scoring scheme, we take the logarithm (base 2 is usually chosen) to get the log-odds ratio: P (X, Y M) S = log( P (X, Y R) ) = log( p xi y i ) = s(x i, y i ), p i xi p yi i with ( ) pab s(a, b) := log. p a p b In this approach, a matrix S = s(a, b) determines the score for each aligned residue pair, known as a score or substitution matrix. For amino-acid alignments, commonly used matrices are the PAM and BLOSUM matrices BLOSUM matrices A popular family of substitution matrices are the BLOSUM (=BLOcks SUbstitution Matrix) matrices. These were empirically derived as described above from the BLOCKS database (Henikoff and Henikoff, 1992). Blocks are multiply aligned ungapped segments corresponding to the most highly conserved regions of proteins. Different members of the BLOSUM family of matrices were created by considing alignments of sequences with different levels of identity. For example, the most commonly used matrix is BLOSUM62. To create this matrix, sequences where clustered so that any two sequences of 62% sequence identity are placed in the same cluster and all counts are based on comparisons between pair of sequences contained in different clusters BLOSUM62 BLOSUM matrices are scaled so that their values are in half-bits, that is, the log-odds were multiplied by 2/ log 2 and then rounded to the nearest integer value. A R N D C Q E G H I L K M F P S T W Y V A R N D C Q E G H I L K M F P S T W Y V

12 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, Classification of amino acids Notice that the values in the BLOSUM62 matrix reflect some of the similarities between different amino-acids shown here: 4.13 Gap penalties Gaps are undesirable and thus penalized. The standard cost associated with a gap of length g is given either by a linear score γ(g) = gd or an affine score γ(g) = d (g 1)e, where d is the gap open penalty and e is the gap extension penalty. Usually, e < d, with the result that less isolated gaps are produced, as shown in the following comparison: Linear gap penalty: GSAQVKGHGKKVADALTNAVAHVDDMPNALSALSDLHAHKL GSAQVKGHGKK VA--D----A-SALSDLHAHKL Affine gap penalty: GSAQVKGHGKKVADALTNAVAHVDDMPNALSALSDLHAHKL GSAQVKGHGKKVADA SALSDLHAHKL 4.14 The number of possible alignments How many different gapped alignments are possible between two sequences x = (x 1, x 2,..., x n ) and y = (y 1, y 2,..., y m )? A sequences of pairs (i 1, j 1 ), (i 2, j 2 ),..., (i r, j r ) is called a subsequence of indices of x and y, if 1 i 1 i 2 i r n and if 1 j 1 j 2 j r m. We use such a subsequence to specify the set of all positions that are paired by a given alignment of x and y. Example: Alignment Subsequence a - c g t g t a - c a c g t g t a c \ / / a g c - t - g a c c a g c t g a c c

13 32 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, 2008 Here the subsequence is: (1, 1), (2, 3), (4, 4), (6, 5), (7, 6), (8, 8). Lemma The number of possible alignments between x and y equals the number of possible subsequences of indices, min(n,m) ( )( ) n m N(n, m) =. r r r=0 Proof: For each r {0, 1,..., min(n, m)}: the number of ordered selections of i 1, i 2,..., i r in 1, 2,..., n is ( ) n r and the number of ordered selections of j1, j 2,..., j r in 1, 2,..., m is ( ) m r. All these possibilities can be combined. The number N(n, n) = n ( n n ( r=0 r)( r) = 2n ) n can be approximated by 2 2n πn, using Stirling s formula. Hence, N(1000, 1000) Alignment algorithms Given a scoring scheme, we need to have an algorithm that computes the highest-scoring alignment of two sequences. As for the edit distance-based alignments we will discuss alignment algorithms based on dynamic programming. They are guaranteed to find the optimal scoring alignment. However, for large sequences they can be too slow and heuristics (such as BLAST, FASTA, MUMMER etc) are then used that usually perform very well, but will miss the best alignment for some sequence pairs. In particular we will study an algorithm for the computation of a global alignment and one for the computation of a local alignment Global alignment: Needleman-Wunsch algorithm The Needleman-Wunsch algorithm 2 is a dynamic program that solves the problem of obtaining the best global alignment of two sequences. Idea: Build up an optimal alignment using previous solutions for optimal alignments of smaller substrings. Given two sequences X = (x 1, x 2,..., x n ) and Y = (y 1, y 2,..., y m ). We will compute a matrix F : {1, 2,..., n} {1, 2,..., m} R in which F (i, j) equals the best score of the alignment of the two prefixes (x 1, x 2,..., x i ) and (y 1, y 2,..., y j ) Needleman-Wunsch algorithm This will be done recursively by setting F (0, 0) = 0 and then computing F (i, j) from F (i 1, j 1), F (i 1, j) and F (i, j 1): 2 Saul Needleman and Christian Wunsch (1970), improved by Peter Sellers (1974).

14 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, x 1 x 2... x i 1 x i... x n 0 F (0, 0) y 1 y 2... y j 1 F (i 1, j 1) F (i, j 1) y j F (i 1, j) F (i, j)... y m The recursion There are three ways in which an alignment can be extended up to (i, j): x i aligns to y j : x i aligns to a gap: y j aligns to a gap: A G A x i A G G y j A A G A x i A G G y j - T G A x i - T G G C y j We obtain F (i, j) as the largest score arising from these three options: F (i 1, j 1) + s(x i, y j ) F (i, j) := max F (i 1, j) d F (i, j 1) d. This is applied repeatedly until the whole matrix F (i, j) is filled with values The recursion To complete the description of the recursion, we need to set the values of F (i, 0) and F (0, j) for i 0 and j 0: We set F (i, 0) = for i = 0, 1,..., n and we set F (0, j) = for j = 0, 1,..., m. The final value F (n, m) contains the score of the best global alignment between X and Y. To obtain an alignment corresponding to this score, we must find the path of choices that the recursion made to obtain the score using traceback Example of a global alignment matrix Needleman-Wunsch matrix of the sequences GATTAG and ATTAC, scoring values s(a, a) = 1, s(a, b) = 1 and a linear gap cost of d = 2:

15 34 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, 2008 F 0 G A T T A G 0 0 A T T A C Score: ; Alignment: Pseudo code of Needleman-Wunsch algorithm Input: two sequences X and Y Output: optimal alignment and score α Initialization: Set F (i, 0) := i d for all i = 0, 1, 2,..., n Set F (0, j) := j d for all j = 0, 1, 2,..., m For i = 1, 2,..., n do: For j = 1, 2,..., m do: 8 < Set F (i, j) := max : F (i 1, j 1) + s(x i, y j) F (i 1, j) d F (i, j 1) d Set backtrace T (i, j) to the maximizing pair (i, j ) The best score is α := F (n, m) Set (i, j) := (n, m) repeat if T (i, j) = (i 1, j 1) print `x i 1 y j 1 else if T (i, j) = (i 1, j) print `x i 1 Set (i, j) := T (i, j) until (i, j) = (0, 0). else print ` y j Complexity Complexity of the Needleman-Wunsch algorithm: We need to store (n + 1) (m + 1) numbers. Each number takes a constant number of calculations to compute: three additions and a max. Hence, the algorithm requires O(nm) time and memory. Something to think about: if we are only interested in the best score, but not the actual alignment, then it is easy to reduce the space requirement to linear Local alignment Global alignment is applicable when we have two similar sequences that we want to align from endto-end, e.g. two homologous genes from related species. Often, however, we have two sequences X and Y and we would like to find the best match between substrings of both. For example, we may want to find the position of a fragment of DNA in a genomic sequence:

16 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, AATGATCGTAGCGCTGAGAGGGGGAGGAGTTTAGGCGATGA GCTCAGAGAGGGAC Here the score of an alignment between two substrings would be larger than the score of an alignment between the full lengths strings Smith-Waterman algorithm The Smith-Waterman 3 local alignment algorithm is obtained by making two simple modifications to the global alignment algorithm. (1) In the main recursion, we set the value of F (i, j) to zero, if all attainable values at position (i, j) are negative: 0, F (i 1, j 1) + s(x F (i, j) = max i, y j ), F (i 1, j) d, F (i, j 1) d. The value F (i, j) = 0 indicates that we should start a new alignment at (i, j). This implies for the base conditions: set F (i, 0) = and F (0, j) = for all i = 0, 1, 2,..., n and j = 0, 1, 2,..., m Smith-Waterman algorithm (2) Instead of starting the traceback at (n, m), we start it at the cell with the highest score: arg max F (i, j). The traceback ends upon arrival at a cell with score 0, with corresponds to the start of the alignment. For this algorithm to work, we require that the expected score for a random match is negative, i.e. that p a p b s(a, b) < 0, a,b Σ where p a and p b are the probabilities for the seeing the symbol a or b respectively, at any given position. Otherwise, matrix entries will tend to be positive, producing long matches between random sequences Example Smith-Waterman matrix of the sequences GATTAG and ATTAC with s(a, a) = 1, s(a, b) = 1 and s(a, ) = s(, a) = 2: 3 Smith, T. and M. Waterman, Identification of common molecular subsequences. J. Mol. Biol. 147: , 1981

17 36 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, 2008 F 0 G A T T A G 0 A T T A C Score: ; Alignment = Pseudo code of Smith-Waterman algorithm Input: two sequences X and Y Output: optimal local alignment and score α Initialization: Set F (i, 0) := 0 for all i = 0, 1, 2,..., n Set F (0, j) := 0 for all j = 1, 2,..., m For i = 1, 2,..., n do: For j = 1, 2,..., m do: 8 >< Set F (i, j) := max >: 0 F (i 1, j 1) + s(x i, y j) F (i 1, j) d F (i, j 1) d Set backtrace T (i, j) to the maximizing pair (i, j ) Set (i, j) := arg max{f (i, j) i = 1, 2,..., n, j = 1, 2,..., m} The best score is α := F (i, j) repeat if T (i, j) = (i 1, j 1) print `x i 1 y j 1 else if T (i, j) = (i 1, j) print `x i 1 Set (i, j) := T (i, j) until F (i, j) = 0. else print ` y j Summary We have discussed: the dot matrix for visual comparison of two sequences, the edit distance and the dynamic programming algorithm for its computation, global alignments and the Needleman-Wunsch algorithm, and local alignments and the Smith-Waterman algorithm. An implementation of any of the dynamic programming algorithms uses O(nm) time and O(nm) space.

18 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, Affine gap scores The standard alternative to using the above recursion is to use an affine gap score γ(g) = d (g 1)e, with d the gap-open score and e the gap-extension score. We will discuss how to modify the Needleman-Wunsch algorithm for global alignment so as to incorporate affine gap costs. Approach is due to Osamu Gotoh (1982) 4 Instead of using one matrix F (i, j) to represent the best score attainable up to x i and y j, we will now use three matrices M, I x and I y : Case 1 Case 2 Case 3 x i aligns to y j : x i aligns to a gap: y j aligns to a gap: I G A x i L G V y j A I G A x i A G V y j - S G A x i - S L G V y j 1. M(i, j) is the best score up to (i, j), given that x i is aligned to y j, 2. I x (i, j) is the best score up to (i, j), given that x i is aligned to a gap, and 3. I y (i, j) is the best score up to (i, j), given that y j is aligned to a gap Recursion for global alignment with affine gap costs Initialization: M(0, 0) = 0, I x (0, 0) = I y (0, 0) = I x (i, 0) = d (i 1)e, M(i, 0) = I y (i, 0) =, for i = 1,..., n, and I y (0, j) = d (j 1)e, M(0, j) = I x (0, j) =, for j = 1,..., m. Recursion: { M(i 1, j) d, I x (i, j) = max I x (i 1, j) e; { M(i, j 1) d, I y (i, j) = max I y (i, j 1) e; M(i, j) = max M(i 1, j 1) + s(x i, y j ), I x (i 1, j 1) + s(x i, y j ), I y (i 1, j 1) + s(x i, y j ). Here we assume that a gap in one string is not immediately followed by a gap in the other, which is ok, if d e is < the lowest mismatch score Example of a global alignment with affine gap costs Given two sequences X = TTAGAT and Y = TTG. We use s(a, a) = 1, s(a, b) = 1, γ(g) = d (g 1)e with d = 4 and e = 1 for the match, mismatch, gap-open and gap-extension scores, respectively: 4 Gotoh, O. An improved algorithm for matching biological sequences. J. Mol. Biol. 162: , 1982.

19 38 Grundlagen der Bioinformatik, SS 08, D. Huson, May 27, T T G M I x I y M I x I y M I x I y M I x I y 0 T T A G T 4.23 Automaton description We can interpret the three matrices M, I x and I y as three different states in a finite state automaton. This automaton emits two aligned characters on transition across an edge: gap open gap open start substitution substitution gap open gap extension I x substitution M gap open I y gap extension substitution end We do not want a gap in x to be immediately followed by a gap in y. Therefore, there is no transition between I x and I y.

8 Grundlagen der Bioinformatik, SS 09, D. Huson, April 28, 2009

8 Grundlagen der Bioinformatik, SS 09, D. Huson, April 28, 2009 8 Grundlagen der Bioinformatik, SS 09, D. Huson, April 28, 2009 2 Pairwise alignment We will discuss: 1. Strings 2. Dot matrix method for comparing sequences 3. Edit distance and alignment 4. The number

More information

8 Grundlagen der Bioinformatik, SoSe 11, D. Huson, April 18, 2011

8 Grundlagen der Bioinformatik, SoSe 11, D. Huson, April 18, 2011 8 Grundlagen der Bioinformatik, SoSe 11, D. Huson, April 18, 2011 2 Pairwise alignment We will discuss: 1. Strings 2. Dot matrix method for comparing sequences 3. Edit distance and alignment 4. The number

More information

Pairwise sequence alignment

Pairwise sequence alignment Department of Evolutionary Biology Example Alignment between very similar human alpha- and beta globins: GSAQVKGHGKKVADALTNAVAHVDDMPNALSALSDLHAHKL G+ +VK+HGKKV A+++++AH+D++ +++++LS+LH KL GNPKVKAHGKKVLGAFSDGLAHLDNLKGTFATLSELHCDKL

More information

2 Pairwise alignment. 2.1 References. 2.2 Importance of sequence alignment. Introduction to the pairwise sequence alignment problem.

2 Pairwise alignment. 2.1 References. 2.2 Importance of sequence alignment. Introduction to the pairwise sequence alignment problem. 2 Pairwise alignment Introduction to the pairwise sequence alignment problem Dot plots Scoring schemes The principle of dynamic programming Alignment algorithms based on dynamic programming 2.1 References

More information

Pairwise alignment. 2.1 Introduction GSAQVKGHGKKVADALTNAVAHVDDMPNALSALSD----LHAHKL

Pairwise alignment. 2.1 Introduction GSAQVKGHGKKVADALTNAVAHVDDMPNALSALSD----LHAHKL 2 Pairwise alignment 2.1 Introduction The most basic sequence analysis task is to ask if two sequences are related. This is usually done by first aligning the sequences (or parts of them) and then deciding

More information

Algorithms in Bioinformatics I, ZBIT, Uni Tübingen, Daniel Huson, WS 2003/4 1

Algorithms in Bioinformatics I, ZBIT, Uni Tübingen, Daniel Huson, WS 2003/4 1 Algorithms in Bioinformatics I, ZBIT, Uni Tübingen, Daniel Huson, WS 2003/4 1 Algorithms in Bioinformatics I Winter Semester 2003/4, Center for Bioinformatics Tübingen, WSI-Informatik, Universität Tübingen

More information

Pairwise Alignment. Guan-Shieng Huang. Dept. of CSIE, NCNU. Pairwise Alignment p.1/55

Pairwise Alignment. Guan-Shieng Huang. Dept. of CSIE, NCNU. Pairwise Alignment p.1/55 Pairwise Alignment Guan-Shieng Huang shieng@ncnu.edu.tw Dept. of CSIE, NCNU Pairwise Alignment p.1/55 Approach 1. Problem definition 2. Computational method (algorithms) 3. Complexity and performance Pairwise

More information

Sara C. Madeira. Universidade da Beira Interior. (Thanks to Ana Teresa Freitas, IST for useful resources on this subject)

Sara C. Madeira. Universidade da Beira Interior. (Thanks to Ana Teresa Freitas, IST for useful resources on this subject) Bioinformática Sequence Alignment Pairwise Sequence Alignment Universidade da Beira Interior (Thanks to Ana Teresa Freitas, IST for useful resources on this subject) 1 16/3/29 & 23/3/29 27/4/29 Outline

More information

Algorithms in Bioinformatics FOUR Pairwise Sequence Alignment. Pairwise Sequence Alignment. Convention: DNA Sequences 5. Sequence Alignment

Algorithms in Bioinformatics FOUR Pairwise Sequence Alignment. Pairwise Sequence Alignment. Convention: DNA Sequences 5. Sequence Alignment Algorithms in Bioinformatics FOUR Sami Khuri Department of Computer Science San José State University Pairwise Sequence Alignment Homology Similarity Global string alignment Local string alignment Dot

More information

Algorithms in Bioinformatics

Algorithms in Bioinformatics Algorithms in Bioinformatics Sami Khuri Department of omputer Science San José State University San José, alifornia, USA khuri@cs.sjsu.edu www.cs.sjsu.edu/faculty/khuri Pairwise Sequence Alignment Homology

More information

Sequence analysis and Genomics

Sequence analysis and Genomics Sequence analysis and Genomics October 12 th November 23 rd 2 PM 5 PM Prof. Peter Stadler Dr. Katja Nowick Katja: group leader TFome and Transcriptome Evolution Bioinformatics group Paul-Flechsig-Institute

More information

Pairwise alignment, Gunnar Klau, November 9, 2005, 16:

Pairwise alignment, Gunnar Klau, November 9, 2005, 16: Pairwise alignment, Gunnar Klau, November 9, 2005, 16:36 2012 2.1 Growth rates For biological sequence analysis, we prefer algorithms that have time and space requirements that are linear in the length

More information

3. SEQUENCE ANALYSIS BIOINFORMATICS COURSE MTAT

3. SEQUENCE ANALYSIS BIOINFORMATICS COURSE MTAT 3. SEQUENCE ANALYSIS BIOINFORMATICS COURSE MTAT.03.239 25.09.2012 SEQUENCE ANALYSIS IS IMPORTANT FOR... Prediction of function Gene finding the process of identifying the regions of genomic DNA that encode

More information

Local Alignment: Smith-Waterman algorithm

Local Alignment: Smith-Waterman algorithm Local Alignment: Smith-Waterman algorithm Example: a shared common domain of two protein sequences; extended sections of genomic DNA sequence. Sensitive to detect similarity in highly diverged sequences.

More information

CISC 889 Bioinformatics (Spring 2004) Sequence pairwise alignment (I)

CISC 889 Bioinformatics (Spring 2004) Sequence pairwise alignment (I) CISC 889 Bioinformatics (Spring 2004) Sequence pairwise alignment (I) Contents Alignment algorithms Needleman-Wunsch (global alignment) Smith-Waterman (local alignment) Heuristic algorithms FASTA BLAST

More information

Single alignment: Substitution Matrix. 16 march 2017

Single alignment: Substitution Matrix. 16 march 2017 Single alignment: Substitution Matrix 16 march 2017 BLOSUM Matrix BLOSUM Matrix [2] (Blocks Amino Acid Substitution Matrices ) It is based on the amino acids substitutions observed in ~2000 conserved block

More information

Bioinformatics (GLOBEX, Summer 2015) Pairwise sequence alignment

Bioinformatics (GLOBEX, Summer 2015) Pairwise sequence alignment Bioinformatics (GLOBEX, Summer 2015) Pairwise sequence alignment Substitution score matrices, PAM, BLOSUM Needleman-Wunsch algorithm (Global) Smith-Waterman algorithm (Local) BLAST (local, heuristic) E-value

More information

CGS 5991 (2 Credits) Bioinformatics Tools

CGS 5991 (2 Credits) Bioinformatics Tools CAP 5991 (3 Credits) Introduction to Bioinformatics CGS 5991 (2 Credits) Bioinformatics Tools Giri Narasimhan 8/26/03 CAP/CGS 5991: Lecture 1 1 Course Schedules CAP 5991 (3 credit) will meet every Tue

More information

Computational Biology

Computational Biology Computational Biology Lecture 6 31 October 2004 1 Overview Scoring matrices (Thanks to Shannon McWeeney) BLAST algorithm Start sequence alignment 2 1 What is a homologous sequence? A homologous sequence,

More information

Bioinformatics for Computer Scientists (Part 2 Sequence Alignment) Sepp Hochreiter

Bioinformatics for Computer Scientists (Part 2 Sequence Alignment) Sepp Hochreiter Bioinformatics for Computer Scientists (Part 2 Sequence Alignment) Institute of Bioinformatics Johannes Kepler University, Linz, Austria Sequence Alignment 2. Sequence Alignment Sequence Alignment 2.1

More information

Sequence Alignment: A General Overview. COMP Fall 2010 Luay Nakhleh, Rice University

Sequence Alignment: A General Overview. COMP Fall 2010 Luay Nakhleh, Rice University Sequence Alignment: A General Overview COMP 571 - Fall 2010 Luay Nakhleh, Rice University Life through Evolution All living organisms are related to each other through evolution This means: any pair of

More information

In-Depth Assessment of Local Sequence Alignment

In-Depth Assessment of Local Sequence Alignment 2012 International Conference on Environment Science and Engieering IPCBEE vol.3 2(2012) (2012)IACSIT Press, Singapoore In-Depth Assessment of Local Sequence Alignment Atoosa Ghahremani and Mahmood A.

More information

Practical considerations of working with sequencing data

Practical considerations of working with sequencing data Practical considerations of working with sequencing data File Types Fastq ->aligner -> reference(genome) coordinates Coordinate files SAM/BAM most complete, contains all of the info in fastq and more!

More information

Biochemistry 324 Bioinformatics. Pairwise sequence alignment

Biochemistry 324 Bioinformatics. Pairwise sequence alignment Biochemistry 324 Bioinformatics Pairwise sequence alignment How do we compare genes/proteins? When we have sequenced a genome, we try and identify the function of unknown genes by finding a similar gene

More information

Sequence Alignments. Dynamic programming approaches, scoring, and significance. Lucy Skrabanek ICB, WMC January 31, 2013

Sequence Alignments. Dynamic programming approaches, scoring, and significance. Lucy Skrabanek ICB, WMC January 31, 2013 Sequence Alignments Dynamic programming approaches, scoring, and significance Lucy Skrabanek ICB, WMC January 31, 213 Sequence alignment Compare two (or more) sequences to: Find regions of conservation

More information

Bioinformatics and BLAST

Bioinformatics and BLAST Bioinformatics and BLAST Overview Recap of last time Similarity discussion Algorithms: Needleman-Wunsch Smith-Waterman BLAST Implementation issues and current research Recap from Last Time Genome consists

More information

Module: Sequence Alignment Theory and Applications Session: Introduction to Searching and Sequence Alignment

Module: Sequence Alignment Theory and Applications Session: Introduction to Searching and Sequence Alignment Module: Sequence Alignment Theory and Applications Session: Introduction to Searching and Sequence Alignment Introduction to Bioinformatics online course : IBT Jonathan Kayondo Learning Objectives Understand

More information

Sequence Comparison. mouse human

Sequence Comparison. mouse human Sequence Comparison Sequence Comparison mouse human Why Compare Sequences? The first fact of biological sequence analysis In biomolecular sequences (DNA, RNA, or amino acid sequences), high sequence similarity

More information

Grundlagen der Bioinformatik, SS 08, D. Huson, May 2,

Grundlagen der Bioinformatik, SS 08, D. Huson, May 2, Grundlagen der Bioinformatik, SS 08, D. Huson, May 2, 2008 39 5 Blast This lecture is based on the following, which are all recommended reading: R. Merkl, S. Waack: Bioinformatik Interaktiv. Chapter 11.4-11.7

More information

Pairwise & Multiple sequence alignments

Pairwise & Multiple sequence alignments Pairwise & Multiple sequence alignments Urmila Kulkarni-Kale Bioinformatics Centre 411 007 urmila@bioinfo.ernet.in Basis for Sequence comparison Theory of evolution: gene sequences have evolved/derived

More information

THEORY. Based on sequence Length According to the length of sequence being compared it is of following two types

THEORY. Based on sequence Length According to the length of sequence being compared it is of following two types Exp 11- THEORY Sequence Alignment is a process of aligning two sequences to achieve maximum levels of identity between them. This help to derive functional, structural and evolutionary relationships between

More information

Moreover, the circular logic

Moreover, the circular logic Moreover, the circular logic How do we know what is the right distance without a good alignment? And how do we construct a good alignment without knowing what substitutions were made previously? ATGCGT--GCAAGT

More information

Lecture 2: Pairwise Alignment. CG Ron Shamir

Lecture 2: Pairwise Alignment. CG Ron Shamir Lecture 2: Pairwise Alignment 1 Main source 2 Why compare sequences? Human hexosaminidase A vs Mouse hexosaminidase A 3 www.mathworks.com/.../jan04/bio_genome.html Sequence Alignment עימוד רצפים The problem:

More information

Introduction to sequence alignment. Local alignment the Smith-Waterman algorithm

Introduction to sequence alignment. Local alignment the Smith-Waterman algorithm Lecture 2, 12/3/2003: Introduction to sequence alignment The Needleman-Wunsch algorithm for global sequence alignment: description and properties Local alignment the Smith-Waterman algorithm 1 Computational

More information

Lecture 2, 5/12/2001: Local alignment the Smith-Waterman algorithm. Alignment scoring schemes and theory: substitution matrices and gap models

Lecture 2, 5/12/2001: Local alignment the Smith-Waterman algorithm. Alignment scoring schemes and theory: substitution matrices and gap models Lecture 2, 5/12/2001: Local alignment the Smith-Waterman algorithm Alignment scoring schemes and theory: substitution matrices and gap models 1 Local sequence alignments Local sequence alignments are necessary

More information

First generation sequencing and pairwise alignment (High-tech, not high throughput) Analysis of Biological Sequences

First generation sequencing and pairwise alignment (High-tech, not high throughput) Analysis of Biological Sequences First generation sequencing and pairwise alignment (High-tech, not high throughput) Analysis of Biological Sequences 140.638 where do sequences come from? DNA is not hard to extract (getting DNA from a

More information

Tools and Algorithms in Bioinformatics

Tools and Algorithms in Bioinformatics Tools and Algorithms in Bioinformatics GCBA815, Fall 2013 Week3: Blast Algorithm, theory and practice Babu Guda, Ph.D. Department of Genetics, Cell Biology & Anatomy Bioinformatics and Systems Biology

More information

Sequence analysis and comparison

Sequence analysis and comparison The aim with sequence identification: Sequence analysis and comparison Marjolein Thunnissen Lund September 2012 Is there any known protein sequence that is homologous to mine? Are there any other species

More information

Chapter 5. Proteomics and the analysis of protein sequence Ⅱ

Chapter 5. Proteomics and the analysis of protein sequence Ⅱ Proteomics Chapter 5. Proteomics and the analysis of protein sequence Ⅱ 1 Pairwise similarity searching (1) Figure 5.5: manual alignment One of the amino acids in the top sequence has no equivalent and

More information

Collected Works of Charles Dickens

Collected Works of Charles Dickens Collected Works of Charles Dickens A Random Dickens Quote If there were no bad people, there would be no good lawyers. Original Sentence It was a dark and stormy night; the night was dark except at sunny

More information

Sequence Alignment (chapter 6)

Sequence Alignment (chapter 6) Sequence lignment (chapter 6) he biological problem lobal alignment Local alignment Multiple alignment Introduction to bioinformatics, utumn 6 Background: comparative genomics Basic question in biology:

More information

Introduction to Bioinformatics

Introduction to Bioinformatics Introduction to Bioinformatics Jianlin Cheng, PhD Department of Computer Science Informatics Institute 2011 Topics Introduction Biological Sequence Alignment and Database Search Analysis of gene expression

More information

Pairwise sequence alignments

Pairwise sequence alignments Pairwise sequence alignments Volker Flegel VI, October 2003 Page 1 Outline Introduction Definitions Biological context of pairwise alignments Computing of pairwise alignments Some programs VI, October

More information

BIO 285/CSCI 285/MATH 285 Bioinformatics Programming Lecture 8 Pairwise Sequence Alignment 2 And Python Function Instructor: Lei Qian Fisk University

BIO 285/CSCI 285/MATH 285 Bioinformatics Programming Lecture 8 Pairwise Sequence Alignment 2 And Python Function Instructor: Lei Qian Fisk University BIO 285/CSCI 285/MATH 285 Bioinformatics Programming Lecture 8 Pairwise Sequence Alignment 2 And Python Function Instructor: Lei Qian Fisk University Measures of Sequence Similarity Alignment with dot

More information

Lecture 5,6 Local sequence alignment

Lecture 5,6 Local sequence alignment Lecture 5,6 Local sequence alignment Chapter 6 in Jones and Pevzner Fall 2018 September 4,6, 2018 Evolution as a tool for biological insight Nothing in biology makes sense except in the light of evolution

More information

String Matching Problem

String Matching Problem String Matching Problem Pattern P Text T Set of Locations L 9/2/23 CAP/CGS 5991: Lecture 2 Computer Science Fundamentals Specify an input-output description of the problem. Design a conceptual algorithm

More information

Quantifying sequence similarity

Quantifying sequence similarity Quantifying sequence similarity Bas E. Dutilh Systems Biology: Bioinformatic Data Analysis Utrecht University, February 16 th 2016 After this lecture, you can define homology, similarity, and identity

More information

Analysis and Design of Algorithms Dynamic Programming

Analysis and Design of Algorithms Dynamic Programming Analysis and Design of Algorithms Dynamic Programming Lecture Notes by Dr. Wang, Rui Fall 2008 Department of Computer Science Ocean University of China November 6, 2009 Introduction 2 Introduction..................................................................

More information

CONCEPT OF SEQUENCE COMPARISON. Natapol Pornputtapong 18 January 2018

CONCEPT OF SEQUENCE COMPARISON. Natapol Pornputtapong 18 January 2018 CONCEPT OF SEQUENCE COMPARISON Natapol Pornputtapong 18 January 2018 SEQUENCE ANALYSIS - A ROSETTA STONE OF LIFE Sequence analysis is the process of subjecting a DNA, RNA or peptide sequence to any of

More information

Large-Scale Genomic Surveys

Large-Scale Genomic Surveys Bioinformatics Subtopics Fold Recognition Secondary Structure Prediction Docking & Drug Design Protein Geometry Protein Flexibility Homology Modeling Sequence Alignment Structure Classification Gene Prediction

More information

Algorithms in Bioinformatics: A Practical Introduction. Sequence Similarity

Algorithms in Bioinformatics: A Practical Introduction. Sequence Similarity Algorithms in Bioinformatics: A Practical Introduction Sequence Similarity Earliest Researches in Sequence Comparison Doolittle et al. (Science, July 1983) searched for platelet-derived growth factor (PDGF)

More information

Pairwise sequence alignments. Vassilios Ioannidis (From Volker Flegel )

Pairwise sequence alignments. Vassilios Ioannidis (From Volker Flegel ) Pairwise sequence alignments Vassilios Ioannidis (From Volker Flegel ) Outline Introduction Definitions Biological context of pairwise alignments Computing of pairwise alignments Some programs Importance

More information

Similarity or Identity? When are molecules similar?

Similarity or Identity? When are molecules similar? Similarity or Identity? When are molecules similar? Mapping Identity A -> A T -> T G -> G C -> C or Leu -> Leu Pro -> Pro Arg -> Arg Phe -> Phe etc If we map similarity using identity, how similar are

More information

5. MULTIPLE SEQUENCE ALIGNMENT BIOINFORMATICS COURSE MTAT

5. MULTIPLE SEQUENCE ALIGNMENT BIOINFORMATICS COURSE MTAT 5. MULTIPLE SEQUENCE ALIGNMENT BIOINFORMATICS COURSE MTAT.03.239 03.10.2012 ALIGNMENT Alignment is the task of locating equivalent regions of two or more sequences to maximize their similarity. Homology:

More information

Local Alignment Statistics

Local Alignment Statistics Local Alignment Statistics Stephen Altschul National Center for Biotechnology Information National Library of Medicine National Institutes of Health Bethesda, MD Central Issues in Biological Sequence Comparison

More information

Introduction to Bioinformatics

Introduction to Bioinformatics Introduction to Bioinformatics Lecture : p he biological problem p lobal alignment p Local alignment p Multiple alignment 6 Background: comparative genomics p Basic question in biology: what properties

More information

Statistical Machine Learning Methods for Bioinformatics II. Hidden Markov Model for Biological Sequences

Statistical Machine Learning Methods for Bioinformatics II. Hidden Markov Model for Biological Sequences Statistical Machine Learning Methods for Bioinformatics II. Hidden Markov Model for Biological Sequences Jianlin Cheng, PhD Department of Computer Science University of Missouri 2008 Free for Academic

More information

Motivating the need for optimal sequence alignments...

Motivating the need for optimal sequence alignments... 1 Motivating the need for optimal sequence alignments... 2 3 Note that this actually combines two objectives of optimal sequence alignments: (i) use the score of the alignment o infer homology; (ii) use

More information

Evolution. CT Amemiya et al. Nature 496, (2013) doi: /nature12027

Evolution. CT Amemiya et al. Nature 496, (2013) doi: /nature12027 Sequence Alignment Evolution CT Amemiya et al. Nature 496, 311-316 (2013) doi:10.1038/nature12027 Evolutionary Rates next generation OK OK OK X X Still OK? Sequence conservation implies function Alignment

More information

An Introduction to Bioinformatics Algorithms Hidden Markov Models

An Introduction to Bioinformatics Algorithms   Hidden Markov Models Hidden Markov Models Outline 1. CG-Islands 2. The Fair Bet Casino 3. Hidden Markov Model 4. Decoding Algorithm 5. Forward-Backward Algorithm 6. Profile HMMs 7. HMM Parameter Estimation 8. Viterbi Training

More information

Multiple Sequence Alignment, Gunnar Klau, December 9, 2005, 17:

Multiple Sequence Alignment, Gunnar Klau, December 9, 2005, 17: Multiple Sequence Alignment, Gunnar Klau, December 9, 2005, 17:50 5001 5 Multiple Sequence Alignment The first part of this exposition is based on the following sources, which are recommended reading:

More information

Alignment & BLAST. By: Hadi Mozafari KUMS

Alignment & BLAST. By: Hadi Mozafari KUMS Alignment & BLAST By: Hadi Mozafari KUMS SIMILARITY - ALIGNMENT Comparison of primary DNA or protein sequences to other primary or secondary sequences Expecting that the function of the similar sequence

More information

Outline. Approximation: Theory and Algorithms. Motivation. Outline. The String Edit Distance. Nikolaus Augsten. Unit 2 March 6, 2009

Outline. Approximation: Theory and Algorithms. Motivation. Outline. The String Edit Distance. Nikolaus Augsten. Unit 2 March 6, 2009 Outline Approximation: Theory and Algorithms The Nikolaus Augsten Free University of Bozen-Bolzano Faculty of Computer Science DIS Unit 2 March 6, 2009 1 Nikolaus Augsten (DIS) Approximation: Theory and

More information

Tools and Algorithms in Bioinformatics

Tools and Algorithms in Bioinformatics Tools and Algorithms in Bioinformatics GCBA815, Fall 2015 Week-4 BLAST Algorithm Continued Multiple Sequence Alignment Babu Guda, Ph.D. Department of Genetics, Cell Biology & Anatomy Bioinformatics and

More information

Sequence Alignment: Scoring Schemes. COMP 571 Luay Nakhleh, Rice University

Sequence Alignment: Scoring Schemes. COMP 571 Luay Nakhleh, Rice University Sequence Alignment: Scoring Schemes COMP 571 Luay Nakhleh, Rice University Scoring Schemes Recall that an alignment score is aimed at providing a scale to measure the degree of similarity (or difference)

More information

Pairwise alignment using HMMs

Pairwise alignment using HMMs Pairwise alignment using HMMs The states of an HMM fulfill the Markov property: probability of transition depends only on the last state. CpG islands and casino example: HMMs emit sequence of symbols (nucleotides

More information

Bioinformatics. Scoring Matrices. David Gilbert Bioinformatics Research Centre

Bioinformatics. Scoring Matrices. David Gilbert Bioinformatics Research Centre Bioinformatics Scoring Matrices David Gilbert Bioinformatics Research Centre www.brc.dcs.gla.ac.uk Department of Computing Science, University of Glasgow Learning Objectives To explain the requirement

More information

Introduction to Computation & Pairwise Alignment

Introduction to Computation & Pairwise Alignment Introduction to Computation & Pairwise Alignment Eunok Paek eunokpaek@hanyang.ac.kr Algorithm what you already know about programming Pan-Fried Fish with Spicy Dipping Sauce This spicy fish dish is quick

More information

Tiffany Samaroo MB&B 452a December 8, Take Home Final. Topic 1

Tiffany Samaroo MB&B 452a December 8, Take Home Final. Topic 1 Tiffany Samaroo MB&B 452a December 8, 2003 Take Home Final Topic 1 Prior to 1970, protein and DNA sequence alignment was limited to visual comparison. This was a very tedious process; even proteins with

More information

Copyright 2000 N. AYDIN. All rights reserved. 1

Copyright 2000 N. AYDIN. All rights reserved. 1 Introduction to Bioinformatics Prof. Dr. Nizamettin AYDIN naydin@yildiz.edu.tr Multiple Sequence Alignment Outline Multiple sequence alignment introduction to msa methods of msa progressive global alignment

More information

Global alignments - review

Global alignments - review Global alignments - review Take two sequences: X[j] and Y[j] M[i-1, j-1] ± 1 M[i, j] = max M[i, j-1] 2 M[i-1, j] 2 The best alignment for X[1 i] and Y[1 j] is called M[i, j] X[j] Initiation: M[,]= pply

More information

InDel 3-5. InDel 8-9. InDel 3-5. InDel 8-9. InDel InDel 8-9

InDel 3-5. InDel 8-9. InDel 3-5. InDel 8-9. InDel InDel 8-9 Lecture 5 Alignment I. Introduction. For sequence data, the process of generating an alignment establishes positional homologies; that is, alignment provides the identification of homologous phylogenetic

More information

114 Grundlagen der Bioinformatik, SS 09, D. Huson, July 6, 2009

114 Grundlagen der Bioinformatik, SS 09, D. Huson, July 6, 2009 114 Grundlagen der Bioinformatik, SS 09, D. Huson, July 6, 2009 9 Protein tertiary structure Sources for this chapter, which are all recommended reading: D.W. Mount. Bioinformatics: Sequences and Genome

More information

Approximation: Theory and Algorithms

Approximation: Theory and Algorithms Approximation: Theory and Algorithms The String Edit Distance Nikolaus Augsten Free University of Bozen-Bolzano Faculty of Computer Science DIS Unit 2 March 6, 2009 Nikolaus Augsten (DIS) Approximation:

More information

Lecture 4: Evolutionary Models and Substitution Matrices (PAM and BLOSUM)

Lecture 4: Evolutionary Models and Substitution Matrices (PAM and BLOSUM) Bioinformatics II Probability and Statistics Universität Zürich and ETH Zürich Spring Semester 2009 Lecture 4: Evolutionary Models and Substitution Matrices (PAM and BLOSUM) Dr Fraser Daly adapted from

More information

Chapter 7: Rapid alignment methods: FASTA and BLAST

Chapter 7: Rapid alignment methods: FASTA and BLAST Chapter 7: Rapid alignment methods: FASTA and BLAST The biological problem Search strategies FASTA BLAST Introduction to bioinformatics, Autumn 2007 117 BLAST: Basic Local Alignment Search Tool BLAST (Altschul

More information

Sequence Bioinformatics. Multiple Sequence Alignment Waqas Nasir

Sequence Bioinformatics. Multiple Sequence Alignment Waqas Nasir Sequence Bioinformatics Multiple Sequence Alignment Waqas Nasir 2010-11-12 Multiple Sequence Alignment One amino acid plays coy; a pair of homologous sequences whisper; many aligned sequences shout out

More information

Pairwise Sequence Alignment

Pairwise Sequence Alignment Introduction to Bioinformatics Pairwise Sequence Alignment Prof. Dr. Nizamettin AYDIN naydin@yildiz.edu.tr Outline Introduction to sequence alignment pair wise sequence alignment The Dot Matrix Scoring

More information

Bio nformatics. Lecture 3. Saad Mneimneh

Bio nformatics. Lecture 3. Saad Mneimneh Bio nformatics Lecture 3 Sequencing As before, DNA is cut into small ( 0.4KB) fragments and a clone library is formed. Biological experiments allow to read a certain number of these short fragments per

More information

Sequence Alignment Techniques and Their Uses

Sequence Alignment Techniques and Their Uses Sequence Alignment Techniques and Their Uses Sarah Fiorentino Since rapid sequencing technology and whole genomes sequencing, the amount of sequence information has grown exponentially. With all of this

More information

STATC141 Spring 2005 The materials are from Pairwise Sequence Alignment by Robert Giegerich and David Wheeler

STATC141 Spring 2005 The materials are from Pairwise Sequence Alignment by Robert Giegerich and David Wheeler STATC141 Spring 2005 The materials are from Pairise Sequence Alignment by Robert Giegerich and David Wheeler Lecture 6, 02/08/05 The analysis of multiple DNA or protein sequences (I) Sequence similarity

More information

Introduction to Sequence Alignment. Manpreet S. Katari

Introduction to Sequence Alignment. Manpreet S. Katari Introduction to Sequence Alignment Manpreet S. Katari 1 Outline 1. Global vs. local approaches to aligning sequences 1. Dot Plots 2. BLAST 1. Dynamic Programming 3. Hash Tables 1. BLAT 4. BWT (Burrow Wheeler

More information

EECS730: Introduction to Bioinformatics

EECS730: Introduction to Bioinformatics EECS730: Introduction to Bioinformatics Lecture 05: Index-based alignment algorithms Slides adapted from Dr. Shaojie Zhang (University of Central Florida) Real applications of alignment Database search

More information

Bioinformatics for Biologists

Bioinformatics for Biologists Bioinformatics for Biologists Sequence Analysis: Part I. Pairwise alignment and database searching Fran Lewitter, Ph.D. Head, Biocomputing Whitehead Institute Bioinformatics Definitions The use of computational

More information

Bioinformatics Exercises

Bioinformatics Exercises Bioinformatics Exercises AP Biology Teachers Workshop Susan Cates, Ph.D. Evolution of Species Phylogenetic Trees show the relatedness of organisms Common Ancestor (Root of the tree) 1 Rooted vs. Unrooted

More information

Background: comparative genomics. Sequence similarity. Homologs. Similarity vs homology (2) Similarity vs homology. Sequence Alignment (chapter 6)

Background: comparative genomics. Sequence similarity. Homologs. Similarity vs homology (2) Similarity vs homology. Sequence Alignment (chapter 6) Sequence lignment (chapter ) he biological problem lobal alignment Local alignment Multiple alignment Background: comparative genomics Basic question in biology: what properties are shared among organisms?

More information

Lecture 4: September 19

Lecture 4: September 19 CSCI1810: Computational Molecular Biology Fall 2017 Lecture 4: September 19 Lecturer: Sorin Istrail Scribe: Cyrus Cousins Note: LaTeX template courtesy of UC Berkeley EECS dept. Disclaimer: These notes

More information

Hidden Markov Models

Hidden Markov Models Hidden Markov Models Outline 1. CG-Islands 2. The Fair Bet Casino 3. Hidden Markov Model 4. Decoding Algorithm 5. Forward-Backward Algorithm 6. Profile HMMs 7. HMM Parameter Estimation 8. Viterbi Training

More information

Similarity Search. The String Edit Distance. Nikolaus Augsten. Free University of Bozen-Bolzano Faculty of Computer Science DIS. Unit 2 March 8, 2012

Similarity Search. The String Edit Distance. Nikolaus Augsten. Free University of Bozen-Bolzano Faculty of Computer Science DIS. Unit 2 March 8, 2012 Similarity Search The String Edit Distance Nikolaus Augsten Free University of Bozen-Bolzano Faculty of Computer Science DIS Unit 2 March 8, 2012 Nikolaus Augsten (DIS) Similarity Search Unit 2 March 8,

More information

Sequence comparison: Score matrices

Sequence comparison: Score matrices Sequence comparison: Score matrices http://facultywashingtonedu/jht/gs559_2013/ Genome 559: Introduction to Statistical and omputational Genomics Prof James H Thomas FYI - informal inductive proof of best

More information

Scoring Matrices. Shifra Ben-Dor Irit Orr

Scoring Matrices. Shifra Ben-Dor Irit Orr Scoring Matrices Shifra Ben-Dor Irit Orr Scoring matrices Sequence alignment and database searching programs compare sequences to each other as a series of characters. All algorithms (programs) for comparison

More information

Overview Multiple Sequence Alignment

Overview Multiple Sequence Alignment Overview Multiple Sequence Alignment Inge Jonassen Bioinformatics group Dept. of Informatics, UoB Inge.Jonassen@ii.uib.no Definition/examples Use of alignments The alignment problem scoring alignments

More information

Lecture 1, 31/10/2001: Introduction to sequence alignment. The Needleman-Wunsch algorithm for global sequence alignment: description and properties

Lecture 1, 31/10/2001: Introduction to sequence alignment. The Needleman-Wunsch algorithm for global sequence alignment: description and properties Lecture 1, 31/10/2001: Introduction to sequence alignment The Needleman-Wunsch algorithm for global sequence alignment: description and properties 1 Computational sequence-analysis The major goal of computational

More information

Outline. Similarity Search. Outline. Motivation. The String Edit Distance

Outline. Similarity Search. Outline. Motivation. The String Edit Distance Outline Similarity Search The Nikolaus Augsten nikolaus.augsten@sbg.ac.at Department of Computer Sciences University of Salzburg 1 http://dbresearch.uni-salzburg.at WS 2017/2018 Version March 12, 2018

More information

Sequence comparison: Score matrices. Genome 559: Introduction to Statistical and Computational Genomics Prof. James H. Thomas

Sequence comparison: Score matrices. Genome 559: Introduction to Statistical and Computational Genomics Prof. James H. Thomas Sequence comparison: Score matrices Genome 559: Introduction to Statistical and omputational Genomics Prof James H Thomas Informal inductive proof of best alignment path onsider the last step in the best

More information

SEQUENCE ALIGNMENT BACKGROUND: BIOINFORMATICS. Prokaryotes and Eukaryotes. DNA and RNA

SEQUENCE ALIGNMENT BACKGROUND: BIOINFORMATICS. Prokaryotes and Eukaryotes. DNA and RNA SEQUENCE ALIGNMENT BACKGROUND: BIOINFORMATICS 1 Prokaryotes and Eukaryotes 2 DNA and RNA 3 4 Double helix structure Codons Codons are triplets of bases from the RNA sequence. Each triplet defines an amino-acid.

More information

Sequence comparison: Score matrices. Genome 559: Introduction to Statistical and Computational Genomics Prof. James H. Thomas

Sequence comparison: Score matrices. Genome 559: Introduction to Statistical and Computational Genomics Prof. James H. Thomas Sequence comparison: Score matrices Genome 559: Introduction to Statistical and omputational Genomics Prof James H Thomas FYI - informal inductive proof of best alignment path onsider the last step in

More information

Comparative genomics: Overview & Tools + MUMmer algorithm

Comparative genomics: Overview & Tools + MUMmer algorithm Comparative genomics: Overview & Tools + MUMmer algorithm Urmila Kulkarni-Kale Bioinformatics Centre University of Pune, Pune 411 007. urmila@bioinfo.ernet.in Genome sequence: Fact file 1995: The first

More information

Similarity Search. The String Edit Distance. Nikolaus Augsten.

Similarity Search. The String Edit Distance. Nikolaus Augsten. Similarity Search The String Edit Distance Nikolaus Augsten nikolaus.augsten@sbg.ac.at Dept. of Computer Sciences University of Salzburg http://dbresearch.uni-salzburg.at Version October 18, 2016 Wintersemester

More information

C E N T R. Introduction to bioinformatics 2007 E B I O I N F O R M A T I C S V U F O R I N T. Lecture 5 G R A T I V. Pair-wise Sequence Alignment

C E N T R. Introduction to bioinformatics 2007 E B I O I N F O R M A T I C S V U F O R I N T. Lecture 5 G R A T I V. Pair-wise Sequence Alignment C E N T R E F O R I N T E G R A T I V E B I O I N F O R M A T I C S V U Introduction to bioinformatics 2007 Lecture 5 Pair-wise Sequence Alignment Bioinformatics Nothing in Biology makes sense except in

More information