Presentation is loading. Please wait.

Presentation is loading. Please wait.

Phylogentic Tree Construction (Lecture for CS498-CXZ Algorithms in Bioinformatics) Nov. 29, 2005 ChengXiang Zhai Department of Computer Science University.

Similar presentations


Presentation on theme: "Phylogentic Tree Construction (Lecture for CS498-CXZ Algorithms in Bioinformatics) Nov. 29, 2005 ChengXiang Zhai Department of Computer Science University."— Presentation transcript:

1 Phylogentic Tree Construction (Lecture for CS498-CXZ Algorithms in Bioinformatics) Nov. 29, 2005 ChengXiang Zhai Department of Computer Science University of Illinois, Urbana-Champaign

2 What is evolution? A process of change in a certain direction (Merriam – Webster Online). In Biology: The process of biological and organic change in organisms by which descendants come to differ from their ancestor (Mc GRAW – HILL Dictionary of Biological Science). Charles Darwin first developed the Evolution idea in detail in his well- known book On the Origin of Spieces published in 1859.

3 Some Conventional Tools For Evolutionary Studies Fossil Record: some of the biota found in a given stratum are the descendants of those in the previous stratum. Morphological Similarity: similar species are found to have some similar anatomical structure; For example: horses, donkeys and zebras. Embryology: embryos of related kinds of animals are astoundingly similar.

4 Evolutionary Studies Early approaches –Based on anatomical features –Subjective derivation of evolutionary relationships Some of them were later proved incorrect Modern approaches –Based on DNA –Objective derivation of evolutionary relationships

5 Success Story 1: the Giant Panda Riddle For roughly 100 years scientists were unable to figure out which family the giant panda belongs to Giant pandas look like bears but have features that are unusual for bears and typical for raccoons, e.g., they do not hibernate In 1985, Steven O’Brien and colleagues solved the giant panda classification problem using DNA sequences and algorithms

6 Evolutionary Tree of Bears and Raccoons

7 Success Story 2: Out of Africa Hypothesis Around the time the giant panda riddle was solved, a DNA-based reconstruction of the human evolutionary tree lead to the Out of Africa Hypothesis: –Claims our most ancient ancestor lived in Africa roughly 200,000 years ago

8 Human Evolutionary Tree (cont’d) http://www.mun.ca/biology/scarr/Out_of_Africa2.htm

9 How to construct such a tree?

10 Basic Idea: Sequence Similarity -> Evolution Time Beta globin chains of closely related species are highly similar: Observe simple alignments below: Human β chain: MVHLT PE EK S AV TA LWGKV N V D E VGGEALGRLL Mouse β chain: MVHLT DA EK A AV NG LWGKVN P D D VGGEALGRLL Human β chain: VVYPWTQR F F E SFGDLS TPD A V MGNPKVKAHGKKV LG Mouse β chain: VVYPWTQR Y F D SFGDLS SAS A I MGNPKVKAHGKK V IN Human β chain: AF S DGL A HLDNLKGTFA T LSELHCDKLHVDPENFRLLGN Mouse β chain: AF N DGL K HLDNLKGTFA H LSELHCDKLHVDPENFRLLGN Human β chain: VL V C VL A HH F GKEFTP PV QAA Y QKVVAGVA N ALAHKYH Mouse β chain: MI V I VL G HH L GKEFTP CA QAA F QKVVAGVA S ALAHKYH There are a total of 27 mismatches, or (147 – 27) / 147 = 81.7 % identical

11 Sim(Human, Mouse) > Sim(Human, Chicken) Human β chain: MVH L T P EEK SAV T A LWGKVNV D E V G G EAL G RLL Chicken β chain: MVH W T A EEK QL I T G LWGKVNV A E C G A EAL A RLL Human β chain: V VYPWTQRFF E SFG D LS T P D A VM GNP K V K AHGKKVL G Chicken β chain: I VYPWTQRFF A SFG N LS S P T A I L GNP M V R AHGKKVL T Human β chain: A F S D GLAH LDNLK G TF AT LSELHCDKLHVDPENFRLLG N Chicken β chain: S F G D AVKN LDNIK N TF SQ LSELHCDKLHVDPENFRLLG D Human β chain: V L VC VLA H HF G K E FTP PV QAA Y QK V V AG VA N ALA H KYH Chicken β chain: I L I I VLA A HF S K D FTP EC QAA W QK L V RV VA H ALA R KYH -There are a total of 44 mismatches, or (147 – 44) / 147 = 70.1 % identical

