1-month Practical Course Genome Analysis Lecture 4: Pair-wise alignment Centre for Integrative Bioinformatics VU (IBIVU) Vrije Universiteit Amsterdam The.

Slides:



Advertisements
Similar presentations
Global Sequence Alignment by Dynamic Programming.
Advertisements

Alignment methods Introduction to global and local sequence alignment methods Global : Needleman-Wunch Local : Smith-Waterman Database Search BLAST FASTA.
1 ALIGNMENT OF NUCLEOTIDE & AMINO-ACID SEQUENCES.
Lecture 8 Alignment of pairs of sequence Local and global alignment
Introduction to Bioinformatics
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
Sequence Similarity Searching Class 4 March 2010.
“Nothing in Biology makes sense except in the light of evolution” (Theodosius Dobzhansky ( )) “Nothing in bioinformatics makes sense except in.
Heuristic alignment algorithms and cost matrices
1-month Practical Course Genome Analysis (Integrative Bioinformatics & Genomics) Lecture 3: Pair-wise alignment Centre for Integrative Bioinformatics VU.
Sequence analysis course
Developing Pairwise Sequence Alignment Algorithms Dr. Nancy Warter-Perez.
Developing Pairwise Sequence Alignment Algorithms Dr. Nancy Warter-Perez June 23, 2005.
Alignment methods and database searching April 14, 2005 Quiz#1 today Learning objectives- Finish Dotter Program analysis. Understand how to use the program.
Developing Pairwise Sequence Alignment Algorithms Dr. Nancy Warter-Perez June 23, 2004.
CENTRFORINTEGRATIVE BIOINFORMATICSVU E [1] Sequence Analysis Sequence Analysis Lecture 3 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.
Sequence similarity.
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.
CENTRFORINTEGRATIVE BIOINFORMATICSVU E [1] Sequence Analysis Alignments 2: Local alignment Sequence Analysis
1-month Practical Course Genome Analysis Lecture 3: Residue exchange matrices Centre for Integrative Bioinformatics VU (IBIVU) Vrije Universiteit Amsterdam.
Bioinformatics Unit 1: Data Bases and Alignments Lecture 3: “Homology” Searches and Sequence Alignments (cont.) The Mechanics of Alignments.
Alignment III PAM Matrices. 2 PAM250 scoring matrix.
Substitution matrices
Dynamic Programming. Pairwise Alignment Needleman - Wunsch Global Alignment Smith - Waterman Local Alignment.
Developing Pairwise Sequence Alignment Algorithms Dr. Nancy Warter-Perez May 10, 2005.
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.
LCS and Extensions to Global and Local Alignment Dr. Nancy Warter-Perez June 26, 2003.
Sequence comparison: Score matrices Genome 559: Introduction to Statistical and Computational Genomics Prof. James H. Thomas
TM Biological Sequence Comparison / Database Homology Searching Aoife McLysaght Summer Intern, Compaq Computer Corporation Ballybrit Business Park, Galway,
Developing Pairwise Sequence Alignment Algorithms
Bioiformatics I Fall Dynamic programming algorithm: pairwise comparisons.
Pair-wise Sequence Alignment What happened to the sequences of similar genes? random mutation deletion, insertion Seq. 1: 515 EVIRMQDNNPFSFQSDVYSYG EVI.
Pair-wise Sequence Alignment Introduction to bioinformatics 2007 Lecture 5 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.
Pairwise alignments Introduction Introduction Why do alignments? Why do alignments? Definitions Definitions Scoring alignments Scoring alignments Alignment.
Bioinformatics in Biosophy
Pairwise & Multiple sequence alignments
Pair-wise Sequence Alignment (II) Introduction to bioinformatics 2008 Lecture 6 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.
CISC667, S07, Lec5, Liao CISC 667 Intro to Bioinformatics (Spring 2007) Pairwise sequence alignment Needleman-Wunsch (global alignment)
Pairwise Sequence Alignment. The most important class of bioinformatics tools – pairwise alignment of DNA and protein seqs. alignment 1alignment 2 Seq.
Pairwise Sequence Alignment BMI/CS 776 Mark Craven January 2002.
Pairwise alignment of DNA/protein sequences I519 Introduction to Bioinformatics, Fall 2012.
Sequence Analysis CSC 487/687 Introduction to computing for Bioinformatics.
Lecture 6. Pairwise Local Alignment and Database Search Csc 487/687 Computing for bioinformatics.
Function preserves sequences Christophe Roos - MediCel ltd Similarity is a tool in understanding the information in a sequence.
Pair-wise Sequence Alignment Introduction to bioinformatics 2007 Lecture 5 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.
BLAST: Basic Local Alignment Search Tool Altschul et al. J. Mol Bio CS 466 Saurabh Sinha.
Applied Bioinformatics Week 3. Theory I Similarity Dot plot.
Sequence Alignments with Indels Evolution produces insertions and deletions (indels) – In addition to substitutions Good example: MHHNALQRRTVWVNAY MHHALQRRTVWVNAY-
Pairwise sequence alignment Lecture 02. Overview  Sequence comparison lies at the heart of bioinformatics analysis.  It is the first step towards structural.
Sequence Alignment.
Introduction to bioinformatics Lecture 7 Multiple sequence alignment (1)
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.
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.
Techniques for Protein Sequence Alignment and Database Searching G P S Raghava Scientist & Head Bioinformatics Centre, Institute of Microbial Technology,
Substitution Matrices and Alignment Statistics BMI/CS 776 Mark Craven February 2002.
Sequence comparison: Local alignment
Biology 162 Computational Genetics Todd Vision Fall Aug 2004
Introduction to bioinformatics 2007
Introduction to bioinformatics 2007
Pairwise sequence Alignment.
Pairwise Sequence Alignment
Introduction to bioinformatics 2007
BCB 444/544 Lecture 7 #7_Sept5 Global vs Local Alignment
Pairwise Alignment Global & local alignment
Introduction to bioinformatics Lecture 5 Pair-wise sequence alignment
Presentation transcript:

