Sequence Alignment ..

Slides:



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

Sequence Alignment I Lecture #2
Solusi DP Menggunakan Software Pertemuan 24 : (Off Class) Mata kuliah:K0164-Pemrograman Matematika Tahun:2008.
. 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
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
Introduction to Bioinformatics Algorithms Sequence Alignment.
Molecular Techniques in Molecular Systematics. DNA-DNA hybridisation -Measures the degree of genetic similarity between pools of DNA sequences. -Normally.
Dynamic Programming and Biological Sequence Comparison Part I.
Introduction to Bioinformatics Algorithms Sequence Alignment.
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.
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.
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.
Introduction to Bioinformatics Algorithms Sequence Alignment.
. Sequence Alignment. Sequences Much of bioinformatics involves sequences u DNA sequences u RNA sequences u Protein sequences We can think of these sequences.
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)
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.
Amino Acids ©CMBI 2001 “ When you understand the amino acids, you understand everything ”
. Sequence Alignment. Sequences Much of bioinformatics involves sequences u DNA sequences u RNA sequences u Protein sequences We can think of these sequences.
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.
1 Sequence Alignment -AGGCTATCACCTGACCTCCAGGCCGA--TGCCC--- TAG-CTATCAC--GACCGC--GGTCGATTTGCCCGAC Definition Given two strings x = x 1 x 2...x M, y = y.
Proteins Tertiary Protein Structure of Enzyme Lactasevideo Video 2.
Arginine, who are you? Why so important?. Release 2015_01 of 07-Jan-15 of UniProtKB/Swiss-Prot contains sequence entries, comprising
Amino acids Proof. Dr. Abdulhussien Aljebory College of pharmacy
Why is this useful for the prokaryote? Why can’t eukaryotes do this?
Amino acids.
Translation PROTEIN SYNTHESIS.
Whole process Step by step- from chromosomes to proteins.
Please turn in your homework
Sequence Alignment.
BIOLOGY 12 Protein Synthesis.
Protein Sequence Alignments
Proteins.
The genetic code © 2016 Paul Billiet ODWS.
The Interface of Biology and Chemistry
Chapter 3 Proteins.
Fig. 5-UN1  carbon Amino group Carboxyl group.
A Ala Alanine Alanine is a small, hydrophobic
South African amaXhosa patients with atopic dermatitis have decreased levels of filaggrin breakdown products but no loss-of-function mutations in filaggrin 
Today’s notes from the student table Something to write with
Proteins Genetic information in DNA codes specifically for the production of proteins Cells have thousands of different proteins, each with a specific.
Sequence Alignment.
The 20 amino acids.
Translation.
The 20 amino acids.
Example of regression by RBF-ANN
Proteins Proteins have many structures, resulting in a wide range of functions Proteins do most of the work in cells and act as enzymes 2. Proteins are.
Sequence Alignment Tutorial #2
“When you understand the amino acids,
Presentation transcript:

Sequence Alignment .

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

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

Sequence Comparison Finding similarity between sequences is important for many biological questions For example: Find similar proteins Allows to predict function & structure Locate similar subsequences in DNA Allows to identify (e.g) regulatory elements Locate DNA sequences that might overlap Helps in sequence assembly g1 g2

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

Alignments -GCGC-ATGGATTGAGCGA TGCGCCATTGAT-GACC-A Three elements: Perfect matches Mismatches 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: Similar sequences evolved from a common ancestor 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 Scoring of sequence similarity should examine how many operations took place

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

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

More General Scores The choice of +1,-1, and -2 scores was quite arbitrary 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 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 The score of an alignment is the sum of position scores

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

Computing Edit Distance How can we compute the edit distance?? If |s| = n and |t| = m, there are more than alignments 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 our recursive argument, we get the following recurrence for V: V[i,j] V[i+1,j] V[i,j+1] V[i+1,j+1]

Recursive Argument Of course, we also need to handle the base cases in the recursion: S T AA - - versus We fill the matrix using the recurrence rule:

Dynamic Programming Algorithm S T We continue to fill the matrix using the recurrence rule

Dynamic Programming Algorithm S T V[0,0] V[0,1] V[1,0] V[1,1] +1 -2 -A A- -2 (A- versus -A) versus

Dynamic Programming Algorithm S T

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

Reconstructing the Best Alignment To reconstruct the best alignment, we record which case(s) in the recursive rule maximized the score S T

Reconstructing the Best Alignment We now trace back a path that corresponds to the best alignment AAAC AG-C S T

Reconstructing the Best Alignment Sometimes, more than one alignment has the best score S T AAAC A-GC AAAC -AGC AG-C

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 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 We can afford to perform extra computation to save space Looping over million operations takes less than seconds on modern workstations 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 This “trick” fails when we need to reconstruct the sequence 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 4 -2 -4 -6 -8 -2 1 -1 -3 -5 -4 -1 -2 -6 -3 -2 -1 Note however This “trick” fails when we need to reconstruct the sequence Trace back information “eats up” all the memory

Space Efficient Version: Outline Input: Sequences s[1,n] and t[1,m] to be aligned. Idea: perform divide and conquer Find position (n/2, j) at which the best alignment crosses a midpoint t s Construct two alignments A= s[1,n/2] vs t[1,j] B= s[n/2+1,n] vs t[j+1,m] Return the concatenated alignment AB

Finding the Midpoint The score of the best alignment that goes through j equals: d(s[1,n/2],t[1,j]) + d(s[n/2+1,n],t[j+1,m]) Thus, we need to compute these two quantities for all values of j We need to find j that maximizes this score. Such j determines a point (n/2,j) through which the best alignment passes. t s

Finding the Midpoint (Algorithm) Define V[i,j] = d(s[1..i],t[1..j]) (As before) B[i,j] = d(s[i+1..n],t[j+1..m]) (Symmetrically) F[i,j] + B[i,j] = score of best alignment through (i,j) t s

Computing V[i,j] V[i,j] = d(s[1..i],t[1..j]) As before: V[i,j] Requires linear space complexity

Computing B[i,j] B[i,j] = d(s[i+1..n],t[j+1..m]) Symmetrically (replacing i with i+1, and j with j+1): B[i,j] B[i+1,j] B[i,j+1] B[i+1,j+1] Requires linear space complexity

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 As before, we use dynamic programming We now want to setV[i,j] to record the best alignment of a suffix of s[1..i] and a suffix of t[1..j] How should we change the recurrence rule?

Local Alignment New option: 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: Global alignment Local alignment Other variants: Finding best overlap (exercise) All are based on the same basic idea of dynamic programming