12 Beta Globin Phylogenetic Tree

13 Phylogenetic Tree Construction Methods All related to clustering Similarity/distance based –Start with known distances between species –Bottom up construction –Criteria: Molecular clock vs. Additivity Maximum parsimony –Start with some alignment of sequences –Character-based –Search for the right tree –Criteria: Minimize mutations Probabilistic models –Start with a model for evolution –Reduct the tree construction problem to a model estimation problem Today’s lecture

14 Evolutionary Trees Leaves represent existing species Internal vertices represent ancestors Rooted trees: –Root represents the oldest evolutionary ancestor –Can be viewed as directed trees from the root to the leaves Unrooted trees: –The position of the root (“oldest ancestor”) is unknown. –Otherwise, they are like rooted trees

15 Rooted and Unrooted Trees

16 Distances in Trees Edges may have weights reflecting: –Number of mutations on evolutionary path from one species to another –Time estimate for evolution of one species into another (molecular clock) In a tree T with n leaves, we often compute the length of a path between leaves i and j, d ij (T) –d ij (T) refers to the the distance between i and j (sum of the weight of the edges on the path from i to j in the tree T)

17 Distance in Trees: an Exampe For i = 1, j = 4, d ij is: d i,j = 12 + 13 + 14 + 17 + 12 = 68 i j

18 Distance Matrix Given n species, we can compute the n x n distance matrix D ij D ij may be defined as the edit distance between a gene in species i and species j, where the gene of interest is sequenced for all n species. Evolution of these genes is described by a tree that we don’t know. We need an algorithm to construct a tree that best fits the distance matrix D ij

19 Fitting Distance Matrix Fitting means D ij = d ij (T) Lengths of path in a tree T Edit distance between species

20 Reconstructing a 3 Leaved Tree Tree reconstruction for any 3x3 matrix is straightforward We have 3 leaves i, j, k and a center vertex c Observe: d ic + d jc = D ij d ic + d kc = D ik d jc + d kc = D jk

21 Reconstructing a 3 Leaved Tree (cont’d) d ic + d jc = D ij + d ic + d kc = D ik 2d ic + d jc + d kc = D ij + D ik 2d ic + D jk = D ij + D ik d ic = (D ij + D ik – D jk )/2 Similarly, d jc = (D ij + D jk – D ik )/2 d kc = (D ki + D kj – D ij )/2

22 Trees with > 3 Leaves An unrooted tree with n leaves has 2n-3 edges This means fitting a given tree to a distance matrix D requires solving a system of all “n choose 2” pairs of equations with 2n-3 variables This is not always possible to solve for n > 3

23 Additive Distance Matrices ADDITIVE if there exists a tree T with d ij (T) = D ij NON-ADDITIVE otherwise

24 How do we know if a distance matrix is additive?

25 The Four Point Condition (cont’d) Compute: 1. D ij + D kl, 2. D ik + D jl, 3. D il + D jk 123 2 and 3 represent the same number: the length of all edges + the middle edge (its counted twice) 1 represents a smaller number: the length of all edges – the middle edge

26 The Four Point Condition: Theorem The four point condition is satisfied if 2 of these sums are the same number, with the third sum smaller than these first two Theorem : An n x n matrix D is additive if and only if the four point condition holds for every 4 distinct elements 1 ≤ i,j,k,l ≤ n

27 Distance Based Phylogeny Problem Goal: Reconstruct an evolutionary tree from a distance matrix Input: n x n distance matrix D ij Output: weighted unrooted tree T with n leaves fitting D If D is additive, this problem has a solution and there is a simple algorithm to solve it

28 Neighboring Leaves Find neighboring leaves i and j with parent k Remove the rows and columns of i and j Add a new row and column corresponding to k, where the distance from k to any other leaf m can be computed by: D km = (D im + D jm – D ij )/2 Compress i and j into k, iterate algorithm for rest of tree

29 Finding Neighboring Leaves To find neighboring leaves we simply select a pair of closest leaves.

30 Finding Neighboring Leaves To find neighboring leaves we simply select a pair of closest leaves. WRONG

31 Finding Neighboring Leaves Closest leaves aren’t necessarily neighbors i and j are neighbors, but (d ij = 13) > (d jk = 12) Finding a pair of neighboring leaves is a nontrivial problem!

