Sequence Alignment Algorithms Morten Nielsen Department of systems biology, DTU.

Slides:



Advertisements
Similar presentations
Global Sequence Alignment by Dynamic Programming.
Advertisements

Pairwise Sequence Alignment Sushmita Roy BMI/CS 576 Sushmita Roy Sep 10 th, 2013 BMI/CS 576.
The fast way Morten Nielsen BioSys, DTU. The fast algorithm (O2) Database (m) Query (n) Open a gapExtending a gap P Q Affine gap penalties.
Alignment methods Introduction to global and local sequence alignment methods Global : Needleman-Wunch Local : Smith-Waterman Database Search BLAST FASTA.
Lecture 8 Alignment of pairs of sequence Local and global alignment
Definitions Optimal alignment - one that exhibits the most correspondences. It is the alignment with the highest score. May or may not be biologically.
C E N T R 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 E Alignments 1 Sequence Analysis.
S. Maarschalkerweerd & A. Tjhang1 Probability Theory and Basic Alignment of String Sequences Chapter
Heuristic alignment algorithms and cost matrices
Sequences are related Darwin: all organisms are related through descent with modification Related molecules have similar functions in different organisms.
1-month Practical Course Genome Analysis (Integrative Bioinformatics & Genomics) Lecture 3: Pair-wise alignment Centre for Integrative Bioinformatics VU.
Biological Sequence Analysis Chapter 3. Protein Families Organism 1 Organism 2 Enzym e 1 Enzym e 2 Closely relatedSame Function MSEKKQPVDLGLLEEDDEFEEFPAEDWAGLDEDEDAHVWEDNWDDDNVEDDFSNQLRAELEKHGYKMETS.
Biological Sequence Analysis Chapter 3 Claus Lundegaard.
Expected accuracy sequence alignment
Anders Gorm Pedersen Center for Biological Sequence Analysis
Alignment methods and database searching April 14, 2005 Quiz#1 today Learning objectives- Finish Dotter Program analysis. Understand how to use the program.
Sequence Alignment Bioinformatics. Sequence Comparison Problem: Given two sequences S & T, are S and T similar? Need to establish some notion of similarity.
Developing Pairwise Sequence Alignment Algorithms Dr. Nancy Warter-Perez June 23, 2004.
Alignment methods June 26, 2007 Learning objectives- Understand how Global alignment program works. Understand how Local alignment program works.
Pairwise Alignment Global & local alignment Anders Gorm Pedersen Molecular Evolution Group Center for Biological Sequence Analysis.
Developing Pairwise Sequence Alignment Algorithms Dr. Nancy Warter-Perez May 20, 2003.
Sequence Alignment III CIS 667 February 10, 2004.
BNFO 602 Multiple sequence alignment Usman Roshan.
Algorithms Dr. Nancy Warter-Perez June 19, May 20, 2003 Developing Pairwise Sequence Alignment Algorithms2 Outline Programming workshop 2 solutions.
Sequences are related Darwin: all organisms are related through descent with modification Related molecules have similar functions in different organisms.
Introduction to Bioinformatics Algorithms Sequence Alignment.
Bioinformatics Unit 1: Data Bases and Alignments Lecture 3: “Homology” Searches and Sequence Alignments (cont.) The Mechanics of Alignments.
Dynamic Programming. Pairwise Alignment Needleman - Wunsch Global Alignment Smith - Waterman Local Alignment.
Developing Pairwise Sequence Alignment Algorithms Dr. Nancy Warter-Perez May 10, 2005.
Blast heuristics Morten Nielsen Department of Systems Biology, DTU.
Pairwise alignment Computational Genomics and Proteomics.
Alignment methods II April 24, 2007 Learning objectives- 1) Understand how Global alignment program works using the longest common subsequence method.
Sequence comparison: Local alignment
TM Biological Sequence Comparison / Database Homology Searching Aoife McLysaght Summer Intern, Compaq Computer Corporation Ballybrit Business Park, Galway,
Sequence Alignment.
Traceback and local alignment Prof. William Stafford Noble Department of Genome Sciences Department of Computer Science and Engineering University of Washington.
BIOMETRICS Module Code: CA641 Week 11- Pairwise Sequence Alignment.
Pairwise alignments Introduction Introduction Why do alignments? Why do alignments? Definitions Definitions Scoring alignments Scoring alignments Alignment.
Pairwise Alignment and Database Searching Henrik Nielsen Protein Post-Translational Modification & Molecular Evolution Groups Center for Biological Sequence.
Pairwise Alignment and Database Searching Slides retirados de... Henrik Nielsen Protein Post-Translational Modification & Molecular Evolution Groups Center.
Pairwise Sequence Alignment. The most important class of bioinformatics tools – pairwise alignment of DNA and protein seqs. alignment 1alignment 2 Seq.
Sequence Analysis CSC 487/687 Introduction to computing for Bioinformatics.
Multiple alignment: Feng- Doolittle algorithm. Why multiple alignments? Alignment of more than two sequences Usually gives better information about conserved.
Function preserves sequences Christophe Roos - MediCel ltd Similarity is a tool in understanding the information in a sequence.
Chapter 3 Computational Molecular Biology Michael Smith
Arun Goja MITCON BIOPHARMA
We want to calculate the score for the yellow box. The final score that we fill in the yellow box will be the SUM of two other scores, we’ll call them.
Expected accuracy sequence alignment Usman Roshan.
A Table-Driven, Full-Sensitivity Similarity Search Algorithm Gene Myers and Richard Durbin Presented by Wang, Jia-Nan and Huang, Yu- Feng.
Applied Bioinformatics Week 3. Theory I Similarity Dot plot.
Alignment methods April 21, 2009 Quiz 1-April 23 (JAM lectures through today) Writing assignment topic due Tues, April 23 Hand in homework #3 Why has HbS.
Sequence Alignments with Indels Evolution produces insertions and deletions (indels) – In addition to substitutions Good example: MHHNALQRRTVWVNAY MHHALQRRTVWVNAY-
Space Efficient Alignment Algorithms and Affine Gap Penalties Dr. Nancy Warter-Perez.
Pairwise sequence alignment Lecture 02. Overview  Sequence comparison lies at the heart of bioinformatics analysis.  It is the first step towards structural.
Sequence Alignment.
Pairwise Sequence Alignment (cont.) (Lecture for CS397-CXZ Algorithms in Bioinformatics) Feb. 4, 2004 ChengXiang Zhai Department of Computer Science University.
Dynamic programming with more complex models When gaps do occur, they are often longer than one residue.(biology) We can still use all the dynamic programming.
V diagonal lines give equivalent residues ILS TRIVHVNSILPSTN V I L S T R I V I L P E F S T Sequence A Sequence B Dot Plots, Path Matrices, Score Matrices.
Heuristic Alignment Algorithms Hongchao Li Jan
9/6/07BCB 444/544 F07 ISU Dobbs - Lab 3 - BLAST1 BCB 444/544 Lab 3 BLAST Scoring Matrices & Alignment Statistics Sept6.
Learning to Align: a Statistical Approach
Sequence comparison: Dynamic programming
Sequence comparison: Local alignment
BNFO 602 Lecture 2 Usman Roshan.
Pairwise sequence Alignment.
BNFO 602 Lecture 2 Usman Roshan.
Find the Best Alignment For These Two Sequences
Pairwise Alignment Global & local alignment
Sequence Alignment Algorithms Morten Nielsen BioSys, DTU
A T C.
Presentation transcript:

Sequence Alignment Algorithms Morten Nielsen Department of systems biology, DTU

Why learn about alignment algorithms? All publicly available alignment programs do the same thing –Sequence alignment using amino acids substitution matrices and affine gap penalties This is fast but not optimal –Protein alignment is done much more accurate using sequence profiles and position specific gap penalties (price for gaps depends on the structure) Must implement your own alignment algorithm to do this

Outline What you have been told is not entirely true :-) –Alignment algorithms are more complex The true sequence alignment algorithm story –The slow algorithm (O3) –The fast algorithm (O2)

Sequence alignment The old Story

Pairwise alignment: the solution ” Dynamic programming ” (the Needleman-Wunsch algorithm) Match score = 1 Mismatch score -1 Gap penalty = -2

Alignment depicted as path in matrix T C G C A T C A T C G C A T C A TCGCA TC-CA TCGCA T-CCA Score=2 Score=0 Match score = 1 Mismatch score = -1 Gap penalty = -2

Alignment depicted as path in matrix T C G C A T C A x Meaning of point in matrix: all residues up to this point have been aligned (but there are many different possible paths). Position labeled “x”: TC aligned with TC --TC-TCTC TC--T-CTC

Dynamic programming: computation of scores T C G C A T C A x Any given point in matrix can only be reached from three possible positions (you cannot “align backwards”). => Best scoring alignment ending in any given point in the matrix can be found by choosing the highest scoring of the three possibilities.

Dynamic programming: computation of scores T C G C A T C A x Any given point in matrix can only be reached from three possible positions (you cannot “align backwards”). => Best scoring alignment ending in any given point in the matrix can be found by choosing the highest scoring of the three possibilities. score(x,y) = max score(x,y-1) - gap-penalty

Dynamic programming: computation of scores T C G C A T C A x Any given point in matrix can only be reached from three possible positions (you cannot “align backwards”). => Best scoring alignment ending in any given point in the matrix can be found by choosing the highest scoring of the three possibilities. score(x,y) = max score(x,y-1) - gap-penalty score(x-1,y-1) + substitution-score(x,y)

Dynamic programming: computation of scores T C G C A T C A x Any given point in matrix can only be reached from three possible positions (you cannot “align backwards”). => Best scoring alignment ending in any given point in the matrix can be found by choosing the highest scoring of the three possibilities. score(x,y) = max score(x,y-1) - gap-penalty score(x-1,y-1) + substitution-score(x,y) score(x-1,y) - gap-penalty

