Download presentation
Presentation is loading. Please wait.
1
Sequence Alignment and Phylogenetic Analysis
2
Evolution
3
Sequence Alignment AGGCTATCACCTGACCTCCAGGCCGATGCCC
TAGCTATCACGACCGCGGTCGATTTGCCCGAC -AGGCTATCACCTGACCTCCAGGCCGA--TGCCC--- TAG-CTATCAC--GACCGC--GGTCGATTTGCCCGAC Definition Given two strings x = x1x2...xM, y = y1y2…yN, an alignment is an assignment of gaps to positions 0,…, N in x, and 0,…, N in y, so as to line up each letter in one sequence with either a letter, or a gap in the other sequence
4
What is a good alignment?
AGGCTAGTT, AGCGAAGTTT AGGCTAGTT- 6 matches, 3 mismatches, 1 gap AGCGAAGTTT AGGCTA-GTT- 7 matches, 1 mismatch, 3 gaps AG-CGAAGTTT AGGC-TA-GTT- 7 matches, 0 mismatches, 5 gaps AG-CG-AAGTTT
5
Scoring Function Sequence edits: AGGCCTC Scoring Function: Match: +m
Mutations AGGACTC Insertions AGGGCCTC Deletions AGG . CTC Scoring Function: Match: +m Mismatch: -s Gap: -d Score F = (# matches) m - (# mismatches) s – (#gaps) d
6
Example F(i,j) i = 0 1 2 3 4 F(1, 1) = max{F(0,0) + s(A, A),
x = AGTA m = 1 y = ATA s = -1 d = -1 F(i,j) i = F(1, 1) = max{F(0,0) + s(A, A), F(0, 1) – d, F(1, 0) – d} = max{0 + 1, -1 – 1, -1 – 1} = 1 A G T -1 -2 -3 -4 1 2 j = 0 1 2 3 A G - T A
7
The Needleman-Wunsch Matrix
x1 ……………………………… xM Every nondecreasing path from (0,0) to (M, N) corresponds to an alignment of the two sequences y1 ……………………………… yN An optimal alignment is composed of optimal subalignments
8
Example H E A G W -8 -16 -24 -32 -40 -48 -56 -64 -72 -80 P -2 -9 -17
-2 -3 6 10 P -4 15 Example H E A G W -8 -16 -24 -32 -40 -48 -56 -64 -72 -80 P -2 -9 -17 -25 -33 -42 -49 -57 -65 -73 Exercise fill in the rest of the table
9
H E A G W -8 -16 -24 -32 -40 -48 -56 -64 -72 -80 P -2 -9 -17 -25 -33
-2 -3 6 10 P -4 15 H E A G W -8 -16 -24 -32 -40 -48 -56 -64 -72 -80 P -2 -9 -17 -25 -33 -42 -49 -57 -65 -73 -10 -3 -4 -12 -20 -28 -36 -44 -52 -60 -18 -11 -6 -7 -15 -5 -13 -21 -29 -37 -14 -19 -22 3 -30 2 -38 1
10
PAMX PAMx = PAM1x PAM250 is a widely used scoring matrix:
PAM250 = PAM1250 PAM250 is a widely used scoring matrix: Ala Arg Asn Asp Cys Gln Glu Gly His Ile Leu Lys ... A R N D C Q E G H I L K ... Ala A Arg R Asn N Asp D Cys C Gln Q ... Trp W Tyr Y Val V
11
The Blosum50 Scoring Matrix
12
Affine Gap Penalties ATA__GC ATATTGC ATAG_GC AT_GTGC
In nature, a series of k indels often come as a single event rather than a series of k single nucleotide events: ATA__GC ATATTGC ATAG_GC AT_GTGC This is more likely. This is less likely. Normal scoring would give the same score for both alignments
13
Affine gaps e d (n) (n) = d + (n – 1)e | | gap gap open extend
| | gap gap open extend To compute optimal alignment, F(i, j): score of alignment x1…xi to y1…yj if xi aligns to yj G(i, j): score if xi aligns to a gap after yj H(i, j): score if yj aligns to a gap after xi V(i, j) = best score of alignment x1…xi to y1…yj d
14
Needleman-Wunsch with affine gaps
Initialization: V(i, 0) = d + (i – 1)e V(0, j) = d + (j – 1)e Iteration: V(i, j) = max{ F(i, j), G(i, j), H(i, j) } F(i, j) = V(i – 1, j – 1) + s(xi, yj) V(i, j – 1) – d G(i, j) = max G(i, j – 1) – e V(i – 1, j) – d H(i, j) = max H(i – 1, j) – e Termination: similar
15
Pairwise Alignment Tools
16
Some Typical Dot-plot Comparisons
Divergent sequences where only a segment is homologous Long insertions and deletions Tandem repeats The square shape of the pattern is characteristic of these repeats
17
Using Dotlet Dotlet is one of the handiest tools for making dot plots
Dotlet is a Java applet Open and download the applet at the following site: Use Firefox or IE
18
Window size Threshold window for fine tuning Dot plot window Alignment window
19
Window size Threshold window for fine tuning Dot plot window Alignment window
20
Window size Threshold window for fine tuning Dot plot window Alignment window
21
Looking at Repeated Domains with Dotlet
The square shape is typical of tandem repeats The repeats are not perfect because the sequences have diverged after their duplication
22
Comparing a Gene and Its Product
Eukaryotic genes are transcribed into RNA The RNA is then spliced to remove the introns’ sequences It may be necessary to compare the gene and its product Dotlet makes this comparative analysis easy
23
Lalign and BLAST Lalign is like a very precise BLAST
It works on only two sequences at a time You must provide both sequences
24
LaLign
26
Lalign Output Lalign produces an output similar to the alignment section of BLAST The E-value indicates the significance of each alignment Low E-value good alignment
27
Multiple Alignment
28
Example
29
4 Ways of Using MSAs . . .
30
4 More Ways of Using MSAs
31
Generalizing the Notion of Pairwise Alignment
Alignment of 2 sequences is represented as a 2-row matrix In a similar way, we represent alignment of 3 sequences as a 3-row matrix A T _ G C G _ A _ C G T _ A A T C A C _ A Score: more conserved columns, better alignment
32
Aligning Three Sequences
source Same strategy as aligning two sequences Use a 3-D “”, with each axis representing a sequence to align For global alignments, go from source to sink sink
33
Architecture of 3-D Alignment Cell
(i-1,j,k-1) (i-1,j-1,k-1) (i-1,j-1,k) (i-1,j,k) (i,j,k-1) (i,j-1,k-1) (i,j,k) (i,j-1,k)
34
Multiple Alignment: Dynamic Programming
cube diagonal: no indels si,j,k = max (x, y, z) is an entry in the 3-D scoring matrix si-1,j-1,k-1 + (vi, wj, uk) si-1,j-1,k + (vi, wj, _ ) si-1,j,k (vi, _, uk) si,j-1,k (_, wj, uk) si-1,j,k + (vi, _ , _) si,j-1,k + (_, wj, _) si,j,k (_, _, uk) face diagonal: one indel edge diagonal: two indels
35
Multiple Alignment: Running Time
For 3 sequences of length n, the run time is 7n3; O(n3) For k sequences, build a k-dimensional Manhattan, with run time (2k-1)(nk); O(2knk) Conclusion: dynamic programming approach for alignment between two sequences is easily extended to k sequences but it is impractical due to exponential running time
36
Sum of Pairs Score(SP-Score)
Consider pairwise alignment of sequences ai and aj imposed by a multiple alignment of k sequences Denote the score of this suboptimal (not necessarily optimal) pairwise alignment as s*(ai, aj) Sum up the pairwise scores for a multiple alignment: s(a1,…,ak) = Σi,j s*(ai, aj)
37
SP-Score: Example a1 ATG-C-AAT . A-G-CATAT ak ATCCCATTT
To calculate each column: s s*( Pairs of Sequences A G 1 Score=3 1 -m 1 Score = 1 – 2m A A C G 1 -m Column 1 Column 3
38
Multiple Alignment Induces Pairwise Alignments
Every multiple alignment induces pairwise alignments x: AC-GCGG-C y: AC-GC-GAG z: GCCGC-GAG Induces: x: ACGCGG-C; x: AC-GCGG-C; y: AC-GCGAG y: ACGC-GAC; z: GCCGC-GAG; z: GCCGCGAG
39
Reverse Problem: Constructing Multiple Alignment from Pairwise Alignments
Given 3 arbitrary pairwise alignments: x: ACGCTGG-C; x: AC-GCTGG-C; y: AC-GC-GAG y: ACGC--GAC; z: GCCGCA-GAG; z: GCCGCAGAG can we construct a multiple alignment that induces them?
40
Reverse Problem: Constructing Multiple Alignment from Pairwise Alignments
Given 3 arbitrary pairwise alignments: x: ACGCTGG-C; x: AC-GCTGG-C; y: AC-GC-GAG y: ACGC--GAC; z: GCCGCA-GAG; z: GCCGCAGAG can we construct a multiple alignment that induces them? NOT ALWAYS Pairwise alignments may be inconsistent
41
Profile Representation of Multiple Alignment
- A G G C T A T C A C C T G T A G – C T A C C A G C A G – C T A C C A G C A G – C T A T C A C – G G C A G – C T A T C G C – G G A C G T
42
Multiple Alignment: Greedy Approach
Choose most similar pair of strings and combine into a profile , thereby reducing alignment of k sequences to an alignment of of k-1 sequences/profiles. Repeat This is a heuristic greedy method u1= ACg/tTACg/tTACg/cT… u2 = TTAATTAATTAA… … uk = CCGGCCGGCCGG… u1= ACGTACGTACGT… u2 = TTAATTAATTAA… u3 = ACTACTACTACT… … uk = CCGGCCGGCCGG k-1 k
43
Greedy Approach: Example
Consider these 4 sequences s1 GATTCA s2 GTCTGA s3 GATATT s4 GTCAGC
44
Greedy Approach: Example (cont’d)
There are = 6 possible alignments s2 GTCTGA s4 GTCAGC (score = 2) s1 GAT-TCA s2 G-TCTGA (score = 1) s3 GATAT-T (score = 1) s1 GATTCA-- s4 G—T-CAGC(score = 0) s2 G-TCTGA s3 GATAT-T (score = -1) s3 GAT-ATT s4 G-TCAGC (score = -1)
45
Greedy Approach: Example (cont’d)
s2 and s4 are closest; combine: s2 GTCTGA s4 GTCAGC s2,4 GTCt/aGa/cA (profile) new set of 3 sequences: s1 GATTCA s3 GATATT s2,4 GTCt/aGa/c
46
Progressive Alignment
Progressive alignment is a variation of greedy algorithm with a somewhat more intelligent strategy for choosing the order of alignments. Progressive alignment works well for close sequences, but deteriorates for distant sequences Gaps in consensus string are permanent Use profiles to compare sequences
47
ClustalW Popular multiple alignment tool today
‘W’ stands for ‘weighted’ (different parts of alignment are weighted differently). Three-step process 1.) Construct pairwise alignments 2.) Build Guide Tree 3.) Progressive Alignment guided by the tree
48
Step 1: Pairwise Alignment
49
Step 2: Guide Tree Create Guide Tree using the similarity matrix
ClustalW uses the neighbor-joining method Guide tree roughly reflects evolutionary relations
51
Step 3: Progressive Alignment
Start by aligning the two most similar sequences Following the guide tree, add in the next sequences, aligning to the existing alignment Insert gaps as necessary
53
Multiple Alignment: History
1975 Sankoff Formulated multiple alignment problem and gave dynamic programming solution 1988 Carrillo-Lipman Branch and Bound approach for MSA 1990 Feng-Doolittle Progressive alignment 1994 Thompson-Higgins-Gibson-ClustalW Most popular multiple alignment program 1998 Morgenstern et al.-DIALIGN Segment-based multiple alignment 2000 Notredame-Higgins-Heringa-T-coffee Using the library of pairwise alignments 2004 MUSCLE
54
Practice of MSA
55
Choosing the Right Sequences
When building an alignment, it is your job to select the sequences Two main factors when selecting sequences: Number of sequences Nature of the sequences A reasonable number of sequences: 20 to 50 Ideal for most methods Small alignments are easy to display and analyze Types of sequences Well-selected sequences informative alignment
56
Some Guidelines for Choosing the Right Sequences
57
DNA or Proteins? DNA sequences are harder to align than proteins
DNA-comparison models are less sophisticated Most methods work for both DNA and proteins The results are less useful for DNA If your DNA is coding, work on the translated proteins If sequences are homologous . . . Along their entire length use progressive alignment methods (next slide) In terms of local similarity use motif-discovery methods (end of chapter)
58
Choosing Sequences That Are Different Enough
An alignment is useful if . . . The sequences are correctly aligned It can be used to produce trees, profiles, and structure predictions To obtain this result, the sequences must be Not too similar Not too different Sequences that are very similar . . . Are easy to align correctly Are not informative useless trees and profiles, bad predictions Sequences that are very different . . . Are difficult to align Are very informative good trees and profiles, good predictions
59
Steps Gathering right sequences
Compute MSA using servers/local programs Evaluate the results visually If it is hard to interpret Closer examination, remove trouble makers Redo and trim if needed
60
Gathering Sequences with BLAST
The most convenient way to select your sequences is to use a BLAST server Some BLAST servers are integrated with multiple-alignment methods: (protein only) srs.ebi.ac.uk (DNA/protein) npsa-pbil.ibcp.fr
61
Gathering Sequences with BLAST
Select some of the top sequences Evenly select some sequences down to the bottom The idea is to have many intermediate sequences
62
ExPASY
68
>sp|P20472|PRVA_HUMAN Parvalbumin alpha OS=Homo sapiens GN=PVALB PE=1 SV=2
MSMTDLLNAEDIKKAVGAFSATDSFDHKKFFQMVGLKKKSADDVKKVFHMLDKDKSGFIE EDELGFILKGFSPDARDLSAKETKMLMAAGDKDGDGKIGVDEFSTLVAES >sp|P80079|PRVA_FELCA Parvalbumin alpha OS=Felis catus GN=PVALB PE=1 SV=2 MSMTDLLGAEDIKKAVEAFTAVDSFDYKKFFQMVGLKKKSPDDIKKVFHILDKDKSGFIE EDELGFILKGFYPDARDLSVKETKMLMAAGDKDGDGKIDVDEFFSLVAKS >sp|P02627|PRVA_RANES Parvalbumin alpha OS=Rana esculenta PE=1 SV=1 PMTDLLAAGDISKAVSAFAAPESFNHKKFFELCGLKSKSKEIMQKVFHVLDQDQSGFIEK EELCLILKGFTPEGRSLSDKETTALLAAGDKDGDGKIGVDEFVTLVSES >sp|P02626|PRVA_AMPME Parvalbumin alpha OS=Amphiuma means PE=1 SV=1 SMTDVIPEADINKAIHAFKAGEAFDFKKFVHLLGLNKRSPADVTKAFHILDKDRSGYIEE EELQLILKGFSKEGRELTDKETKDLLIKGDKDGDGKIGVDEFTSLVAES >sp|P02619|PRVB_ESOLU Parvalbumin beta OS=Esox lucius PE=1 SV=1 SFAGLKDADVAAALAACSAADSFKHKEFFAKVGLASKSLDDVKKAFYVIDQDKSGFIEED ELKLFLQNFSPSARALTDAETKAFLADGDKDGDGMIGVDEFAAMIKA >sp|P43305|PRVU_CHICK Parvalbumin, thymic CPV3 OS=Gallus gallus PE=1 SV=2 MSLTDILSPSDIAAALRDCQAPDSFSPKKFFQISGMSKKSSSQLKEIFRILDNDQSGFIE EDELKYFLQRFECGARVLTASETKTFLAAADHDGDGKIGAEEFQEMVQS >sp|Q91482|PRVB1_SALSA Parvalbumin beta 1 OS=Salmo salar PE=1 SV=1 MACAHLCKEADIKTALEACKAADTFSFKTFFHTIGFASKSADDVKKAFKVIDQDASGFIE VEELKLFLQNFCPKARELTDAETKAFLKAGDADGDGMIGIDEFAVLVKQ >sp|P02620|PRVB_MERME Parvalbumin beta OS=Merluccius merluccius PE=1 SV=1 AFAGILADADITAALAACKAEGSFKHGEFFTKIGLKGKSAADIKKVFGIIDQDKSDFVEE DELKLFLQNFSAGARALTDAETATFLKAGDSDGDGKIGVEEFAAMVKG >sp|P02622|PRVB_GADCA Parvalbumin beta OS=Gadus callarias PE=1 SV=1 AFKGILSNADIKAAEAACFKEGSFDEDGFYAKVGLDAFSADELKKLFKIADEDKEGFIEE DELKLFLIAFAADLRALTDAETKAFLKAGDSDGDGKIGVDEFGALVDKWGAKG
69
If Know Protein Sequences
70
Aligning Your Sequences
Aligning sequences correctly is very difficult It’s hard to align protein sequences with less than 25% identity (70% identity for DNA) All methods are approximate Alignment methods use the progressive algorithm Compares the sequences two by two Builds a guide tree Aligns the sequences in the order indicated by the tree
71
Selecting a Method Many alternative methods exist for MSAs
Most of them use the progressive algorithm They all are approximate methods None is guaranteed to deliver the best alignments All existing methods have pros and cons ClustalW is the most popular (21,000 citations) T-Coffee and ProbCons are more accurate but slower MUSCLE is very fast, ideal for very large datasets
72
Selecting a Method (cont’d.)
It’s impossible to guess in advance which method will do best. Accuracy is merely an average estimation Methods are tested on reference datasets Their accuracy is the average accuracy obtained on the reference The most accurate method can always be outperformed by a less accurate method on a given dataset. An alternative: Use consensus methods such as MCOFFEE
73
ClustalW www.ebi.ac.uk/clustalw
pir.georgetown.edu/pirwww/search/multialn.shtml
78
Tcoffee TCOFFEE: www.tcoffee.org CORE: evaluate MSA
MCOFFEE: run many and combine EXPRESSO: with structural information
82
Running Many Methods at Once
MCOFFEE is a a meta-method It runs all the individual MSA methods It gathers all the produced MSAs It combines the MSAs into a single MSA MCOFFEE is more accurate than any individual method Its color output lets you estimate the reliability of your MSA MCOFFEE is available on
83
MCOFFEE Color Output Red and orange residues are probably well aligned
Yellow should be treated with caution Green and blue are probably incorrectly aligned
84
MCOFFEE
85
TCOFFEE
86
TCOFFEE Results
87
Interpreting Your MSA Don’t put blind trust in the output of the servers Specialists always edit their MSAs by hand You must always estimate the biological accuracy of your MSA Use the color code of Tcoffee Use the conservation patterns of ClustalW: ‘*’ Completely conserved position ‘:’ Highly conserved position ‘.’ Conserved position Use experimental knowledge of your proteins
88
Understanding Conserved Positions
89
Finding Information from Alignment
Conserved regions Insert/delete Phylogenetic Reconstruction Motif …
90
>sp|P02586|TNNC2_RABIT Troponin C, skeletal muscle OS=Oryctolagus cuniculus GN=TNNC2 PE=1 SV=2
MTDQQAEARSYLSEEMIAEFKAAFDMFDADGGGDISVKELGTVMRMLGQTPTKEELDAII EEVDEDGSGTIDFEEFLVMMVRQMKEDAKGKSEEELAECFRIFDRNADGYIDAEELAEIF RASGEHVTDEEIESLMKDGDKNNDGRIDFDEFLKMMEGVQ >sp|P20472|PRVA_HUMAN Parvalbumin alpha OS=Homo sapiens GN=PVALB PE=1 SV=2 MSMTDLLNAEDIKKAVGAFSATDSFDHKKFFQMVGLKKKSADDVKKVFHMLDKDKSGFIE EDELGFILKGFSPDARDLSAKETKMLMAAGDKDGDGKIGVDEFSTLVAES >sp|P80079|PRVA_FELCA Parvalbumin alpha OS=Felis catus GN=PVALB PE=1 SV=2 MSMTDLLGAEDIKKAVEAFTAVDSFDYKKFFQMVGLKKKSPDDIKKVFHILDKDKSGFIE EDELGFILKGFYPDARDLSVKETKMLMAAGDKDGDGKIDVDEFFSLVAKS >sp|P02627|PRVA_RANES Parvalbumin alpha OS=Rana esculenta PE=1 SV=1 PMTDLLAAGDISKAVSAFAAPESFNHKKFFELCGLKSKSKEIMQKVFHVLDQDQSGFIEK EELCLILKGFTPEGRSLSDKETTALLAAGDKDGDGKIGVDEFVTLVSES >sp|P02626|PRVA_AMPME Parvalbumin alpha OS=Amphiuma means PE=1 SV=1 SMTDVIPEADINKAIHAFKAGEAFDFKKFVHLLGLNKRSPADVTKAFHILDKDRSGYIEE EELQLILKGFSKEGRELTDKETKDLLIKGDKDGDGKIGVDEFTSLVAES >sp|P02619|PRVB_ESOLU Parvalbumin beta OS=Esox lucius PE=1 SV=1 SFAGLKDADVAAALAACSAADSFKHKEFFAKVGLASKSLDDVKKAFYVIDQDKSGFIEED ELKLFLQNFSPSARALTDAETKAFLADGDKDGDGMIGVDEFAAMIKA >sp|P43305|PRVU_CHICK Parvalbumin, thymic CPV3 OS=Gallus gallus PE=1 SV=2 MSLTDILSPSDIAAALRDCQAPDSFSPKKFFQISGMSKKSSSQLKEIFRILDNDQSGFIE EDELKYFLQRFECGARVLTASETKTFLAAADHDGDGKIGAEEFQEMVQS >sp|Q91482|PRVB1_SALSA Parvalbumin beta 1 OS=Salmo salar PE=1 SV=1 MACAHLCKEADIKTALEACKAADTFSFKTFFHTIGFASKSADDVKKAFKVIDQDASGFIE VEELKLFLQNFCPKARELTDAETKAFLKAGDADGDGMIGIDEFAVLVKQ >sp|P02620|PRVB_MERME Parvalbumin beta OS=Merluccius merluccius PE=1 SV=1 AFAGILADADITAALAACKAEGSFKHGEFFTKIGLKGKSAADIKKVFGIIDQDKSDFVEE DELKLFLQNFSAGARALTDAETATFLKAGDSDGDGKIGVEEFAAMVKG >sp|P02622|PRVB_GADCA Parvalbumin beta OS=Gadus callarias PE=1 SV=1 AFKGILSNADIKAAEAACFKEGSFDEDGFYAKVGLDAFSADELKKLFKIADEDKEGFIEE DELKLFLIAFAADLRALTDAETKAFLKAGDSDGDGKIGVDEFGALVDKWGAKG
92
When Sequences Are Hard to Align
Most MSA programs assume your sequences are related along their whole length When this assumption is not true, the progressive approach will not work The only alternative is to compare multiple sequences locally
93
Local Multiple-Comparison Methods
Gibbs Sampler Will make a local multiple alignment Will ignore unrelated segments of your sequences Ideal for finding DNA patterns such as promoters Motif discovery methods Will look for motifs conserved in your sequences The sequences do not need to be aligned The most popular motif-discovery methods: TEIRESIAS, MEME, SMILE, PRATT
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.