32 Neighbor Joining Algorithm In 1987 Naruya Saitou and Masatoshi Nei developed a neighbor joining algorithm for phylogenetic tree reconstruction Finds a pair of leaves that are close to each other but far from other leaves: implicitly finds a pair of neighboring leaves Advantages: works for both additive and non-additive matrices

33 Neighbor-Joining Adjust the distances –D ij = d ij –(r i +r j ), r i is the average distance of i to all other nodes –Guarantees minimum D ij => neighbors Alternative cluster distance function –Suppose i and j are a pair of neighbors, replacing them with a new node k –Define d km = ½ (d im + d jm –d ij ) for any other node m –This guarantees additivity Finally, the edge length is d ik = ½ (d ij +r j -r j ), d jk =d ij –d ik, for joining k to i and j. Used in ClustalW

34 Neighbor-Joining: Example 2 3 5 3 1 6 SequenceABCD A08712 B80914 C79011 D1214110 Original (true) tree A B C D r 13.5 15.5 13.5 18.5 SequenceABCD A0-21-20 B-210-20 C 0-21 D-20 -210 Original distance matrix Adjusted distance matrix 8-(13.5+15.5)

35 Neighbor-Joining: Example (cont.) 5 3 NodeFCD F049 C4011 D9 0 A B C D r 13 15 20 NodeFCD F0-24 C 0 D 0 Intermediate distance matrix Adjusted distance matrix 4-(13+15) (8+(15.5-13.5))/2=5 (8-(15.5-13.5))/2=3 F d FC =(d AC +d BC -d AB )/2=4 NodeABCD A08712 B80914 C79011 D1214110 Original distance matrix 4 9 11 5 3 A B C D F 3 8 1 root 6

36 UPGMA: Unweighted Pair Group Method with Arithmetic Mean UPGMA is a clustering algorithm that: –computes the distance between clusters using average pairwise distance (i.e., average link) –assigns a height to every vertex in the tree, effectively assuming the presence of a molecular clock and dating every vertex Weakness: –Assumes a constant molecular clock: all species represented by the leaves in the tree are assumed to accumulate mutations (and thus evolve) at the same rate –Produces an ultrametric tree : the distance from the root to any leaf is the same

37 UPGMA’s Weakness: Example 2 3 4 1 1 4 3 2 Correct tree UPGMA

38 Least Squares Distance Phylogeny Problem If the distance matrix D is NOT additive, then we look for a tree T that approximates D the best: Squared Error : ∑ i,j (d ij (T) – D ij ) 2 Squared Error is a measure of the quality of the fit between distance matrix and the tree: we want to minimize it. Least Squares Distance Phylogeny Problem: finding the best approximation tree T for a non-additive matrix D (NP-hard).

39 Alignment Matrix vs. Distance Matrix Sequence a gene of length m nucleotides in n species to generate an… n x m alignment matrix n x n distance matrix CANNOT be transformed back into alignment matrix because information was lost on the forward transformation Transform into…

