Presentation is loading. Please wait.

Presentation is loading. Please wait.

. Phylogenetic Trees (2) Lecture 13 Based on: Durbin et al 7.4, Gusfield 17.1-17.3, Setubal&Meidanis 6.1.

Similar presentations


Presentation on theme: ". Phylogenetic Trees (2) Lecture 13 Based on: Durbin et al 7.4, Gusfield 17.1-17.3, Setubal&Meidanis 6.1."— Presentation transcript:

1 . Phylogenetic Trees (2) Lecture 13 Based on: Durbin et al 7.4, Gusfield , Setubal&Meidanis 6.1

2 2 Character-based methods for constructing phylogenies In this approach, trees are constructed by comparing the characters of the corresponding species. Characters may be morphological (teeth structures) or molecular (homologous DNA sequences). One common approach is Maximum Parsimony Common Assumptions: u Independence of characters (no interactions) u Best tree is one where minimal changes take place

3 3 Character based methods: Input data species C1C1 C2C2 C3C3 C4C4 …CmCm dog AACAGGTCTTCGAGGCCC horse AACAGGCCTATGAGACCC frog AACAGGTCTTTGAGTCCC human AACAGGTCTTTGATGACC pig AACAGTTCTTCGATGGCC *********** Each character (column) is processed independently. The green character will separate the human and pig from frog, horse and dog. The red character will separate the dog and pig from frog, horse and human. We seek for a tree that will best explain all characters simultaneously.

4 4 1. Maximum Parsimony A Character-based method Input: u h sequences (one per species), all of length k. Goal: u Find a tree with the input sequences at its leaves, and an assignment of sequences to internal nodes, such that the total number of changes is minimized.

5 5 Example Input: four nucleotide sequences: AAG, AAA, GGA, AGA taken from four species. AGA AAA GGA AAG AAA Total #substitutions = 4 By the parsimony principle, we seek a tree that has a minimum total number of substitutions of symbols between species and their originator in the phylogenetic tree. Here is one possible tree

6 6 Example Continued There are many trees possible. For example: AGA GGA AAA AAG AAA AGA AAA Total #substitutions = 3 GGA AAA AGA AAG AAA Total #substitutions = 4 The left tree is preferred over the right tree. The total number of changes is called the parsimony score.

7 7 Example With One Letter Sequences u Suppose we have five species, such that three have ‘C’ and two ‘T’ at a specified position u Minimal tree has only one evolutionary change: C C C C C T T T T  C

8 8 Extension to Many Letters u What is the parsimony score of AardvarkBisonChimpDogElephant A : CAGGTA B : CAGACA C : CGGGTA D : TGCACT E : TGCGTA When the tree is known, we can do it character after character; each score is computed independently of the others.

9 9 Parsimony Based Reconstruction Two separate components: 1. A procedure to find the minimum number of changes needed to explain the data (for a given tree topology, where species are assigned to leaves) 2.A search through the space of trees. 3.We will see that (1) is easy. (2) is hard.

10 10 Fitch Algorithm (Tree is Given) Work on each character independently. Start at the leaves. If two sisters have common character, parent “inherits” their intersection. Else, parent Inherits their union. After reaching root, go down to fix sets of size > 1. A A/T A A C T A A A/C

11 11 Fitch’s Algorithm, More Formally traverse tree from leaves to root determining set of possible states (e.g. nucleotides) for each internal node traverse tree from root to leaves picking ancestral states for internal nodes

12 12 Fitch’s Algorithm – Phase 1 do a post-order (from leaves to root) traversal of tree Determine possible states R i of internal node i with children j and k

13 13 Fitch’s Algorithm – Phase 1 # of changes = # of union operations TC T CT C C T A G C AGC GC

14 14 Fitch’s Algorithm – Phase 2 do a pre-order (from root to leaves) traversal of tree select state r j of internal node j with parent i as follows:

15 15 Fitch’s Algorithm – Phase 2 TCTC T CTCT C C T A G C AGC GCGC