1-month Practical Course Genome Analysis Lecture 4: Pair-wise alignment Centre for Integrative Bioinformatics VU (IBIVU) Vrije Universiteit Amsterdam The Netherlands 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

Pair-wise alignment Combinatorial explosion - 1 gap in 1 sequence: n+1 possibilities - 2 gaps in 1 sequence: (n+1)n - 3 gaps in 1 sequence: (n+1)n(n-1), etc. 2n (2n)! 2 2n = ~ n (n!) 2   n 2 sequences of 300 a.a.: ~10 88 alignments 2 sequences of 1000 a.a.: ~ alignments! T D W V T A L K T D W L - - I K

Technique to overcome the combinatorial explosion: Dynamic Programming Alignment is simulated as Markov process, all sequence positions are seen as independent Chances of sequence events are independent –Therefore, probabilities per aligned position need to be multiplied –Amino acid matrices contain so-called log-odds values (log 10 of the probabilities), so probabilities can be summed

To perform statistical analyses on messages or sequences, we need a reference model. The model: each letter in a sequence is selected from a defined alphabet in an independent and identically distributed (i.i.d.) manner. This choice of model system will allow us to compute the statistical significance of certain characteristics of a sequence, its subsequences, or an alignment. Given a probability distribution, P i, for the letters in a i.i.d. message, the probability of seeing a particular sequence of letters i, j, k,... n is simply P i P j P k ···P n. As an alternative to multiplication of the probabilities, we could sum their logarithms and exponentiate the result. The probability of the same sequence of letters can be computed by exponentiating log P i + log P j + log P k + ··· + log P n. In practice, when aligning sequences we only add log-odds values (residue exchange matrix) but we do not exponentiate the final score. To say the same more statistically…

Sequence alignment History of the Dynamic Programming (DP) algorithm 1970 Needleman-Wunsch global pair-wise alignment Needleman SB, Wunsch CD (1970) A general method applicable to the search for similarities in the amino acid sequence of two proteins, J Mol Biol. 48(3): Smith-Waterman local pair-wise alignment Smith, TF, Waterman, MS (1981) Identification of common molecular subsequences. J. Mol. Biol. 147,

