Download presentation
Presentation is loading. Please wait.
1
Introduction to bioinformatics 2007
E N T R F O I G A V B M S U Introduction to bioinformatics 2007 Lecture 7 Pair-wise Sequence Alignment (III)
2
What can sequence alignment tell us about structure
HSSP Sander & Schneider, 1991 ≥30% sequence identity
3
Global dynamic programming PAM250, Gap =6 (linear)
S P E A R 2 1 H -1 -2 K 3 4 S P E A R -6 -12 -18 -24 -30 -36 2 -4 -10 -16 -22 -28 H -3 -9 -14 -20 -1 -7 -13 K 1 -15 -5 -2 6 These values are copied from the PAM250 matrix (see earlier slide) Start in left upper cell before either sequence (circled in red). Path will end in lower right cell (circled in blue) SPEARE S-HAKE The easy algorithm is only for linear gap penalties Higgs & Attwood, p. 124 – Note: There are errors in the matrices!!
4
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!
5
Time and memory complexity of DP
The time complexity is O(n2): if you would align two sequences of n residues, you would need to perform n2 algorithmic steps (square search matrix has n2 cells that need to be filled) The memory (space) complexity is also O(n2): if you would align two sequences of n residues, you would need a square search matrix of n by n containing n2 cells
6
Global dynamic programming
j-1 j i-1 i H(i-1,j-1) + S(i,j) H(i-1,j) - g H(i,j-1) - g diagonal vertical horizontal H(i,j) = Max Problem with simple DP approach: Can only do linear gap penalties Not suitable for affine and concave penalties
7
Global dynamic programming using affine penalties
j-2 j-1 j Looking back from cell (i, j) we can adapt the algorithm for affine gap penalties by looking back to four more cells (magenta) i-2 i-1 i If you came from here, gap was already open, so apply gap-extension penalty If you came from here, gap was opened so apply gap-open penalty
8
Global dynamic programming all three types of gap penalties
j-1 i-1 Gap opening penalty Max{S0<x<i-1, j-1 - Pi - (i-x-1)Px} Si-1,j-1 Max{Si-1, 0<y<j-1 - Pi - (j-y-1)Px} Si,j = si,j + Max Gap extension penalty
9
Global dynamic programming Gapo=10, Gape=2
W V T A L K 8 3 11 9 12 1 6 4 25 2 5 10 14 7 13 D W V T A L K -12 -14 -16 -18 -20 -22 -24 8 -9 -6 -5 -11 9 2 3 -3 -34 -13 25 11 5 4 -21 -10 -4 37 21 19 15 -2 23 46 31 26 1 17 33 53 39 50 14 -29 -1 27 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
10
Easy DP recipe for using affine gap penalties
j-1 i-1 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]
11
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!
12
Global dynamic programming
13
There are three kinds of alignments
Global alignment Semi-global alignment Local alignment
14
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 End-gaps
15
Semi-global dynamic programming PAM250, Gap =6 (linear)
1 H -1 -2 K 3 4 S P E A R 2 1 H -1 3 4 -2 K 7 11 These values are copied from the PAM250 matrix (see earlier slide) Start in left upper cell before either sequence (circled in red). Path will end in cell anywhere in the bottom row or rightmost columns with the highest score SPEARE -SHAKE The easy algorithm is only for linear gap penalties Higgs & Attwood, p. 124 – Note: There are errors in the matrices!!
16
Semi-global dynamic programming - two examples with different gap penalties -
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) Global score would have been 65 –10 – 1*2 –10 – 2*2 (because of the two end gaps)
17
Semi-global pairwise alignment
Applications of semi-global: – Finding a gene in genome – Placing marker onto a chromosome – Generally: if one sequence is much longer than the other Danger: if gap penalties high -- really bad alignments for divergent sequences
18
Local dynamic programming (Smith & Waterman, 1981)
LCFVMLAGSTVIVGTR E D A S T I L C G Negative numbers Amino Acid Exchange Matrix Search matrix Gap penalties (open, extension) AGSTVIVG A-STILCG
19
Local dynamic programming (Smith and Waterman, 1981) basic algorithm
j-1 j i-1 i H(i-1,j-1) + S(i,j) H(i-1,j) - g H(i,j-1) - g diagonal vertical horizontal H(i,j) = Max
20
Local dynamic programming Match/mismatch = 1/-1, Gap =2
1 2 3 Fill the matrix (forward pass), then do trace back from highest cell anywhere in the matrix till you reach 0 or the beginning of a sequence
21
Local dynamic programming Match/mismatch = 1/-1, Gap =2
1 2 3 GAC Fill the matrix (forward pass), then do trace back from highest cell anywhere in the matrix till you reach 0 or the beginning of a sequence
22
Local dynamic programming (Smith & Waterman, 1981)
j-1 This is the general DP algorithm, which is suitable for linear, affine and concave penalties, although for the examples here affine penalties are used i-1 Gap opening penalty Si,j + Max{S0<x<i-1,j-1 - Pi - (i-x-1)Px} Si,j + Si-1,j-1 Si,j + Max {Si-1,0<y<j-1 - Pi - (j-y-1)Px} Si,j = Max Gap extension penalty
23
Local dynamic programming
24
Global and local alignment
25
Global or Local Pairwise alignment
26
Globin fold protein myoglobin PDB: 1MBN
Alpha-helices are labelled ‘A’ (blue) to ‘H’ (red). The D helix can be missing in some globins: What happens with the alignment if D-helix containing globin sequences are aligned with ‘D-less’ ones?
27
sandwich protein immunoglobulin PDB: 7FAB
Immunoglobulinstructures have variable regions where numbers of amino acids can vary substantially
28
TIM barrel / protein Triose phosphate IsoMerase PDB: 1TIM
The evolutionary history of this protein family has been the subject of rigorous debate. Arguments have been made in favor of both convergent and divergent evolution. Because of the general lack of sequence homology, the ancestry of this molecule is still a mystery.
29
Pyruvate kinase b barrel regulatory domain
Phosphotransferase b barrel regulatory domain a/b barrel catalytic substrate binding domain a/b nucleotide binding domain
30
What does all 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. Alignments are only meaningful for homologous sequences (with a common ancestor)
31
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 one part of each sequence; end gaps are not applicable
32
Penalty = Pi + gap_length*Pe
Easy global DP recipe for using affine gap penalties (after Gotoh) j-1 Penalty = Pi + gap_length*Pe Max{S0<x<i-1, j-1 - Pi - (i-x-1)Px} Si-1,j-1 Max{Si-1, 0<y<j-1 - Pi - (j-y-1)Px} Si,j = si,j + Max i-1 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
33
Let’s do an example: global alignment Gotoh’s DP algorithm with affine gap penalties (PAM250, Pi=10, Pe=2) D W V T A L K -5 3 1 4 -7 -2 -4 17 -6 -3 2 6 -1 5 D W V T A L K -12 -14 -16 -18 -20 -22 -24 -17 -13 -19 -8 -7 -42 -21 9 13 -3 -1 14 -41 PAM250 Cell (D2, T4) can alternatively come from two cells (same score): ‘high-road’ or ‘low-road’ 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. Note that only ‘non-diagonal’ arrows are indicated for clarity (no arrow means that you go back to earlier diagonal cell).
34
Let’s do another example: semi-global alignment Gotoh’s DP algorithm with affine gap penalties (PAM250, Pi=10, Pe=2) D W V T A L K -5 3 1 4 -7 -2 -4 17 -6 -3 2 6 -1 5 D W V T A L K -5 3 4 -7 21 -13 -2 25 9 PAM250 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.
35
Penalty = Pi + gap_length*Pe
Easy local DP recipe for using affine gap penalties (after Gotoh) j-1 Penalty = Pi + gap_length*Pe Si,j + Max{S0<x<i-1,j-1 - Pi - (i-x-1)Px} Si,j + Si-1,j-1 Si,j + Max {Si-1,0<y<j-1 - Pi - (j-y-1)Px} Si,j = Max i-1 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)
36
Let’s do yet another example: local alignment Gotoh’s DP algorithm with affine gap penalties (PAM250, Pi=10, Pe=2) D W V T A L K -5 3 1 4 -7 -2 -4 17 -6 -3 2 6 -1 5 D W V T A L K 3 4 21 25 9 11 PAM250 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)
37
For your first exam D1: Make sure you understand and can carry out 1
For your first exam D1: Make sure you understand and can carry out 1. the ‘simple’ DP algorithm for global, semi-global and local alignment (using linear gap penalties but make sure you know the extension of the basic algorithm for affine gap penalties) and 2. The general DP algorithm for global, semi-global and local alignment (using linear, affine and concave gap penalties)!
38
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
39
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.
40
Dot plots can be filtered by window approaches (to calculate running averages) and applying a threshold They can identify insertions, deletions, inversions
41
Introduction to Bioinformatics
Deriving Amino Acid Substitution matrices (I)
42
Sequence Analysis Finding relationships between genes and gene products of different species, including those at large evolutionary distances
43
Archaea Domain Archaea is mostly composed of cells that live in extreme environments. While they are able to live elsewhere, they are usually not found there because outside of extreme environments they are competitively excluded by other organisms. Species of the domain Archaea are not inhibited by antibiotics, lack peptidoglycan in their cell wall (unlike bacteria, which have this sugar/polypeptide compound), and can have branched carbon chains in their membrane lipids of the phospholipid bilayer. It is believed that Archaea are very similar to prokaryotes (e.g. bacteria) that inhabited the earth billions of years ago. It is also believed that eukaryotes evolved from Archaea, because they share many mRNA sequences, have similar RNA polymerases, and have introns. Therefore, it is believed that the domains Archaea and Bacteria branched from each other very early in history, and membrane infolding* produced eukaryotic cells in the archaean branch approximately 1.7 billion years ago. There are three main groups of Archaea: extreme halophiles (salt), methanogens (methane producing anaerobes), and hyperthermophiles (e.g. living at temperatures >100º C!). *Membrane infolding is believed to have led to the nucleus of eukaryotic cells, which is a membrane-enveloped cell organelle that holds the cellular DNA. Prokaryotic cells are more primitive and do not have a nucleus.
44
The 20 common amino acids
45
Example of sequence database entry for Genbank
LOCUS DRODPPC 4001 bp INV 15-MAR-1990 DEFINITION D.melanogaster decapentaplegic gene complex (DPP-C), complete cds. ACCESSION M30116 KEYWORDS . SOURCE D.melanogaster, cDNA to mRNA. ORGANISM Drosophila melanogaster Eurkaryote; mitochondrial eukaryotes; Metazoa; Arthropoda; Tracheata; Insecta; Pterygota; Diptera; Brachycera; Muscomorpha; Ephydroidea; Drosophilidae; Drosophilia. REFERENCE 1 (bases 1 to 4001) AUTHORS Padgett, R.W., St Johnston, R.D. and Gelbart, W.M. TITLE A transcript from a Drosophila pattern gene predicts a protein homologous to the transforming growth factor-beta family JOURNAL Nature 325, (1987) MEDLINE COMMENT The initiation codon could be at either or FEATURES Location/Qualifiers source /organism=“Drosophila melanogaster” /db_xref=“taxon:7227” mRNA < /gene=“dpp” /note=“decapentaplegic protein mRNA” /db_xref=“FlyBase:FBgn ” gene /note=“decapentaplegic” /allele=“” CDS /note=“decapentaplegic protein (1188 could be 1587)” /codon_start=1 /db_xref=“PID:g157292” /translation=“MRAWLLLLAVLATFQTIVRVASTEDISQRFIAAIAPVAAHIPLA SASGSGSGRSGSRSVGASTSTALAKAFNPFSEPASFSDSDKSHRSKTNKKPSKSDANR …………………… LGYDAYYCHGKCPFPLADHFNSTNAVVQTLVNNMNPGKVPKACCVPTQLDSVAMLYL NDQSTBVVLKNYQEMTBBGCGCR” BASE COUNT 1170 a 1078 c 956 g 797 t ORIGIN 1 gtcgttcaac agcgctgatc gagtttaaat ctataccgaa atgagcggcg gaaagtgagc 61 cacttggcgt gaacccaaag ctttcgagga aaattctcgg acccccatat acaaatatcg 121 gaaaaagtat cgaacagttt cgcgacgcga agcgttaaga tcgcccaaag atctccgtgc 181 ggaaacaaag aaattgaggc actattaaga gattgttgtt gtgcgcgagt gtgtgtcttc 241 agctgggtgt gtggaatgtc aactgacggg ttgtaaaggg aaaccctgaa atccgaacgg 301 ccagccaaag caaataaagc tgtgaatacg aattaagtac aacaaacagt tactgaaaca 361 gatacagatt cggattcgaa tagagaaaca gatactggag atgcccccag aaacaattca 421 attgcaaata tagtgcgttg cgcgagtgcc agtggaaaaa tatgtggatt acctgcgaac 481 cgtccgccca aggagccgcc gggtgacagg tgtatccccc aggataccaa cccgagccca 541 gaccgagatc cacatccaga tcccgaccgc agggtgccag tgtgtcatgt gccgcggcat 601 accgaccgca gccacatcta ccgaccaggt gcgcctcgaa tgcggcaaca caattttcaa …………………………. 3841 aactgtataa acaaaacgta tgccctataa atatatgaat aactatctac atcgttatgc 3901 gttctaagct aagctcgaat aaatccgtac acgttaatta atctagaatc gtaagaccta 3961 acgcgtaagc tcagcatgtt ggataaatta atagaaacga g //
46
Example of sequence database entry for SWISS-PROT (now UNIPROT)
ID DECA_DROME STANDARD; PRT; 588AA. AC P07713; DT 01-APR-1988 (REL. 07, CREATED) DT 01-APR-1988 (REL. 07, LAST SEQUENCE UPDATE) DT 01-FEB-1995 (REL. 31, LAST ANNOTATION UPDATE) DE DECAPENTAPLEGIC PROTEIN PRECURSOR (DPP-C PROTEIN). GN DPP. OS DROSOPHILA MELANOGASTER (FRUIT FLY). OC EUKARYOTA; METAZOA; ARTHROPODA; INSECTA; DIPTERA. RN [1] RP SEQUENCE FROM N.A. RM RA PADGETT R.W., ST JOHNSTON R.D., GELBART W.M.; RL NATURE 325:81-84 (1987) RN [2] RP CHARACTERIZATION, AND SEQUENCE OF RM RA PANGANIBAN G.E.F., RASHKA K.E., NEITZEL M.D., HOFFMANN F.M.; RL MOL. CELL. BIOL. 10: (1990). CC -!- FUNCTION: DPP IS REQUIRED FOR THE PROPER DEVELOPMENT OF THE CC EMBRYONIC DOORSAL HYPODERM, FOR VIABILITY OF LARVAE AND FOR CELL CC VIABILITY OF THE EPITHELIAL CELLS IN THE IMAGINAL DISKS. CC -!- SUBUNIT: HOMODIMER, DISULFIDE-LINKED. CC -!- SIMILARITY: TO OTHER GROWTH FACTORS OF THE TGF-BETA FAMILY. DR EMBL; M30116; DMDPPC. DR PIR; A26158; A26158. DR HSSP; P08112; 1TFG. DR FLYBASE; FBGN ; DPP. DR PROSITE; PS00250; TGF_BETA. KW GROWTH FACTOR; DIFFERENTIATION; SIGNAL. FT SIGNAL 1 ? POTENTIAL. FT PROPEP ? 456 FT CHAIN DECAPENTAPLEGIC PROTEIN. FT DISULFID BY SIMILARITY. FT DISULFID BY SIMILARITY. FT DISULFID BY SIMILARITY. FT DISULFID INTERCHAIN (BY SIMILARITY). FT CARBOHYD POTENTIAL. FT CARBOHYD POTENTIAL. FT CARBOHYD POTENTIAL. FT CARBOHYD POTENTIAL. SQ SEQUENCE AA; MW; CN; MRAWLLLLAV LATFQTIVRV ASTEDISQRF IAAIAPVAAH IPLASASGSG SGRSGSRSVG ASTSTAGAKA FNRFSEPASF SDSDKSHRSK TNKKPSKSDA NRQFNEVHKP RTDQLENSKN KSKQLVNKPN HNKMAVKEQR SHHKKSHHHR SHQPKQASAS TESHQSSSIE SIFVEEPTLV LDREVASINV PANAKAIIAE QGPSTYSKEA LIKDKLKPDP STYLVEIKSL LSLFNMKRPP KIDRSKIIIP EPMKKLYAEI MGHELDSVNI PKPGLLTKSA NTVRSFTHKD SKIDDRFPHH HRFRLHFDVK SIPADEKLKA AELQLTRDAL SQQVVASRSS ANRTRYQBLV YDITRVGVRG QREPSYLLLD TKTBRLNSTD TVSLDVQPAV DRWLASPQRN YGLLVEVRTV RSLKPAPHHH VRLRRSADEA HERWQHKQPL LFTYTDDGRH DARSIRDVSG GEGGGKGGRN KRHARRPTRR KNHDDTCRRH SLYVDFSDVG WDDWIVAPLG YDAYYCHGKC PFPLADHRNS TNHAVVQTLV NNMNPGKBPK ACCBPTQLDS VAMLYLNDQS TVVLKNYQEM TVVGCGCR
47
What to align, nucleotide or amino acid sequences?
If you think you have an Open Reading Frame (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.
48
How to get an amino acid exchange matrix?
57
PAM250 matrix WR exchange is too large (due to paucity of data) A 2
Q E G H I L K M F P S T W Y V B Z A R N D C Q E G H I L K M F P S T W Y V B Z PAM250 matrix WR exchange is too large (due to paucity of data)
58
PAM model The scores derived through the PAM model are an accurate description of the information content (or the relative entropy) of an alignment (Altschul, 1991). PAM-1 corresponds to about 1 million years of evolution PAM-120 has the largest information content of the PAM matrix series PAM-250 is the traditionally most popular matrix
59
PAM / MDM / Dayhoff -- summary
The late Margaret Dayhoff was a pioneer in protein databasing and comparison. She and her coworkers developed a model of protein evolution which resulted in the development of a set of widely used substitution matrices. These are frequently called Dayhoff, MDM (Mutation Data Matrix), or PAM (Percent Accepted Mutation) matrices: Derived from global alignments of closely related sequences. Matrices for greater evolutionary distances are extrapolated from those for lesser ones. The number associated with the matrix (PAM40, PAM100) refers to the evolutionary distance; greater numbers correspond to greater distances. Several later groups have attempted to extend Dayhoff's methodology or re-apply her analysis using later databases with more examples. Extensions: Jones, Thornton and coworkers used the same methodology as Dayhoff but with modern databases (CABIOS 8: ) Gonnett and coworkers (Science 256: ) used a slightly different (but theoretically equivalent) methodology Henikoff & Henikoff (Proteins 17: ) compared these two newer versions of the PAM matrices with Dayhoff's originals.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.