16 16 Proof of Fitch’s Algorithm We’ll show that Fitch maximizes the parsimony score at every character. u Definitions: l For a leaf-labeled tree T, let T* be an optimal assignment of labels to internal nodes of T. l Let T*(v) be the assignment at internal node v under T*. l Let T v be the tree rooted at v.

17 17 u Claim: The first phase of Fitch keeps at v the set of states S(v) such that l For every s  S(v), there exists an optimal tree T v * with T v * (v) = s, l In every optimal tree T v *, T v * (v) = s for some s  S(v). u Proof: By induction of the tree height h. l Basis: h=1 I.If both children have the same state – zero change. II.Otherwise – exactly one change. AA A AB A  B

18 18 Induction step: Assume correctness for height k and will prove for k+1. Let p 1 and p 2 be the optimal costs of the subtrees of v’s children. If the intersection of v’s children lists is not empty, then the optimal score is p 1 +p 2 and it can be achieved by labeling v with any member in the intersection, and only in this way. Otherwise, the optimal score is p 1 +p 2 +1, and it can be achieved by labeling v with any member in the union of the lists, and only in this way. A,B C,D A,B,C,D A,B B,C B

19 19 Generalization: Weighted Parsimony (Sankoff’s algorithm) Weighted Parsimony score: l Each change is weighted by a score c(a,b). l The weighted parsimony score reduces to the parsimony score when c(a,a)=0 and c(a,b)=1 for all b other than a.

20 20 Weighted Parsimony on a Given Tree Each position is independent and computed by itself. Use Dynamic programming on a given tree.  if k is a node with children i and j, then S(k,a) = min b (S(i,b)+c(a,b)) + min b’ (S(j,b’)+c(a,b’)) k i j S(i,b) S(j,b)  the optimal score of a subtree rooted at j when j has the character b. S(j,b’) S(k,a)

21 21 Evaluating Parsimony Scores Dynamic programming on a given tree Initialization:  For each leaf i set S(i,a) = 0 if i is labeled by a, otherwise S(i,a) =  Iteration:  if k is node with children i and j, then S(k,a) = min x (S(i,x)+c(a,x)) + min y (S(j,y)+c(a,y)) Termination:  cost of tree is min x S(r,x) where r is the root Comment: To reconstruct an optimal assignment, we need to keep in each node k and for each character a the two characters x, y that bring about the minimum when k has character a.

22 22 Cost of Evaluating Parsimony for binary trees If there are n nodes, m characters, and k possible values for each character, then complexity is O(nmk 3 ). Of course, we still need to search over possible trees and find the best one. One usually resorts to heuristic search techniques.

23 23 2. The perfect phylogeny problem u A character is assumed to be a property which distinguishes between species (e.g. dental structure). u A characters state is a value of the character (human dental structure). u Problem: Given set of species, specified by their characters, reconstruct their evolutionary tree.

24 24 Homoplasy-free trees 1 Characters in Phylogenetic Trees should avoid: reversal transitions u A species regains a state it’s direct ancestor has lost. u Famous examples: l Teeth in birds. l Legs in snakes.

25 25 Homoplasy-free trees 2 …and also avoid convergence transitions u Two species possess the same state while their least common ancestor possesses a different state. u Famous example: The marsupials.

26 26

27 27 Characters as Colorings A coloring of a tree T=(V,E) is a mapping C:V  [set of colors] A partial coloring of T is a mapping defined on a subset of the vertices U  V: C:U  [set of colors] U=

28 28 Each character defines a (partial) coloring of the correspondeing phylogenetic tree: Characters as Colorings (2) Species ≡ Vertices States ≡ Colors

29 29 Convex Colorings (and Characters) C Definition: A (partial/total) coloring of a tree is convex iff all d-carriers are disjoint Let T=(V,E) be a colored tree, and d be a color. The d-carrier is the minimal subtree of T containing all vertices colored d