Pairwise sequence alignment Global dynamic programming MDAGSTVILCFVG MDAASTILCGSMDAASTILCGS Amino Acid Exchange Matrix Gap penalties (open,extension) Search matrix MDAGSTVILCFVG- MDAAST-ILC--GS Evolution

Three kinds of Gap Penalty schemes: Linear: gp(k)=ak Affine: gp(k)=b+ak (most commonly used) Concave (general): e.g. gp(k)=log(k) k is the gap length Dynamic programming b k gp(k)

Global dynamic programming i-1 i j-1 j H(i,j) = Max H(i-1,j-1) + S(i,j) H(i-1,j) - g H(i,j-1) - g diagonal vertical horizontal Value from residue exchange matrix This is a recursive formula

Dynamic programming steps MDAASTILCGSMDAASTILCGS Search matrix MDAGSTVILCFVG- MDAAST-ILC--GS MDAGSTVILCFVG 1.Forward step: Fill in search matrix using appropriate scoring system (exchange matrix and gap penalties) and place back-pointers 2.Get alignment score from ‘last’ cell: 1.Lower right cell (global and semi-global DP) 2.Highest scoring cell anywhere in matrix (local alignment – see later slides) 3.Perform trace-back (using back- pointers placed during forward step) and get alignment

Global dynamic programming PAM250, Gap =6 (linear) SPEARE S H A K E SPEARE S H01 21 A K00 30 E These values are copied from the PAM250 matrix (see earlier slide) The extra bottom row and rightmost column give the penalties that would need to be applied due to end gaps Higgs & Attwood, p. 124 S-HAKE SPEARE

Global dynamic programming i-1 i j-1 j H(i,j) = Max H(i-1,j-1) + S(i,j) H(i-1,j) - g H(i,j-1) - g diagonal vertical horizontal Problem with simple DP approach: Can only do linear gap penalties Not suitable for affine and concave penalties

Global dynamic programming with concave gap penalties Ngila is a global, pairwise alignment program that uses logarithmic and affine gap costs, i.e. C(g) = a+b*g+c*ln(g). These gap costs are more biologically realistic than the more popular (and efficient) affine gap cost model. Ngila version includes two new, evolutionary alignment models. These models allow you to find the maximum alignment of two sequences based on biological, evolutionary parameters--no more guessing at biological costs. Additional changes are noted on the website.  Website & Manual:  Reference: Cartwright RA (2007) Ngila: global pairwise alignments with logarithmic and affine gap costs. Bioinformatics. 23(11):

Global dynamic programming Affine and logarithmic gap penalties i-1 j-1 S i,j = s i,j + Max Max{S 0<x<i-1, j-1 - Pi - (i-x-1)Px} S i-1,j-1 Max{S i-1, 0<y<j-1 - Pi - (j-y-1)Px} Gap opening penalty Gap extension penalty

Global dynamic programming Gap o =10, Gap e =2 DWVTALK T D W V L K DWVTALK T D W V L K These values are copied from the PAM250 matrix (see earlier slide), after being made non- negative by adding 8 to each PAM250 matrix cell (-8 is the lowest number in the PAM250 matrix) The extra bottom row and rightmost column give the final global alignment scores

Easy DP recipe for using affine gap penalties M[i,j] is optimal alignment (highest scoring alignment until [i,j]) Check –preceding row until j-2: apply appropriate gap penalties –preceding row until i-2: apply appropriate gap penalties –and cell[i-1, j-1]: apply score for cell[i-1, j-1] i-1 j-1

DP is a two-step process Forward step: calculate scores Trace back: start at highest score and reconstruct the path leading to the highest score –These two steps lead to the highest scoring alignment (the optimal alignment) –This is guaranteed when you use DP!

Global dynamic programming

Semi-global pairwise alignment Global alignment: all gaps are penalised Semi-global alignment: N- and C-terminal gaps (end-gaps) are not penalised MSTGAVLIY--TS GGILLFHRTSGTSNS End-gaps

