Multiple Alignment

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

description

Multiple Alignment. Anders Gorm Pedersen Molecular Evolution Group Center for Biological Sequence Analysis [email protected]. Refresher: pairwise alignments. 43.2% identity; Global alignment score: 374 10 20 30 40 50 - 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

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

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

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) have low (negative) scoresscores

• 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

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

Refresher: pairwise alignments

• Solution: Solution:

dynamic programmingdynamic programming

• Essentially:Essentially:

the best path through the best path through any grid point in the any 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 Best alignment guaranteed to be foundguaranteed to 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

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) = logFreq(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

Multiple alignment

Page 8: Multiple Alignment

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 Starting point for studies of molecular evolutionmolecular evolution

Page 9: Multiple Alignment

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) sequence Identification of conserved (functionally important) sequence

regionsregions– Prediction of structural features (disulfide bonds, amphipathic Prediction of structural features (disulfide bonds, amphipathic

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

Page 10: Multiple Alignment

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

Score: 4+1+0+1+0+1 = 7

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

Page 11: Multiple Alignment

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 BUT even with dynamic programming finding the optimal programming finding the optimal alignment very quickly becomes alignment very quickly becomes impossible due to the astronomical impossible due to the astronomical number of computationsnumber of computations

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

• Even with heuristics, not feasible for Even with heuristics, not feasible for more than 7-8 protein sequencesmore than 7-8 protein 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 12: Multiple Alignment

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 alignments; keep track of sequence similarities between all pairs of sequences sequence similarities between all pairs of sequences (construct “distance matrix”)(construct “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 Progressively add sequences to the (constantly growing) multiple alignment in order of decreasing growing) multiple alignment in order of decreasing similaritysimilarity..

Page 13: Multiple Alignment

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 pairwisealignments

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 14: Multiple Alignment

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 15: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Aligning profiles

S1

S3

S2

S4

+

S1

S3

S2

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

Aligning alignments: each alignment treated as a single sequence (a profile)

Full dynamic programmingon two profiles

Page 16: Multiple Alignment

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

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 matrices during alignment ClustalX uses different substitution matrices

depending on how similar the sequences/profiles aredepending on how similar the sequences/profiles are

• 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

Other multiple alignment programs

ClustalW / ClustalX

pileup

multalign

multal

saga

hmmt

DIALIGN

SBpima

MLpima

T-Coffee

...

Page 19: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Other multiple alignment programs

ClustalW / ClustalX

pileup

multalign

multal

saga

hmmt

DIALIGN

SBpima

MLpima

T-Coffee

...

Page 20: Multiple Alignment

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 21: Multiple Alignment

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

Page 22: Multiple Alignment

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. DIALIGN)

Page 23: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS Brief Introduction to

the Theory of Evolution

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 24: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Classification: Linnaeus

Carl LinnaeusCarl Linnaeus1707-17781707-1778

Page 25: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Classification: Linnaeus

• Hierarchical systemHierarchical system

– KingdomKingdom(Rige)(Rige)– PhylumPhylum (Række)(Række)– ClassClass (Klasse)(Klasse)– OrderOrder (Orden)(Orden)– FamilyFamily (Familie)(Familie)– GenusGenus (Slægt)(Slægt)– SpeciesSpecies (Art)(Art)

Page 26: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Classification depicted as a tree

Page 27: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Classification depicted as a tree

SpeciesSpecies GenusGenus FamilyFamily OrderOrder ClassClass

Page 28: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Theory of evolution

Charles DarwinCharles Darwin1809-18821809-1882

Page 29: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Phylogenetic basis of systematics

• LinnaeusLinnaeus: : Ordering principle is God.Ordering principle is God.

• DarwinDarwin: : Ordering principle is shared Ordering principle is shared descent from common ancestors.descent from common ancestors.

• Today, systematics is explicitly Today, systematics is explicitly based on phylogeny.based on phylogeny.

Page 30: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Darwin’s four postulates

I.I. More young are produced each generation than can More young are produced each generation than can survive to reproduce.survive to reproduce.

II.II. Individuals in a population vary in their characteristics.Individuals in a population vary in their characteristics.III.III. Some differences among individuals are based on genetic Some differences among individuals are based on genetic

differences.differences.IV.IV. Individuals with favorable characteristics have higher Individuals with favorable characteristics have higher

rates of survival and reproduction.rates of survival and reproduction.

Evolution by means of natural selectionEvolution by means of natural selection Presence of ”design-like” features in organisms:Presence of ”design-like” features in organisms:

quite often features are there “for a reason”quite often features are there “for a reason”

Page 31: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Theory of evolution as the basis of biological understanding

”Nothing in biology makes sense, except in the light of evolution.

Without that light it becomes a pile of sundry facts - some of them interesting or curious but making no meaningful picture as a whole”

T. Dobzhansky

Page 32: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS Phylogenetic Reconstruction:

Distance Matrix Methods

Anders Gorm PedersenAnders Gorm Pedersen

Molecular Evolution GroupMolecular Evolution Group

Center for Biological Sequence AnalysisCenter for Biological Sequence Analysis

Technical University of DenmarkTechnical University of Denmark

[email protected]@cbs.dtu.dk

Page 33: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Trees: terminology

Page 34: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Trees: terminology

Page 35: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Trees: representations

Three different representations of the same tree

Page 36: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Trees: rooted vs. unrooted

• A rooted tree has a single node (the root) that represents a point in time that is earlier than any other node in the tree.

• A rooted tree has directionality (nodes can be ordered in terms of “earlier” or “later”).

• In the rooted tree, distance between two nodes is represented along the time-axis only (the second axis just helps spread out the leafs)

Early Late

Page 37: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Trees: rooted vs. unrooted

• A rooted tree has a single node (the root) that represents a point in time that is earlier than any other node in the tree.

• A rooted tree has directionality (nodes can be ordered in terms of “earlier” or “later”).

• In the rooted tree, distance between two nodes is represented along the time-axis only (the second axis just helps spread out the leafs)

Early Late

Page 38: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Trees: rooted vs. unrooted

• A rooted tree has a single node (the root) that represents a point in time that is earlier than any other node in the tree.

• A rooted tree has directionality (nodes can be ordered in terms of “earlier” or “later”).

• In the rooted tree, distance between two nodes is represented along the time-axis only (the second axis just helps spread out the leafs)

Early Late

Page 39: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Trees: rooted vs. unrooted

• In unrooted trees there is no directionality: we do not know In unrooted trees there is no directionality: we do not know if a node is earlier or later than another nodeif a node is earlier or later than another node

• Distance along branches directly represents node distanceDistance along branches directly represents node distance

Page 40: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Trees: rooted vs. unrooted

• In unrooted trees there is no directionality: we do not know In unrooted trees there is no directionality: we do not know if a node is earlier or later than another nodeif a node is earlier or later than another node

• Distance along branches directly represents node distanceDistance along branches directly represents node distance

Page 41: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Reconstructing a tree using non-contemporaneous data

Page 42: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Reconstructing a tree using present-day data

Page 43: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Data: molecular phylogeny

• DNA sequencesDNA sequences– genomic DNAgenomic DNA– mitochondrial DNAmitochondrial DNA– chloroplast DNAchloroplast DNA

• Protein sequencesProtein sequences

• Restriction site polymorphismsRestriction site polymorphisms

• DNA/DNA hybridizationDNA/DNA hybridization

• Immunological cross-reactionImmunological cross-reaction

Page 44: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Morphology vs. molecular data

African white-backed vulture(old world vulture)

Andean condor (new world vulture)

New and old world vultures seem to be closely related based on morphology.

Molecular data indicates that old world vultures are related to birds of prey (falcons, hawks, etc.) while new world vultures are more closely related to storks

Similar features presumably the result of convergent evolution

Page 45: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Molecular data: single-celled organisms

Molecular data useful for analyzing single-celled organisms (which have only few prominent morphological features).

Page 46: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Distance Matrix Methods

1.1. Construct multiple Construct multiple alignment of sequencesalignment of sequences

2.2. Construct table listing all Construct table listing all pairwise differences pairwise differences (distance matrix)(distance matrix)

3.3. Construct tree from Construct tree from pairwise distancespairwise distances

Gorilla : ACGTCGTAHuman : ACGTTCCTChimpanzee: ACGTTTCG

GoGo HuHu ChCh

GoGo -- 44 44

HuHu -- 22

ChCh --

Go

Hu

Ch

2

11

1

Page 47: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Finding Optimal Branch Lengths

SS11 SS22 SS33 SS44

SS11 -- DD1212 DD1313 DD1414

SS22 -- DD2323 DD2424

SS33 -- DD3434

SS44 --Observed distance

S1

S3

S2

S4

a

b

c

d e

Distance along tree

D12 d12 = a + b + cD13 d13 = a + dD14 d14 = a + b + eD23 d23 = d + b + cD24 d24 = c + eD34 d34 = d + b + e

Goal:

Page 48: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Optimal Branch Lengths: Least Squares

• Fit between given tree Fit between given tree and observed distances and observed distances can be expressed as “sum can be expressed as “sum of squared differences”:of squared differences”:

Q = Q = (D(Dijij - d - dijij))22

• Find branch lengths that Find branch lengths that minimize Q - this is the minimize Q - this is the optimal set of branch optimal set of branch lengths for this tree.lengths for this tree.

S1

S3

S2

S4

a

b

c

d e

Distance along tree

D12 d12 = a + b + cD13 d13 = a + dD14 d14 = a + b + eD23 d23 = d + b + cD24 d24 = c + eD34 d34 = d + b + e

Goal:

j>i

Page 49: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Least Squares Optimality Criterion

• Search through all (or many) tree topologiesSearch through all (or many) tree topologies

• For each investigated tree, find best branch For each investigated tree, find best branch lengths using least squares criterionlengths using least squares criterion

• Among all investigated trees, the best tree is the Among all investigated trees, the best tree is the one with the smallest sum of squared errors. one with the smallest sum of squared errors.

Page 50: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Exhaustive search impossible for large data sets

No. No. taxataxa

No. treesNo. trees

33 11

44 33

55 1515

66 105105

77 945945

88 10,39510,395

99 135,135135,135

1010 2,027,0252,027,025

1111 34,459,42534,459,425

1212 654,729,075654,729,075

1313 13,749,310,57513,749,310,575

1414 316,234,143,225316,234,143,225

1515 7,905,853,580,6257,905,853,580,625

Page 51: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Heuristic search

1.1. Construct initial tree; determine sum of squaresConstruct initial tree; determine sum of squares

2.2. Construct set of “neighboring trees” by making small Construct set of “neighboring trees” by making small rearrangements of initial tree; determine sum of squares for rearrangements of initial tree; determine sum of squares for each neighboreach neighbor

3.3. If any of the neighboring trees are better than the initial tree, If any of the neighboring trees are better than the initial tree, then select it/them and use as starting point for new round of then select it/them and use as starting point for new round of rearrangements. (Possibly several neighbors are equally good)rearrangements. (Possibly several neighbors are equally good)

4.4. Repeat steps 2+3 until you have found a tree that is better Repeat steps 2+3 until you have found a tree that is better than all of its neighbors.than all of its neighbors.

5.5. This tree is a “local optimum” (not necessarily a global This tree is a “local optimum” (not necessarily a global optimum!) optimum!)

Page 52: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Clustering Algorithms

• Starting point: Distance matrixStarting point: Distance matrix

• Cluster least different pair of sequences:Cluster least different pair of sequences:– Tree: pair connected to common ancestral node, compute branch Tree: pair connected to common ancestral node, compute branch

lengths from ancestral node to both descendantslengths from ancestral node to both descendants

– Distance matrix: combine two entries into one. Compute new Distance matrix: combine two entries into one. Compute new

distance matrix, by finding distance from new node to all other distance matrix, by finding distance from new node to all other nodesnodes

• Repeat until all nodes are linkedRepeat until all nodes are linked

• Results in only one tree, there is no measure of tree-Results in only one tree, there is no measure of tree-goodness.goodness.

Page 53: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Neighbor Joining Algorithm

• For each tip compute For each tip compute uuii = = jj DDijij/(n-2)/(n-2)

(this is essentially the average distance to all other tips, except the (this is essentially the average distance to all other tips, except the denominator is n-2 instead of n)denominator is n-2 instead of n)

• Find the pair of tips, i and j, where Find the pair of tips, i and j, where DDijij-u-uii-u-ujj is smallest is smallest

• Connect the tips i and j, forming a new ancestral node. The branch Connect the tips i and j, forming a new ancestral node. The branch lengths from the ancestral node to i and j are:lengths from the ancestral node to i and j are:

vvii = 0.5 D = 0.5 Dijij + 0.5 (u + 0.5 (uii-u-ujj))

vvjj = 0.5 D = 0.5 Dijij + 0.5 (u + 0.5 (ujj-u-uii))

• Update the distance matrix: Compute distance between new node and Update the distance matrix: Compute distance between new node and each remaining tip as follows:each remaining tip as follows:

DDij,kij,k = (D = (Dikik+D+Djkjk-D-Dijij)/2)/2

• Replace tips i and j by the new node which is now treated as a tipReplace tips i and j by the new node which is now treated as a tip

• Repeat until only two nodes remain.Repeat until only two nodes remain.

Page 54: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Superimposed Substitutions

• Actual number of Actual number of

evolutionary events:evolutionary events: 55

• Observed number of Observed number of

differences:differences: 22

• Distance is (almost) always Distance is (almost) always underestimatedunderestimated

ACGGTGC

C T

GCGGTGA

Page 55: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Model-based correction for superimposed substitutions

• Goal: try to infer the real number of evolutionary Goal: try to infer the real number of evolutionary events (the real distance) based onevents (the real distance) based on

1.1. Observed data (sequence alignment)Observed data (sequence alignment)

2.2. A model of how evolution occursA model of how evolution occurs

Page 56: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Jukes and Cantor Model

• Four nucleotides assumed to Four nucleotides assumed to be equally frequent (f=0.25)be equally frequent (f=0.25)

• All 12 substitution rates All 12 substitution rates assumed to be equalassumed to be equal

• Under this model the Under this model the corrected distance is:corrected distance is:

DDJCJC = -0.75 x ln(1-1.33 x = -0.75 x ln(1-1.33 x DDOBSOBS))

• For instance:For instance:

DDOBSOBS=0.43 => =0.43 => DDJCJC=0.64=0.64

A C G T

A -3

C -3

G -3

T -3

Page 57: Multiple Alignment

CE

NT

ER

FO

R B

IOLO

GIC

AL

SE

QU

EN

CE

AN

ALY

SIS

Other models of evolution