40 Character-Based Tree Reconstruction Better technique: –Character-based reconstruction algorithms use the n x m alignment matrix (n = # species, m = #characters) directly instead of using distance matrix. –GOAL: determine what character strings at internal nodes would best explain the character strings for the n observed species

41 Character-Based Tree Reconstruction (cont’d) Characters may be nucleotides, where A, G, C, T are states of this character. Other characters may be the # of eyes or legs or the shape of a beak or a fin. By setting the length of an edge in the tree to the Hamming distance, we may define the parsimony score of the tree as the sum of the lengths (weights) of the edges

42 maximum parsimony principle: the principle that the most accurate phylogenetic tree is one that is based on the fewest changes in the genetic code. Maximum Parsimony

43 1 2 3 4 5 6 7 8 9 10 1 - A G G G T A A C T G 2 - A C G A T T A T T A 3 - A T A A T T G T C T 4 - A A T G T T G T C G 0 0 0

44 1 2 3 4 5 6 7 8 9 10 1 - A G G G T A A C T G 2 - A C G A T T A T T A 3 - A T A A T T G T C T 4 - A A T G T T G T C G 0 3

45 A G C T 4 1 - G 2 - C 3 - T 4 - A C A G T C C C G A T C 3 3 3

46 1 2 3 4 5 6 7 8 9 10 1 - A G G G T A A C T G 2 - A C G A T T A T T A 3 - A T A A T T G T C T 4 - A A T G T T G T C G 0 3 2 Informative Site=discriminative site

47 1 2 3 4 5 6 7 8 9 10 1 - A G G G T A A C T G 2 - A C G A T T A T T A 3 - A T A A T T G T C T 4 - A A T G T T G T C G 0 3 2 2 0 3 2 1 0 3 2 2

48 4 1 - G 2 - A 3 - A 4 - G G G A A A G G A A A G A A G A 2 2 1

49 1 2 3 4 5 6 7 8 9 10 1 - A G G G T A A C T G 2 - A C G A T T A T T A 3 - A T A A T T G T C T 4 - A A T G T T G T C G 0 3 2 2 0 3 2 1 0 3 2 2

50 1 2 3 4 5 6 7 8 9 10 1 - A G G G T A A C T G 2 - A C G A T T A T T A 3 - A T A A T T G T C T 4 - A A T G T T G T C G 0 3 2 2 0 1 1 1 1 3 14 0 3 2 1 0 1 2 1 2 3 15 0 3 2 2 0 1 2 1 2 3 16

51 Small Parsimony Problem Input: Tree T with each leaf labeled by an m- character string. Output: Labeling of internal vertices of the tree T minimizing the parsimony score. We can assume that every leaf is labeled by a single character, because the characters in the string are independent.

52 Weighted Small Parsimony Problem A more general version of Small Parsimony Problem Input includes a k * k scoring matrix describing the cost of transformation of each of k states into another one

53 Sankoff’s Algorithm Build from leaves to the root Then move down and assign each node with its character. The character at each leave and internal vertex isn’t determined until the root is determined. Need to keep tract of every character.

54 Sankoff’s Algorithm Check children’s every vertex and determine the minimum between them An example

55 Fitch’s Algorithm Solves Small Parsimony problem Dynamic programming in essence Assigns a set of letter to every vertex in the tree. If the two children’s sets of character overlap, it’s the common set of them If not, it’s the combined set of them.

56 Fitch’s Algorithm (cont’d) a a a a a a c c {t,a} c t t t a {a,c} a a a a a tc An example:

57 Probabilistic Approaches Basic idea: –Tree= Generative probabilistic model, e.g., an n-leaf tree defines a model p(X1, …,Xn) –Data: sequences {s1, …, sn} –Choose the tree according to Maximum Likelihood: p(Data|Tree) Maximum A Posterior (Bayesian): p(Tree|Data) Model evolution more directly Computationally expensive

58 Detailed View of Probabilistic Models x5x5 t3t3 x4x4 x2x2 x1x1 x3x3 t2t2 t1t1 t4t4 The tree on the left defines the following probabilistic model: Basic evolution model: p(x|y,t)=prob of x arising from an ancestral sequence y over an edge of length t Decompose the sequence: “Independence Assumption”: Decompose the time: “Markovian Assumption” “Primitive Evolution Model”: p(a|b,t) - Nucleotides: Jukes-Cantor model - Amino acids: PAM

59 The Jukes-Cantor model -3       rtrt stst stst stst stst rtrt stst stst stst stst rtrt stst stst stst stst rtrt Solutions: r t = (1+3e  4  t )/4, s t = (1  e  4  t )/4. R=S(t)= ACGTACGT

60 Computing the Likelihood x5x5 t3t3 x4x4 x2x2 x1x1 x3x3 t2t2 t1t1 t4t4 With Parents Known: But We don’t know the parents…

61 Handling the Hidden Nodes We must sum up over all the hidden ancestral nodes Felsenstein’s algorithm for likelihood: Compute the sum in a bottom up fashion –Start from leaves –Compute the parent node based on children nodes

62 Maximizing the Likelihood Easy for small number of sequences Generally complex for large number of sequences Many solutions: –EM –Gradient descent –Sampling Metropolis sampling –Accept a new tree if P(new-tree)>= P(old-tree) –Accept a new tree with prob. P(new-tree)/P(old-tree) if p(new- tree)<p(old-tree)

63 More realistic evolutionary models Allowing different rates at different sites –Using a prior (e.g., gamma) to regular the different rates –Hidden Markov models Evolutionary models with gaps –Tree HMMs

64 What You Should Know What is a phylogenetic tree (rooted, unrooted) How the neighbor-joining algorithm works Know the basic idea of maximum parsimony


Download ppt "Phylogentic Tree Construction (Lecture for CS498-CXZ Algorithms in Bioinformatics) Nov. 29, 2005 ChengXiang Zhai Department of Computer Science University."

Similar presentations


Ads by Google