Dynamic programming: computation of scores T C G C A T C A x Any given point in matrix can only be reached from three possible positions (you cannot “align backwards”). => Best scoring alignment ending in any given point in the matrix can be found by choosing the highest scoring of the three possibilities. Each new score is found by choosing the maximum of three possibilities. For each square in matrix: keep track of where best score came from. Fill in scores one row at a time, starting in upper left corner of matrix, ending in lower right corner. score(x,y) = max score(x,y-1) - gap-penalty score(x-1,y-1) + substitution-score(x,y) score(x-1,y) - gap-penalty

Dynamic programming: example A C G T A C G T Gaps: -2

Dynamic programming: example A C G T A C G T Gaps: -2

Dynamic programming: example A C G T A C G T Gaps: -2

Dynamic programming: example A C G T A C G T Gaps: -2

Dynamic programming: example T C G C A : : T C - C A = 2

A now the truth

Dynamic programming: computation of scores T C G C A T C A x Any given point in matrix can only be reached from three possible positions (you cannot “align backwards”). => Best scoring alignment ending in any given point in the matrix can be found by choosing the highest scoring of the three possibilities.

Dynamic programming: example What about j-2 and a gap extension?

And now the true algorithm V LI L P V L L P n m Start from here

How does it work (score matrix d)? 5 V L I L P V L L P Blosum 50 matrix d matrix

How does it work? (The slow way O3) V LI L P V L L P Start from here! Gap-open W 1 = -5 Gap-extension U = -1 d matrix D matrix

How does it work? (The slow way O3) V LI L P V L L P Check all positions in (green) row and column to check score for gap extension. CPU intensive (O3) Gap-open W 1 = -5 Gap-extension U = -1 d matrix D matrix

And now you!

How does it work? Fill out the D matrix 20 V LI L P V L L P Check all positions in (green) row and column to check score for gap extension. CPU intensive (O3) Gap-open W 1 = -5 Gap-extension U = -1 d matrixD matrix

How does it work (The slow way O3) 20 VLI L P V L L P Check all positions in (green) row and column to check score for gap extension. CPU intensive (O3) Gap-open W 1 = -5 Gap-extension U = -1 d matrix D matrix

And now the fast algorithm (O2) Database (m) Query (n) Open a gapExtending a gap P Q Affine gap penalties

And now the fast algorithm (O2) Database (m) Query (n) Open a gapExtending a gap P Q

And now the true algorithm (cont.) Database (m) Query (n) P Q

How does it work (D,Q, and P-matrices) D P m n V LI L P V L L P V LI L P V L L P W 1 = -5 U = -1

How does it work (D,Q,P, and E-matrices) D P m n V LI L P V L L P V LI L P V L L P W 1 = -5 U = -1

How does it work (D,Q, and P-matrices) D Q m n V L I L P V L L P V LI L P V L L P W 1 = -5 U = -1

How does it work (D,Q,P, and E-matrices) D Q m n V L I L P V L L P V LI L P V L L P W 1 = -5 U = -1

How does it work (D, Q, and P-matrices) D Q m n V L I L P V L L P V LI L P V L L P P V LI L P V L L P

How does it work (D, Q, and P-matrices) D Q m n V L I L P V L L P V LI L P V L L P P V LI L P V L L P

How does it work. Eij-matrix. (Keeping track on the path) eij = 1 match eij = 2 gap-opening database (move vertical) eij = 3 gap-extension database (move vertical) eij = 4 gap-opening query (move horizontal) eij = 5 gap-extension query (move horizontal) V LI L P V L L P

The fast algorithm (cont.) Database (m) Query (n) P Q eij = 1 match eij = 2 gap-opening database eij = 3 gap-extension database eij = 4 gap-opening query eij = 5 gap-extension query E14523E14523

How does it work (D,Q,P, and E-matrices) D Q m n V L I L P V L L P V LI L P V L L P P V LI L P V L L P E V LI L P V L L P

How does it work (D,Q,P, and E-matrices) D Q P m n E 6 V L I L P V L L P V LI L P V L L P V LI L P V L L P V LI L P V L L P

And the alignment D m n 20 V LI L P V L L P E 1 V LI L P V L L P VLILP VL-LP

And the alignment. Gap extensions D-matrix m n 19 V LI P L V L L P E 1 V LI L P V L L P A A E-matrix

And the alignment D m n 19 V LI P L V L L P E 1 V LI L P V L L P A A = 9?

And the alignment D m n 19 V LI P L V L L P E 1 V LI L P V L L P A A = 9?

And the alignment D m n 19 V LI P L V L L P E 1 V LI L P V L L P A A VLIALP VL--LP = 9? *** = 9?

And now you!

Summary Alignment is more complicated than what you have been told. Simple algorithmic tricks allow for alignment in O2 time More heuristics to improve speed –Limit gap length –Look for high scoring regions