Multiple Alignment

29
CENTER FOR BIOLOGICAL SEQUENCE ANALYSIS CENTER FOR BIOLOGICAL SEQUENCE ANALYSIS Multiple Alignment Anders Gorm Pedersen Anders Gorm Pedersen Molecular Evolution Group Molecular Evolution Group Center for Biological Sequence Analysis Center for Biological Sequence Analysis [email protected] [email protected]

description

Multiple Alignment. Anders Gorm Pedersen Molecular Evolution Group Center for Biological Sequence Analysis [email protected]. CENTER FOR BIOLOGICAL SEQUENCE ANALYSIS. CENTER FOR BIOLOGICAL SEQUENCE ANALYSIS. Refresher: pairwise alignments. 43.2% identity; Global alignment score: 374 - PowerPoint PPT Presentation

Transcript of Multiple Alignment

Page 1: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Multiple Alignment

Anders Gorm PedersenAnders Gorm Pedersen

Molecular Evolution GroupMolecular Evolution Group

Center for Biological Sequence AnalysisCenter for Biological Sequence Analysis

[email protected]@cbs.dtu.dk

Page 2: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Refresher: pairwise alignments

43.2% identity; Global alignment score: 374

10 20 30 40 50 alpha V-LSPADKTNVKAAWGKVGAHAGEYGAEALERMFLSFPTTKTYFPHF-DLS-----HGSA : :.: .:. : : :::: .. : :.::: :... .: :. .: : ::: :. beta VHLTPEEKSAVTALWGKV--NVDEVGGEALGRLLVVYPWTQRFFESFGDLSTPDAVMGNP 10 20 30 40 50

60 70 80 90 100 110 alpha QVKGHGKKVADALTNAVAHVDDMPNALSALSDLHAHKLRVDPVNFKLLSHCLLVTLAAHL .::.::::: :.....::.:.. .....::.:: ::.::: ::.::.. :. .:: :.beta KVKAHGKKVLGAFSDGLAHLDNLKGTFATLSELHCDKLHVDPENFRLLGNVLVCVLAHHF 60 70 80 90 100 110

120 130 140 alpha PAEFTPAVHASLDKFLASVSTVLTSKYR :::: :.:. .: .:.:...:. ::.beta GKEFTPPVQAAYQKVVAGVANALAHKYH 120 130 140

Page 3: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Refresher: pairwise alignments

• Alignment score is Alignment score is calculated from calculated from substitution matrixsubstitution matrix

• Identities on diagonal Identities on diagonal have high scoreshave high scores

• Similar amino acids have Similar amino acids have high scoreshigh scores

• Dissimilar amino acids Dissimilar amino acids have low (negative) scoreshave low (negative) scores

• Gaps penalized by gap-Gaps penalized by gap-opening + gap elongationopening + gap elongation K L A A S V I L S D A L

K L A A - - - - S D A L

-10 + 3 x (-1)=-13

A 5R -2 7N -1 -1 7D -2 -2 2 8C -1 -4 -2 -4 13Q -1 1 0 0 -3 7E -1 0 0 2 -3 2 6G 0 -3 0 -1 -3 -2 -3 8...

A R N D C Q E G ...

Page 4: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Refresher: pairwise alignments

The number of possible pairwise alignments increases explosively with the length of the sequences:

Two protein sequences of length 100 amino acids can be aligned in approximately 1060 different ways

1060 bottles of beer would fill up our entire galaxy

Page 5: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Refresher: pairwise alignments

• Solution: Solution:

dynamic programmingdynamic programming

• Essentially:Essentially:

the best path through any the best path through any grid point in the grid point in the alignment matrix must alignment matrix must originate from one of originate from one of three previous pointsthree previous points

• Far fewer computationsFar fewer computations

• Best alignment guaranteed Best alignment guaranteed to be foundto be found

T C G C A

T

C

C

A

x

Page 6: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Refresher: pairwise alignments

• Most used substitution matrices are themselves Most used substitution matrices are themselves derived empirically from simple multiple alignmentsderived empirically from simple multiple alignments

Multiple alignment

A/A 2.15%A/C 0.03%A/D 0.07%...

Calculatesubstitutionfrequencies

Score(A/C) = log Freq(A/C),observedFreq(A/C),expected