Semi-global dynamic programming - two examples with different gap penalties - Global score is 65 – 10 – 1*2 –10 – 2*2 These values are copied from the PAM250 matrix (see earlier slide), after being made non- negative by adding 8 to each PAM250 matrix cell (-8 is the lowest number in the PAM250 matrix)

Semi-global pairwise alignment Applications of semi-global: – Finding a gene in genome – Placing marker onto a chromosome – One sequence much longer than the other Danger: if gap penalties high -- really bad alignments for divergent sequences N- or C-terminal amino acids are often small and polar, giving rise to semi-global alignments with tips of sequences matched in cases of low sequence similarity

Local dynamic programming (Smith & Waterman, 1981) LCFVMLAGSTVIVGTR EDASTILCGSEDASTILCGS Amino Acid Exchange Matrix Gap penalties (open, extension) Search matrix Negative numbers AGSTVIVG A-STILCG

Local dynamic programming (Smith & Waterman, 1981) i-1 j-1 S i,j = Max S i,j + Max{S 0<x<i-1,j-1 - Pi - (i-x-1)Px} S i,j + S i-1,j-1 S i,j + Max {S i-1,0<y<j-1 - Pi - (j-y-1)Px} 0 Gap opening penalty Gap extension penalty

Local dynamic programming

Dot plots Way of representing (visualising) sequence similarity without doing dynamic programming (DP) Make same matrix, but locally represent sequence similarity by averaging using a window

Comparing two sequences We want to be able to choose the best alignment between two sequences. A simple method of visualising similarities between two sequences is to use dot plots. The first sequence to be compared is assigned to the horizontal axis and the second is assigned to the vertical axis. Comparison is done through scoring diagonals of preset length (gapless fragments)

Comparing two sequences using a dot plot Central cell in window takes the (average) score over all window cells Here you see a diagonal (window) of 7 residue pairs, i.e. the window has length 7.

Dot plots can be filtered by window approaches (to calculate running averages) and applying a threshold They can identify insertions, deletions, inversions

Global or Local Pairwise alignment Local Global A B A B A B BA AB Local Global A B A C C A BC ABC A B A C C

Globin fold  protein myoglobin PDB: 1MBN Helices are labelled ‘A’ (blue) to ‘H’ (red). D helix can be missing in some globins: what happens with the alignment?

Pyruvate kinase Phosphotransferase  barrel regulatory domain  barrel catalytic substrate binding domain  nucleotide binding domain

What does this mean for alignments? Alignments need to be able to skip secondary structural elements to complete domains (i.e. putting gaps opposite these motifs in the shorter sequence). Depending on gap penalties chosen, the algorithm might have difficulty with making such long gaps (for example when using high affine gap penalties), resulting in incorrect alignment.

There are three kinds of pairwise alignments Global alignment – align all residues in both sequences; all gaps are penalised Semi-global alignment – align all residues in both sequences; end gaps are not penalised (zero end gap penalties) Local alignment – align part of each sequence; end gaps are not applicable

Easy global DP recipe for using affine gap penalties (after Gotoh) M[i,j] is optimal alignment (highest scoring alignment until [i, j]) At each cell [i, j] in search matrix, check Max coming from: any cell in preceding row until j-2: add score for cell[i, j] minus appropriate gap penalties; any cell in preceding column until i-2: add score for cell[i, j] minus appropriate gap penalties; or cell[i-1, j-1]: add score for cell[i, j] Select highest scoring cell in bottom row and rightmost column and do trace-back i-1 j-1 Penalty = Pi + gap_length*Pe S i,j = s i,j + Max Max{S 0<x<i-1, j-1 - Pi - (i-x-1)Px} S i-1,j-1 Max{S i-1, 0<y<j-1 - Pi - (j-y-1)Px}

Let’s do an example: global alignment Gotoh’s DP algorithm with affine gap penalties (PAM250, Pi=10, Pe=2) Row and column ‘0’ are filled with 0, -12, -14, -16, … if global alignment is used (for N-terminal end-gaps); also extra row and column at the end to calculate the score including C-terminal end-gap penalties. DWVTALK T D W V L K DWVTALK T D W V L K PAM250 Cell (D2, T4) can alternatively come from two cells (same score): ‘high-road’ or ‘low-road’