30 30 A character is Homoplasy free (avoids reversal and convergence transitions) ↕ The corresponding (partial) coloring is convex Convexity  Homoplasy Freedom

31 31 The Perfect Phylogeny Problem u Input: a set of species, and many characters, each assigns states (colors) to the species. u Question: is there a tree T containing the species as vertices, in which all the characters (colorings) are convex?

32 32 Input: Partial colorings (C 1,…,C k ) of a set of vertices U (in the example: 3 total colorings: left, center, right, each by two colors). Problem: Is there a tree T=(V,E), s.t. U  V and for i=1,…,k,, C i is a convex (partial) coloring of T? RBRRBRRRR BBRRRB The Perfect Phylogeny Problem (pure graph theoretic setting) NP-Hard In general, in P for some special cases

33 33 Perfect Phylogeny for a 0-1 Matrix Rows correspond to objects, columns to characters. Each character has two states: 0 (non exists) or 1 (exists). A tree T is a perfect phylogeny for the matrix iff it has the following properties: A.Each of the n objects corresponds to a leaf of T. B.Each of the m characters labels exactly one edge of T. C.Object p has character i  i labels an edge on the path from p to the root. Note: [B and C hold]  [each character is convex on T] C1C1C2C3C4C5 A11000 B00100 C11001 D00110 E01000 A E D C B C4 C3 C2 C1 C5

34 34 Perfect Phylogeny for a 0-1 Matrix By the definition, for each character C there is one edge in which it is converted from 0 to 1. In the below tree, the edge on which character C2 is converted to 1 is marked. The resulted tree is convex for this character. C1C2C3C4C5 A1 B0 C1 D0 E1 A E D C B C2

35 35 The (Binary) Perfect Phylogeny Problem Problem: Given a 0-1 matrix M, determine if it has a perfect phylogeny, and construct one if it does. (Note: edges are labeled by characters: edge labeled by i represent changing character i’s state from 0 to 1). As we show below, the answer is yes for our matrix: C1C2C3C4C5 A11000 B00100 C11001 D00110 E01000 A E D C B C4 C3 C2 C1 C5

36 36 Efficient algorithm for the Binary Perfect Phylogeny Problem Definition: Given a 0-1 matrix M, O k ={j:M jk =1}, ie: O k is the set of objects that have character Ck. Theorem: M has a perfect phylogenetic tree iff the sets {O i } are laminar, ie: for all i, j, either O i and O j are disjoint, or one includes the other. C1C2C3C4C5 A11000 B00100 C11001 D00110 E01000 C1C2 C3 C4C5 A11000 B00101 C11001 D00110 E01001 LaminarNot Laminar

37 37 Proof  : Assume M has a perfect phylogeny, and let i, j be given. Consider the edges labeled i and j. Case 1: There is a root to leaf path containing both. Then one is included in the other (2 and 1 below). Case 2: not case 1. Then they are disjoint (2 and 3 below). A E D C B C4 C3 C2 C1 C5

38 38 Proof (cont.)  : Assume for all i, j, either O i and O j are disjoint, or one includes the other. We prove by induction on the number of characters that it has a perfect phylogenetic tree for the matrix. Basis: one character. Then there are at most two objects, one with and one without this character. C1 A1 B0 AB

39 39 Proof (cont.)  : Induction step: Assume correctness for n-1 characters, and consider a matrix with n characters (non-zero columns). WLOG assume that O 1 is not contained in O j for j > 1. Let S 1 be the set of objects j for which M j1 = 1, and S 2 be the remaining objects. Then each character belongs to objects in S 1 or S 2, but not both (prove!). By induction there are trees T 1 and T 2 for S 1 and S 2. Combining them as below gives the desired tree. C1C2C3C4C5 A11000 B00100 C11001 D00110 E10000 T1T1 T2T2 1


Download ppt ". Phylogenetic Trees (2) Lecture 13 Based on: Durbin et al 7.4, Gusfield 17.1-17.3, Setubal&Meidanis 6.1."

Similar presentations


Ads by Google