Multiple Alignment - DTU

36
Multiple Alignment Anders Gorm Pedersen / Henrik Nielsen

Transcript of Multiple Alignment - DTU

Page 1: Multiple Alignment - DTU

Multiple Alignment

Anders Gorm Pedersen / Henrik Nielsen

Page 2: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Outline

•Refresher: pairwise alignments

•Multiple alignments: what use are they?

•Multiple alignment by dynamic programming

–Why it is not done

•Multiple alignment by progressive cluster and profile alignment

–How it is done

•Multiple alignment programs, features and comparisons

•Take-home messages

Page 3: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

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 4: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Refresher: pairwise alignments

• Alignment score is calculated from substitution matrix

• Identities on diagonal have high scores

• Similar amino acids have relatively high scores (positive or zero)

• Dissimilar amino acids have low (negative) scores

• Gaps penalized by gap-opening + 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 5

R -2 7

N -1 -1 7

D -2 -2 2 8

C -1 -4 -2 -4 13

Q -1 1 0 0 -3 7

E -1 0 0 2 -3 2 6

G 0 -3 0 -1 -3 -2 -3 8.

.

.

A R N D C Q E G ...

Page 5: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

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 6: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Refresher: pairwise alignments

• Solution:

dynamic programming

• Essentially:

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

• Far fewer computations

• Optimal alignment guaranteed to be found

T C G C A

T

C

C

A

x

Page 7: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Refresher: pairwise alignments

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

Multiple alignment

A/A 2.15%

A/C 0.03%

A/D 0.07%

...

Calculate

substitution

frequencies

Score(A/C) = logFreq(A/C),observed

Freq(A/C),expected

Convert

to scores

Page 8: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

• “Optimal alignment” means “having the highest possible score, given substitution matrix and set of gap penalties”.

• This is NOT necessarily the biologically most meaningful alignment.

• Specifically, the underlying assumptions are often wrong: substitutions are not equally frequent at all positions, affine gap penalties do not model insertion/deletion well, etc.

• Pairwise alignment programs always produce an alignment - even when it does not make sense to align sequences.

Refresher: pairwise alignments

Page 9: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Refresher: Database searching

• Using pairwise alignments to search databases for similar sequences

Query sequence

Database

Page 10: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Refresher: Database searching withPSI-BLAST

• Using the hits from the first search to build a profile (position-specific scoring matrix) which is more sensitive and can retrieve more hits.

Query sequence

Database

Query profile

Database

Page 11: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Refresher: Database searching withPSI-BLAST

• The profile (position-specific scoring matrix) is more sensitive than a BLOSUM matrix, because position-specific information can be taken into account.

– Use profile data set to estimate AA pair frequencies per position.

– We need to apply the pseudo-count approach to account for AAs we do not observe.

11

Page 12: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Multiple alignment

Page 13: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Multiple alignments: what use are they?

• Starting point for studies of molecular evolution

Page 14: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Multiple alignments: what use are they?• Characterization of protein families:

– Identification of conserved (functionally important) sequence regions

– Construction of profiles for further database searching

– Prediction of structural features (disulfide bonds, amphipathic alpha-helices, surface loops, etc.)

Page 15: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

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

...A...

...A...

...S...

...T...

One column

from alignment

AA: 4, AS: 1, AT:0

AS: 1, AT: 0

ST: 1

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

Optionally: 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

Page 16: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Scoring a multiple alignment:what about gaps?

This is one gap

(of two positions):

16

AT--TG

ATCGTG

ATTGTG

ATTGTG

ATTGTT

ATATTT

This is also one gap

(of two positions):

AGC--GT

AGC--GT

ATC--GT

ATC--GT

AGC--AT

AGCTGGT

How many gaps are here?

AGC--GT

AGC--GT

ATC-AGT

ATC-AGT

AGC-AAT

AGCTGGT

One deletion One insertion At least two events…

=> In practice, it is not straightforward to define an alignment score for multiple alignments

Page 17: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Multiple alignment: dynamic programming is only feasible for very small data sets

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

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

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

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

• Never used in practice

Dynamic programming “matrix” (cube) for 3 sequences

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

Page 18: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Multiple alignment: dynamic programming may not even be desirable

• Even if dynamic programming for multiple alignment were possible, it might not be the biologically best solution.

• If all the sequences are treated as independent dimensions, it implies that no sequence pair is more similar than any other sequence pair:

• But in reality, sequences are related in a tree-like fashion:

18

S1 S3 S4 S2

S1 S3 S4 S2

Page 19: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Multiple alignment: an approximate solution