Let’s do another example: semi-global alignment Gotoh’s DP algorithm with affine gap penalties (PAM250, Pi=10, Pe=2) Starting row and column ‘0’, and extra column at right or extra row at bottom is not necessary when using semi global alignment (zero end- gaps). Rest works as under global alignment. DWVTALK T D W V L K DWVTALK T0-503 D4-7 W V L K PAM250

Easy local DP recipe for using affine gap penalties (after Gotoh) M[i,j] is optimal alignment (highest scoring alignment until [i, j]) At each cell [i, j] in search matrix, check Max coming from: any cell in preceding row until j-2: add score for cell[i, j] minus appropriate gap penalties; any cell in preceding column until i-2: add score for cell[i, j] minus appropriate gap penalties; or cell[i-1, j-1]: add score for cell[i, j] Select highest scoring cell anywhere in matrix and do trace-back until zero-valued cell or start of sequence(s) i-1 j-1 Penalty = Pi + gap_length*Pe S i,j = Max S i,j + Max{S 0<x<i-1,j-1 - Pi - (i-x-1)Px} S i,j + S i-1,j-1 S i,j + Max {S i-1,0<y<j-1 - Pi - (j-y-1)Px} 0

Let’s do yet another example: local alignment Gotoh’s DP algorithm with affine gap penalties (PAM250, Pi=10, Pe=2) Extra start/end columns/rows not necessary (no end-gaps). Each negative scoring cell is set to zero. Highest scoring cell may be found anywhere in search matrix after calculating it. Trace highest scoring cell back to first cell with zero value (or the beginning of one or both sequences) DWVTALK T D W V L K DWVTALK T0003 D4000 W02100 V00259 L0011 K00 PAM250

What to align, nucleotide or amino acid sequences? If ORF then align at protein level –(i) Many mutations within DNA are synonymous, leading to overestimation of sequence divergence if compared at the DNA level. –(ii) Evolutionary relationships can be more finely expressed using a 20×20 amino acid exchange table than using nucleotide exchanges. –(iii) DNA sequences contain non-coding regions which should be avoided in homology searches. Still an issue when translating into (six) protein sequences through a codon table. –(iv) Searching at protein level: frameshifts can occur, leading to stretches of incorrect amino acids and possibly elongation of sequences due to missed stop codons. But frameshifts normally result in stretches of highly unlikely amino acids: can be used as a signal to trace.

A note on reliability  All these matrices are designed using standard evolutionary models.  It is important to understand that evolution is not the same for all proteins, not even for the same regions of proteins.  No single matrix performs best on all sequences. Some are better for sequences with few gaps, and others are better for sequences with fewer identical amino acids.  Therefore, when aligning sequences, applying a general model to all cases is not ideal. Rather, re-adjustment can be used to make the general model better fit the given data.

Alignment summary  If ORF exists, then align at protein level.  Amino acid substitution matrices reflect the log-odds ratio between the evolutionary and random model and therefore help in determining homology via the alignment score.  The evolutionary and random models depend on generalized data used to derive them. This is not an ideal solution.  Apart from the PAM and BLOSUM series, a large number of further matrices have been developed.  Matrices have been made based on DNA, protein structure, information content, etc.  For local alignment, BLOSUM62 is often superior; for distant (global) alignments, BLOSUM50, GONNET, or (still) PAM250 work well.  Remember that gap penalties are always a problem; unlike the matrices themselves, there is no formal way to calculate their values -- you can follow recommended settings, but these are based on trial and error and not on a formal framework.

Pair-wise alignment quality versus sequence identity (Vogt et al., JMB 249, ,1995) Correctly matched residues are determined using structural alignments (comparing protein 3D structures); Error rates become dramatic at lower sequence identity levels – at 25% identical residues 75% of residues is aligned correctly, at 15% sequence identity only 30% is aligned correctly!