Convertto scores

Page 7: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Database searching

• Using pairwise alignments to search databases for Using pairwise alignments to search databases for similar sequencessimilar sequences

Query sequence

Database

Page 8: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Multiple alignment

Page 9: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Multiple alignments: what use are they?

• Starting point for studies of molecular Starting point for studies of molecular evolutionevolution

Page 10: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Multiple alignments: what use are they?

• Characterization of protein families:Characterization of protein families:– Identification of conserved (functionally important) Identification of conserved (functionally important)

sequence regionssequence regions– Construction of profiles for further database searchingConstruction of profiles for further database searching– Prediction of structural features (disulfide bonds, Prediction of structural features (disulfide bonds,

amphipathic alpha-helices, surface loops, etc.)amphipathic alpha-helices, surface loops, etc.)

Page 11: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Scoring a multiple alignment:the “sum of pairs” score

...A...

...A...

...S...

...T...

One column from alignment

AA: 4, AS: 1, AT:0AS: 1, AT: 0ST: 1

SP-score: 4+1+0+1+0+1 = 7

Weighted sum of pairs: each SP-score is multiplied by a weight reflecting the evolutionary distance (avoids undue influence on score by sets of very similar sequences)

=> In theory, it is possible to define an alignment score for multiple alignments (there are several alternative scoring systems)

Page 12: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Multiple alignment: dynamic programming is only feasible for

very small data sets

• In theory, optimal multiple In theory, optimal multiple alignment can be found by dynamic alignment can be found by dynamic programming using a matrix with programming using a matrix with more dimensions (one dimension more dimensions (one dimension per sequence)per sequence)

• BUT even with dynamic programming BUT even with dynamic programming finding the optimal alignment finding the optimal alignment very quickly becomes impossible very quickly becomes impossible due to the astronomical number of due to the astronomical number of computationscomputations

• Full dynamic programming only Full dynamic programming only possible for up to about 4-5 possible for up to about 4-5 protein sequences of average protein sequences of average length length

• Even with heuristics, not Even with heuristics, not feasible for more than 7-8 feasible for more than 7-8 protein sequencesprotein sequences

• Never used in practiceNever used in practice

Dynamic programming matrix for 3 sequences

For 3 sequences, optimal path must comefrom one of 7 previous points

Page 13: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Multiple alignment: an approximate solution

• Progressive alignment (ClustalX and other Progressive alignment (ClustalX and other programs):programs):

1.1. Perform all Perform all pairwisepairwise alignments; keep track of sequence alignments; keep track of sequence similarities between all pairs of sequences (construct similarities between all pairs of sequences (construct “distance matrix”)“distance matrix”)

2.2. Align the most similar pair of sequencesAlign the most similar pair of sequences

3.3. Progressively add sequences to the (constantly growing) Progressively add sequences to the (constantly growing) multiple alignment in order of decreasing similaritymultiple alignment in order of decreasing similarity..

Page 14: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Progressive alignment: details

1) Perform all pairwise alignments, note pairwise distances (construct “distance matrix”)

2) Construct pseudo-phylogenetic tree from pairwise distances

S1S2S3S4 6 pairwise

alignments

S1 S2 S3 S4S1S2 3S3 1 3S4 3 2 3

S1 S3 S4 S2

S1 S2 S3 S4S1S2 3S3 1 3S4 3 2 3

“Guide tree”

Page 15: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Progressive alignment: details

3) Use tree as guide for multiple alignment:a) Align most similar pair of sequences using dynamic programming

b) Align next most similar pair

c) Align alignments using dynamic programming - preserve gaps

S1 S3 S4 S2

S1

S3

S2

S4

S1

S3

S2

S4New gap to optimize alignmentof (S2,S4) with (S1,S3)

Page 16: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Scoring profile alignments

...A...

...S...

...S...

...T...

+

One column from alignment

AS: 1, AT:0

SS: 4, ST:1

Score: 1+0+4+1 = 1.54

Compare each residue in one profile to all residues in second profile. Score is average of all comparisons.

Page 17: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Additional ClustalX heuristics

• Sequence weighting:Sequence weighting:– scores from similar groups of sequences are down-weightedscores from similar groups of sequences are down-weighted

• Variable substitution matrices:Variable substitution matrices:– during alignment ClustalX uses different substitution during alignment ClustalX uses different substitution