Progressive alignment (a.k.a. cluster-and-profile alignment):

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

2. Align the most similar pair of sequences

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

Page 20: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Progressive alignment: details

1) Perform all pairwise alignments, note pairwise

distances (construct “distance matrix”)

2) Construct pseudo-phylogenetic tree from pairwise distances

S1

S2

S3

S4 6 pairwise

alignments

S1 S2 S3 S4

S1

S2 3

S3 1 3

S4 3 2 3

S1 S3 S4 S2

S1 S2 S3 S4

S1

S2 3

S3 1 3

S4 3 2 3

“Guide tree”

Page 21: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

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 (profiles) using dynamic programming - preserve gaps

S1 S3 S4 S2

S1

S3

S2

S4

S1

S3

S2

S4

New gap to optimize alignment

of (S2,S4) with (S1,S3)

Page 22: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Scoring profile alignments

...A...

...S...

...S...

...T...

+

One column

from alignment

AS: 1, AT:0

SS: 4, ST:1

Score:

= 1.5

The naïve way: Compare each residue in one profile to all residues in second profile. Score is average of all comparisons.

- but we can do better than this!

Page 23: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Scoring profile alignments

In practice: Use each profile as an estimate of a position-specific scoring matrix. This is combined with the original scoring matrix using pseudocounts.

Profile-to-sequence or profile-to-profile alignments are potentially more biologically relevant than sequence-to-sequence alignments, because position-specific patterns of substitution can be taken into account.

Page 24: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Additional heuristics for quality

• Sequence weighting (most programs):

– scores from similar groups of sequences are down-weighted

• Variable substitution matrices (ClustalW/X):

– during alignment ClustalW/X uses different substitution matrices depending on how similar the sequences/profiles are

• Context-dependent gap penalties (ClustalW/X)

– e.g. higher gap penalties in hydrophobic stretches

• Reiterate alignment (MUSCLE, MAFFT)

– calculate a new guide tree based on first multiple alignment, and use that for the next round of alignment

• Consistency (T-Coffee, ProbCons)

– use all the pairwise alignments to compute the match/mismatch scores in the multiple alignment (slow)

Page 25: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Additional heuristics for speed

• Use fast comparison instead of full dynamic programming when calculating the guide tree (ClustalW/X, MUSCLE, MAFFT, …)

• Reduce dynamic programming time in profile alignments by identifying regions of high similarity with a Fast Fourier Transform (MAFFT)

• Build an approximate guide tree without making all pairwise comparisons (ClustalΩ)

Page 26: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Other multiple alignment programs

pileup

multalign

multal

saga

hmmt

MUSCLE

ProbCons

DIALIGN

SBpima

MLpima

T-Coffee

mafft

poa

prank

...

Page 27: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Quantifying the Performance of Protein Sequence Multiple Alignment Programs

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

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

• Option 1: Compare performance to benchmark data sets for which 3D structures and structural alignments are available (BALiBASE, PREfab, SABmark, SMART).

– Advantage: real, biological data with real characteristics

– Problem: we only have good benchmark data for core regions, no good knowledge of how gappy regions really look

• Option 2: Construct synthetic alignments by letting a computer simulate evolution of a sequence along a phylogenetic tree

– Advantage: we know the real alignment including where the gaps are

– Problem: Simulated data may miss important aspects of real biological data

Page 28: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Performance on BALiBASE benchmark

Dialign

T-Coffee

ClustalW

Poa

Page 29: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Performance on simulated data, few gaps

Page 30: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Performance on simulated data, many gaps

Page 31: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Page 32: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

So which method should I choose?

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

• No single method performs best under all conditions

• Slower is not necessarily better — although ClustalW/X is the best known program, it is not among the best or fastest.

• Clustal Ω looks quite good with very large alignments

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

• T-Coffee can run several methods for you and report degree of agreement

Page 33: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Special purpose alignment program

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

• Codon-codon boundaries maintained

Page 34: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

RevTrans

CTA

CGAGCC

L

RA

---CTA

CGAGCC

-L

RA

Virtual Ribosome

MAFFT

mapping

Page 35: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Future perspectives

• Alignment inferred along with rest of analysis (e.g. phylogeny)

• Bayesian techniques, conclusions based on probability distribution over possible alignments.

Page 36: Multiple Alignment - DTU

DTU Bioinformatics, Technical University of Denmark

Take-home messages

• Unlike pairwise alignment, the multiple alignment problem cannot be solved exactly

• Nevertheless, multiple alignments are often more biologically correct than pairwise alignments

• No single program performs best under all conditions, but MAFFT seems like a good compromise in most situations