. Sequence Alignment. Sequences Much of bioinformatics involves sequences u DNA sequences u RNA sequences u Protein sequences We can think of these sequences.

Slides:



Advertisements
Similar presentations
Proteins: Structure reflects function….. Fig. 5-UN1 Amino group Carboxyl group carbon.
Advertisements

Sequence Alignment I Lecture #2
. Sequence Alignment I Lecture #2 This class has been edited from Nir Friedman’s lecture which is available at Changes made by.
Sequence Alignment Tutorial #2
5’ C 3’ OH (free) 1’ C 5’ PO4 (free) DNA is a linear polymer of nucleotide subunits joined together by phosphodiester bonds - covalent bonds between.
Sequence Alignment Tutorial #2
. Class 4: Fast Sequence Alignment. Alignment in Real Life u One of the major uses of alignments is to find sequences in a “database” u Such collections.
Sequence Alignment Storing, retrieving and comparing DNA sequences in Databases. Comparing two or more sequences for similarities. Searching databases.
Sequence Alignment Algorithms in Computational Biology Spring 2006 Edited by Itai Sharon Most slides have been created and edited by Nir Friedman, Dan.
Lectures on Computational Biology HC Lee Computational Biology Lab Center for Complex Systems & Biophysics National Central University EFSS II National.
Amino Acids, Peptides, Protein Primary Structure
Sequencing and Sequence Alignment
. Class 4: Sequence Alignment II Gaps, Heuristic Search.
Sequence Alignment.
Introduction to Bioinformatics Algorithms Sequence Alignment.
. Class 4: Fast Sequence Alignment. Alignment in Real Life u One of the major uses of alignments is to find sequences in a “database” u Such collections.
Molecular Techniques in Molecular Systematics. DNA-DNA hybridisation -Measures the degree of genetic similarity between pools of DNA sequences. -Normally.
Introduction to bioinformatics
Dynamic Programming and Biological Sequence Comparison Part I.
Introduction to Bioinformatics Algorithms Sequence Alignment.
. Sequence Alignment II Lecture #3 This class has been edited from Nir Friedman’s lecture. Changes made by Dan Geiger, then by Shlomo Moran. Background.
Sequence similarity. Motivation Same gene, or similar gene Suffix of A similar to prefix of B? Suffix of A similar to prefix of B..Z? Longest similar.
Class 2: Basic Sequence Alignment
. Sequence Alignment I Lecture #2 This class has been edited from Nir Friedman’s lecture. Changes made by Dan Geiger, then Shlomo Moran. Background Readings:
Chapter 27 Amino Acids, Peptides, and Proteins. Nucleic Acids.
. Sequence Alignment II Lecture #3 This class has been edited from Nir Friedman’s lecture which is available at Changes made by.
. Sequence Alignment II Lecture #3 This class has been edited from Nir Friedman’s lecture which is available at Changes made by.
. Sequence Alignment II Lecture #3 This class has been edited from Nir Friedman’s lecture. Changes made by Dan Geiger, then by Shlomo Moran. Background.
Pairwise alignments Introduction Introduction Why do alignments? Why do alignments? Definitions Definitions Scoring alignments Scoring alignments Alignment.
Unit 7 RNA, Protein Synthesis & Gene Expression Chapter 10-2, 10-3
How does DNA work? What is a gene?
Protein Synthesis. DNA RNA Proteins (Transcription) (Translation) DNA (genetic information stored in genes) RNA (working copies of genes) Proteins (functional.
CHAPTER 12 PROTEIN SYNTHESIS AND MUTATIONS -RNA -PROTEIN SYNTHESIS -MUTATIONS.
©CMBI 2006 Amino Acids “ When you understand the amino acids, you understand everything ”
How Proteins Are Made Mrs. Wolfe. DNA: instructions for making proteins Proteins are built by the cell according to your DNA What kinds of proteins are.
Classifier Evaluation Vasileios Hatzivassiloglou University of Texas at Dallas.
Introduction to Bioinformatics Algorithms Sequence Alignment.
Pairwise Sequence Alignment (II) (Lecture for CS498-CXZ Algorithms in Bioinformatics) Sept. 27, 2005 ChengXiang Zhai Department of Computer Science University.
. Sequence Alignment. Sequences Much of bioinformatics involves sequences u DNA sequences u RNA sequences u Protein sequences We can think of these sequences.
Pairwise Sequence Alignment BMI/CS 776 Mark Craven January 2002.
Pairwise alignment of DNA/protein sequences I519 Introduction to Bioinformatics, Fall 2012.
LESSON 4: Using Bioinformatics to Analyze Protein Sequences PowerPoint slides to accompany Using Bioinformatics : Genetic Research.
Alignment, Part I Vasileios Hatzivassiloglou University of Texas at Dallas.
AMINO ACIDS.
WSSP Chapter 8 BLASTX Translated DNA vs Protein searches atttaccgtg ttggattgaa attatcttgc atgagccagc tgatgagtat gatacagttt tccgtattaa taacgaacgg ccggaaatag.
Learning Targets “I Can...” -State how many nucleotides make up a codon. -Use a codon chart to find the corresponding amino acid.
Fig Second mRNA base First mRNA base (5 end of codon) Third mRNA base (3 end of codon)
Welcome Back! February 27, 2012 Sit in any seat for today. You will have assigned seats tomorrow Were you absent before the break? Plan on coming to tutorial.
intro-VIRUSES Virus NamePDB ID HUMAN PAPILLOMAVIRUS 161DZL BACTERIOPHAGE GA1GAV L-A virus1M1C SATELLITE PANICUM MOSAIC VIRUS1STM SATELLITE TOBACCO NECROSIS2BUK.
1 Sequence Alignment Input: two sequences over the same alphabet Output: an alignment of the two sequences Example: u GCGCATGGATTGAGCGA u TGCGCCATTGATGACCA.
End Show Slide 1 of 39 Copyright Pearson Prentice Hall 12-3 RNA and Protein Synthesis 12–3 RNA and Protein Synthesis.
RNA 2 Translation.
. Fasta, Blast, Probabilities. 2 Reminder u Last classes we discussed dynamic programming algorithms for l global alignment l local alignment l Multiple.
Transcription and Translation
Amino Acids ©CMBI 2001 “ When you understand the amino acids, you understand everything ”
Pairwise sequence alignment Lecture 02. Overview  Sequence comparison lies at the heart of bioinformatics analysis.  It is the first step towards structural.
Amino Acids  Amino Acids are the building units of proteins. Proteins are polymers of amino acids linked together by what is called “ Peptide bond” (see.
Parts is parts…. AMINO ACID building block of proteins contain an amino or NH 2 group and a carboxyl (acid) or COOH group PEPTIDE BOND covalent bond link.
. Sequence Alignment Author:- Aya Osama Supervision:- Dr.Noha khalifa.
Introduction to Sequence Alignment. Why Align Sequences? Find homology within the same species Find clues to gene function Practical issues in experiments.
Prepared By: Syed Khaleelulla Hussaini. Outline Proteins DNA RNA Genetics and evolution The Sequence Matching Problem RNA Sequence Matching Complexity.
Genomics Lecture 3 By Ms. Shumaila Azam. Proteins Proteins: large molecules composed of one or more chains of amino acids, polypeptides. Proteins are.
Amino acids.
BIOLOGY 12 Protein Synthesis.
Protein Sequence Alignments
Sequence Alignment ..
The 20 amino acids.
Translation.
The 20 amino acids.
Example of regression by RBF-ANN
Presentation transcript:

. Sequence Alignment

Sequences Much of bioinformatics involves sequences u DNA sequences u RNA sequences u Protein sequences We can think of these sequences as strings of letters u DNA & RNA: alphabet of 4 letters u Protein: alphabet of 20 letters

20 Amino Acids u Glycine (G, GLY) u Alanine (A, ALA) u Valine (V, VAL) u Leucine (L, LEU) u Isoleucine (I, ILE) u Phenylalanine (F, PHE) u Proline (P, PRO) u Serine (S, SER) u Threonine (T, THR) u Cysteine (C, CYS) u Methionine (M, MET) u Tryptophan (W, TRP) u Tyrosine (T, TYR) u Asparagine (N, ASN) u Glutamine (Q, GLN) u Aspartic acid (D, ASP) u Glutamic Acid (E, GLU) u Lysine (K, LYS) u Arginine (R, ARG) u Histidine (H, HIS) u START: AUG u STOP: UAA, UAG, UGA

Sequence Comparison u Finding similarity between sequences is important for many biological questions For example: u Find genes/proteins with common origin  Allows to predict function & structure u Locate common subsequences in genes/proteins  Identify common “motifs” u Locate sequences that might overlap  Help in sequence assembly

Sequence Alignment Input: two sequences over the same alphabet Output: an alignment of the two sequences Example: u GCGCATGGATTGAGCGA u TGCGCCATTGATGACCA A possible alignment: -GCGC-ATGGATTGAGCGA TGCGCCATTGAT-GACC-A

Alignments -GCGC-ATGGATTGAGCGA TGCGCCATTGAT-GACC-A Three elements: u Perfect matches u Mismatches u Insertions & deletions (indel)

Choosing Alignments There are many possible alignments For example, compare: -GCGC-ATGGATTGAGCGA TGCGCCATTGAT-GACC-A to GCGCATGGATTGAGCGA TGCGCC----ATTGATGACCA-- Which one is better?

Scoring Alignments Rough intuition: u Similar sequences evolved from a common ancestor u Evolution changed the sequences from this ancestral sequence by mutations:  Replacements: one letter replaced by another  Deletion: deletion of a letter  Insertion: insertion of a letter u Scoring of sequence similarity should examine how many operations took place

Simple Scoring Rule Score each position independently: u Match: +1 u Mismatch: -1 u Indel -2 Score of an alignment is sum of positional scores

Example Example: -GCGC-ATGGATTGAGCGA TGCGCCATTGAT-GACC-A Score: (+1x13) + (-1x2) + (-2x4) = GCGCATGGATTGAGCGA TGCGCC----ATTGATGACCA-- Score: (+1x5) + (-1x6) + (-2x11) = -23

More General Scores u The choice of +1,-1, and -2 scores was quite arbitrary u Depending on the context, some changes are more plausible than others  Exchange of an amino-acid by one with similar properties (size, charge, etc.) vs.  Exchange of an amino-acid by one with opposite properties

Additive Scoring Rules u We define a scoring function by specifying a function  (x,y) is the score of replacing x by y  (x,-) is the score of deleting x  (-,x) is the score of inserting x u The score of an alignment is the sum of position scores

Edit Distance u The edit distance between two sequences is the “cost” of the “cheapest” set of edit operations needed to transform one sequence into the other u Computing edit distance between two sequences almost equivalent to finding the alignment that minimizes the distance

Computing Edit Distance u How can we compute the edit distance??  If | s | = n and | t | = m, there are more than alignments u The additive form of the score allows to perform dynamic programming to compute edit distance efficiently

Recursive Argument  Suppose we have two sequences: s[1..n+1] and t[1..m+1] The best alignment must be in one of three cases: 1. Last position is ( s[n+1],t[m +1] ) 2. Last position is ( s[n +1], - ) 3. Last position is ( -, t[m +1] )

Recursive Argument  Suppose we have two sequences: s[1..n+1] and t[1..m+1] The best alignment must be in one of three cases: 1. Last position is ( s[n+1],t[m +1] ) 2. Last position is ( s[n +1], - ) 3. Last position is ( -, t[m +1] )

Recursive Argument  Suppose we have two sequences: s[1..n+1] and t[1..m+1] The best alignment must be in one of three cases: 1. Last position is ( s[n+1],t[m +1] ) 2. Last position is ( s[n +1], - ) 3. Last position is ( -, t[m +1] )

Recursive Argument Define the notation:  Using the recursive argument, we get the following recurrence for V :

Recursive Argument u Of course, we also need to handle the base cases in the recursion:

Dynamic Programming Algorithm We fill the matrix using the recurrence rule

Dynamic Programming Algorithm Conclusion: d( AAAC, AGC ) = -1

Reconstructing the Best Alignment u To reconstruct the best alignment, we record which case in the recursive rule maximized the score

Reconstructing the Best Alignment u We now trace back the path the corresponds to the best alignment AAAC AG-C

Reconstructing the Best Alignment u Sometimes, more than one alignment has the best score AAAC A-GC

Complexity Space: O(mn) Time: O(mn)  Filling the matrix O(mn)  Backtrace O(m+n)

Space Complexity  In real-life applications, n and m can be very large u The space requirements of O(mn) can be too demanding  If m = n = 1000 we need 1MB space  If m = n = 10000, we need 100MB space u We can afford to perform extra computation to save space  Looping over million operations takes less than seconds on modern workstations u Can we trade off space with time?

Why Do We Need So Much Space? To compute d(s,t), we only need O(n) space  Need to compute V[n,m]  Can fill in V, column by column, only storing the last two columns in memory Note however u This “trick” fails when we need to reconstruct the sequence u Trace back information “eats up” all the memory

Why Do We Need So Much Space? To find d(s,t), need O(n) space  Need to compute V[n,m]  Can fill in V, column by column, storing only two columns in memory A 1 G 2 C 3 0 A 1 A 2 A 3 C 4 Note however u This “trick” fails when we need to reconstruct the sequence u Trace back information “eats up” all the memory

Local Alignment Consider now a different question:  Can we find similar substring of s and t  Formally, given s[1..n] and t[1..m] find i,j,k, and l such that d(s[i..j],t[k..l]) is maximal

Local Alignment u As before, we use dynamic programming  We now want to set V[i,j] to record the best alignment of a suffix of s[1..i] and a suffix of t[1..j] u How should we change the recurrence rule?

Local Alignment New option: u We can start a new match instead of extend previous alignment Alignment of empty suffixes

Local Alignment Example s = TAATA t = ATCTAA

Local Alignment Example s = TAATA t = TACTAA

Local Alignment Example s = TAATA t = TACTAA

Local Alignment Example s = TAATA t = TACTAA

Sequence Alignment We seen two variants of sequence alignment: u Global alignment u Local alignment Other variants: u Finding best overlap (exercise) All are based on the same basic idea of dynamic programming

Alignment in Real Life u One of the major uses of alignments is to find sequences in a “database” u Such collections contain massive number of sequences (order of 10 6 ) u Finding homologies in these databases with dynamic programming can take too long

Heuristic Search u Instead, most searches relay on heuristic procedures u These are not guaranteed to find the best match u Sometimes, they will completely miss a high- scoring match We now describe the main ideas used by some of these procedures  Actual implementations often contain additional tricks and hacks

Basic Intuition u Almost all heuristic search procedure are based on the observation that real-life matches often contain long strings with gap-less matches u These heuristic try to find significant gap-less matches and then extend them

Banded DP  Suppose that we have two strings s[1..n] and t[1..m] such that n  m u If the optimal alignment of s and t has few gaps, then path of the alignment will be close to diagonal s t

Banded DP u To find such a path, it suffices to search in a diagonal region of the matrix  If the diagonal band has width k, then the dynamic programming step takes O(kn)  Much faster than O(n 2 ) of standard DP s t k

Banded DP Problem:  If we know that t[i..j] matches the query s, then we can use banded DP to evaluate quality of the match u However, we do not know this apriori! How do we select which sequences to align using banded DP?

FASTA Overview Main idea: u Find potential diagonals & evaluate them Suppose that we have a relatively long gap-less match AGCGCCATGGATTGAGCGA TGCGACATTGATCGACCTA u Can we find “clues” that will let use find it quickly?

Signature of a Match Assumption: good matches contain several “patches” of perfect matches AGCGCCATGGATTGAGCGA TGCGACATTGATCGACCTA Since this is a gap-less alignment, all perfect match regions should be on one diagonal s t

FASTA  Given s and t, and a parameter k u Find all pairs (i,j) such that s[i..i+k]=t[j..j+k] u Locate sets of pairs that are on the same diagonal  By sorting according to i-j u Compute score for the diagonal that contain all of these pairs s t

FASTA Postprocessing steps:  Find highest scoring diagonal matches  Combine these to potential gapped matches  Run banded DP on the region containing these combinations  Most applications of FASTA use very small k (2 for proteins, and 4-6 for DNA)

BLAST Overview u BLAST uses similar intuition u It relies on high scoring matches rather than exact matches  It is designed to find alignments of a target string s against large databases

High-Scoring Pair  Given parameters: length k, and threshold T  Two strings s and t of length k are a high scoring pair (HSP) if d(s,t) > T  Given a query s[1..n], BLAST construct all words w, such that w is an HSP with a k -substring of s  Note that not all substrings of s are HSPs! u These words serve as seeds for finding longer matches

Finding Potential Matches We can locate seed words in a large database in a single pass u Construct a FSA that recognizes seed words u Using hashing techniques to locate matching words

Extending Potential Matches u Once a seed is found, BLAST attempts to find a local alignment that extends the seed u Seeds on the same diagonal are combined (as in FASTA) s t