matrices depending on how similar the sequences/profiles matrices depending on how similar the sequences/profiles areare

• Variable gap penalties:Variable gap penalties: gap penalties depend on substitution matrixgap penalties depend on substitution matrix gap penalties depend on similarity of sequencesgap penalties depend on similarity of sequences reduced gap penalties at existing gapsreduced gap penalties at existing gaps increased gap penalties CLOSE to existing gapsincreased gap penalties CLOSE to existing gaps reduced gap penalties in hydrophilic stretches (presumed reduced gap penalties in hydrophilic stretches (presumed

surface loop)surface loop) residue-specific gap penaltiesresidue-specific gap penalties and more...and more...

Page 18: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Global methods (e.g., ClustalX) get into trouble when data is not

globally related!!!

Page 19: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Global methods (e.g., ClustalX) get into trouble when data is not

globally related!!!

Clustalx

What you want

Page 20: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Global methods (e.g., ClustalX) get into trouble when data is not

globally related!!!

Clustalx

Possible solutions:(1) Cut out conserved regions of interest and THEN align them (2) Use method that deals with local similarity (e.g., mafft)

What you want What you might get

Page 21: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Other multiple alignment programs

pileup

multalign

multal

saga

hmmt

MUSCLE

ProbCons

DIALIGN

SBpima

MLpima

T-Coffee

mafft

poa

prank

...

Page 22: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Quantifying the Performance of Protein Sequence Multiple Alignment

Programs

• Compare to alignment that is known (or strongly believed) to Compare to alignment that is known (or strongly believed) to be correctbe correct

• Quantify by counting e.g. fraction of correctly paired Quantify by counting e.g. fraction of correctly paired residuesresidues

• Option 1: Compare performance to benchmark data sets for Option 1: Compare performance to benchmark data sets for which 3D structures and structural alignments are available which 3D structures and structural alignments are available (BALiBASE, PREfab, SABmark, SMART).(BALiBASE, PREfab, SABmark, SMART).– Advantage: real, biological data with real characteristicsAdvantage: real, biological data with real characteristics– Problem: we only have good benchmark data for core regions, no Problem: we only have good benchmark data for core regions, no

good knowledge of how gappy regions really lookgood knowledge of how gappy regions really look

• Option 2: Construct synthetic alignments by letting a Option 2: Construct synthetic alignments by letting a computer simulate evolution of a sequence along a computer simulate evolution of a sequence along a phylogenetic treephylogenetic tree– Advantage: we know the real alignment including where the gaps areAdvantage: we know the real alignment including where the gaps are– Problem: Simulated data may miss important aspects of real Problem: Simulated data may miss important aspects of real

biological databiological data

Page 23: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Performance on BALiBASE benchmark

Dialign

T-Coffee

ClustalW

Poa

Page 24: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Performance on BALiBASE benchmark

Page 25: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Performance on simulated data, few gaps

Page 26: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Performance on simulated data, many gaps

Page 27: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

So which method should I choose?

• Performance depends on way of measuring and on Performance depends on way of measuring and on nature of data setnature of data set

• No single method performs best under all conditions No single method performs best under all conditions (although mafft and ProbCons look quite good)(although mafft and ProbCons look quite good)

• To be on the safe side, you ought to check that To be on the safe side, you ought to check that results are robust to alignment uncertainty (try a results are robust to alignment uncertainty (try a number of methods, check conclusions on each number of methods, check conclusions on each alignment)alignment)

• Future perspectives: Bayesian techniques, alignment Future perspectives: Bayesian techniques, alignment inferred along with rest of analysis, conclusions inferred along with rest of analysis, conclusions based on probability distribution over possible based on probability distribution over possible alignments.alignments.

Page 28: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Special purpose alignment programs

• RevTrans: alignment of coding RevTrans: alignment of coding DNA based on information at DNA based on information at protein levelprotein level

• Codon-codon boundaries Codon-codon boundaries maintainedmaintained

Page 29: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

• MaxAlign: remove subset MaxAlign: remove subset of sequences to get of sequences to get fewer gapped columnsfewer gapped columns

• Detect non-homologous Detect non-homologous or mis-aligned or mis-aligned sequencessequences

Special purpose alignment programs