Chapter 6 598 AGB. Today’s material Maximum Parsimony Fixed tree versions (solvable in polynomial time using dynamic programming) Optimal tree search.

Slides:



Advertisements
Similar presentations
PHYLOGENETIC TREES Bulent Moller CSE March 2004.
Advertisements

. Phylogenetic Trees (2) Lecture 13 Based on: Durbin et al 7.4, Gusfield , Setubal&Meidanis 6.1.
Graph Isomorphism Algorithms and networks. Graph Isomorphism 2 Today Graph isomorphism: definition Complexity: isomorphism completeness The refinement.
Parsimony based phylogenetic trees Sushmita Roy BMI/CS 576 Sep 30 th, 2014.
. Phylogenetic Trees (2) Lecture 13 Based on: Durbin et al 7.4, Gusfield , Setubal&Meidanis 6.1.
Complexity 16-1 Complexity Andrei Bulatov Non-Approximability.
. Computational Genomics 5a Distance Based Trees Reconstruction (cont.) Modified by Benny Chor, from slides by Shlomo Moran and Ydo Wexler (IIT)
. Phylogeny II : Parsimony, ML, SEMPHY. Phylogenetic Tree u Topology: bifurcating Leaves - 1…N Internal nodes N+1…2N-2 leaf branch internal node.
. Maximum Likelihood (ML) Parameter Estimation with applications to inferring phylogenetic trees Comput. Genomics, lecture 7a Presentation partially taken.
1. 2 Rooting the tree and giving length to branches.
BNFO 602 Phylogenetics Usman Roshan.
Building phylogenetic trees Jurgen Mourik & Richard Vogelaars Utrecht University.
Branch lengths Branch lengths (3 characters): A C A A C C A A C A C C Sum of branch lengths = total number of changes.
CSC401 – Analysis of Algorithms Lecture Notes 12 Dynamic Programming
CIS786, Lecture 3 Usman Roshan.
Phylogeny Tree Reconstruction
Phylogeny reconstruction BNFO 602 Roshan. Simulation studies.
BNFO 602 Phylogenetics Usman Roshan. Summary of last time Models of evolution Distance based tree reconstruction –Neighbor joining –UPGMA.
. Comput. Genomics, Lecture 5b Character Based Methods for Reconstructing Phylogenetic Trees: Maximum Parsimony Based on presentations by Dan Geiger, Shlomo.
UNIVERSITY OF SOUTH CAROLINA College of Engineering & Information Technology Bioinformatics Algorithms and Data Structures Chapter : Strings and.
Phylogenetic Networks of SNPs with Constrained Recombination D. Gusfield, S. Eddhu, C. Langley.
Building Phylogenies Parsimony 1. Methods Distance-based Parsimony Maximum likelihood.
. Phylogenetic Trees (2) Lecture 13 Based on: Durbin et al 7.4, Gusfield , Setubal&Meidanis 6.1.
Combinatorial and graph-theoretic problems in evolutionary tree reconstruction Tandy Warnow Department of Computer Sciences University of Texas at Austin.
Phylogeny Estimation: Why It Is "Hard", and How to Design Methods with Good Performance Tandy Warnow Department of Computer Sciences University of Texas.
Maximum Parsimony Input: Set S of n aligned sequences of length k Output: –A phylogenetic tree T leaf-labeled by sequences in S –additional sequences of.
Why Models of Sequence Evolution Matter Number of differences between each pair of taxa vs. genetic distance between those two taxa. The x-axis is a proxy.
Parsimony and searching tree-space Phylogenetics Workhop, August 2006 Barbara Holland.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Computer Science Research for The Tree of Life Tandy Warnow Department of Computer Sciences University of Texas at Austin.
Phylogenetic Analysis. General comments on phylogenetics Phylogenetics is the branch of biology that deals with evolutionary relatedness Uses some measure.
Molecular phylogenetics 1 Level 3 Molecular Evolution and Bioinformatics Jim Provan Page and Holmes: Sections
BINF6201/8201 Molecular phylogenetic methods
Parsimony-Based Approaches to Inferring Phylogenetic Trees BMI/CS 576 Colin Dewey Fall 2010.
Phylogenetics II.
Constructing evolutionary trees from rooted triples Bang Ye Wu Dept. of Computer Science and Information Engineering Shu-Te University.
CSC401: Analysis of Algorithms CSC401 – Analysis of Algorithms Chapter Dynamic Programming Objectives: Present the Dynamic Programming paradigm.
Benjamin Loyle 2004 Cse 397 Solving Phylogenetic Trees Benjamin Loyle March 16, 2004 Cse 397 : Intro to MBIO.
CS 173, Lecture B August 25, 2015 Professor Tandy Warnow.
394C: Algorithms for Computational Biology Tandy Warnow Sept 9, 2013.
394C, Spring 2013 Sept 4, 2013 Tandy Warnow. DNA Sequence Evolution AAGACTT TGGACTTAAGGCCT -3 mil yrs -2 mil yrs -1 mil yrs today AGGGCATTAGCCCTAGCACTT.
Ch.6 Phylogenetic Trees 2 Contents Phylogenetic Trees Character State Matrix Perfect Phylogeny Binary Character States Two Characters Distance Matrix.
More statistical stuff CS 394C Feb 6, Today Review of material from Jan 31 Calculating pattern probabilities Why maximum parsimony and UPGMA are.
Statistical stuff: models, methods, and performance issues CS 394C September 16, 2013.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Parsimony-Based Approaches to Inferring Phylogenetic Trees BMI/CS 576 Colin Dewey Fall 2015.
1 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.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Algorithmic research in phylogeny reconstruction Tandy Warnow The University of Texas at Austin.
598AGB Basics Tandy Warnow. DNA Sequence Evolution AAGACTT TGGACTTAAGGCCT -3 mil yrs -2 mil yrs -1 mil yrs today AGGGCATTAGCCCTAGCACTT AAGGCCTTGGACTT.
CS 598 AGB Supertrees Tandy Warnow. Today’s Material Supertree construction: given set of trees on subsets of S (the full set of taxa), construct tree.
CS 395T: Computational phylogenetics January 18, 2006 Tandy Warnow.
Statistical stuff: models, methods, and performance issues CS 394C September 3, 2009.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
394C: Algorithms for Computational Biology Tandy Warnow Jan 25, 2012.
Distance-based phylogeny estimation
Phylogenetic Trees - Parsimony Tutorial #12
394C, Spring 2012 Jan 23, 2012 Tandy Warnow.
Statistical tree estimation
Character-Based Phylogeny Reconstruction
Professor Tandy Warnow
BNFO 602 Phylogenetics Usman Roshan.
BNFO 602 Phylogenetics – maximum parsimony
CS 581 Tandy Warnow.
CS 581 Tandy Warnow.
Why Models of Sequence Evolution Matter
Phylogeny.
CS 394C: Computational Biology Algorithms
September 1, 2009 Tandy Warnow
Algorithms for Inferring the Tree of Life
Presentation transcript:

Chapter AGB

Today’s material Maximum Parsimony Fixed tree versions (solvable in polynomial time using dynamic programming) Optimal tree search (NP-hard for both problems) Why MP is not statistically consistent under the CFN model Maximum compatibility (time permitting)

Maximum Parsimony Input: Set S of n aligned sequences of length k Output: –A phylogenetic tree T leaf-labeled by sequences in S –additional sequences of length k labeling the internal nodes of T such that is minimized, where H(i,j) denotes the Hamming distance between sequences at nodes i and j

Maximum parsimony (example) Input: Four sequences –ACT –ACA –GTT –GTA Question: which of the three trees has the best MP scores?

Maximum Parsimony ACT GTTACA GTA ACA ACT GTA GTT ACT ACA GTT GTA

Maximum Parsimony ACT GTT GTA ACA GTA MP score = 5 ACA ACT GTA GTT ACA MP score = 6 ACT ACA GTT GTA ACAGTA MP score = 4 Optimal MP tree

Maximum Parsimony: computational complexity ACT ACA GTT GTA ACAGTA MP score = 4 Finding the optimal MP tree is NP-hard Optimal labeling can be computed in linear time O(nk)

Characters A character is a partition of the set of taxa, defined by the states of the character Morphological examples: presence/absence of wings, presence/absence of hair, number of legs Molecular examples: nucleotide or residue (AA) at a particular site within an alignment

Maximum Parsimony: computational complexity ACT ACA GTT GTA ACAGTA MP score = 4 Finding the optimal MP tree is NP-hard Optimal labeling can be computed in linear time O(nk)

DP algorithm Dynamic programming algorithms on trees are common – there is a natural ordering on the nodes given by the tree. Example: computing the longest leaf-to-leaf path in a tree can be done in linear time, using dynamic programming (bottom-up).

Two variants of MP Unweighted MP: all substitutions have the same cost Weighted MP: there is a substitution cost matrix that allows different substitutions to have different costs. For example: transversions and transitions can have different costs. Even if symmetric, this complicates the calculation – but not by much.

DP algorithm for unweighted MP When all substitutions have the same cost, then there is a simple DP method for calculating the MP score on a fixed tree. Let “Set(v)” denote the set of optimal nucleotides at node v (for an MP solution to the subtree rooted at v).

Solving unweighted MP Let “Set(v)” denote the set of optimal nucleotides at node v. Then: –If v is a leaf, then Set(v) is {state(v)}. –Else we let the two children of v be w and x. If Set(w) and Set(x) are disjoint, then Set(v) = Set(w) union Set(x) Else Set(v) = Set(w) intersection Set(x) After you assign values to Set(v) for all v, you go to Phase 2 (picking actual states)

Solving unweighted MP Assume we have computed values to Set(v) for all v. Note that Set(v) is not empty. Start at the root r of the tree. Pick one element from Set(r) for the state at r. Now visit the children x,y of r, and pick states. If the state of the parent is in Set(x), the use that state; otherwise, pick any element of Set(x).

DP for weighted MP Single site solution for input tree T. Root tree T at some internal node. Now, for every node v in T and every possible letter X, compute Cost(v,X) := optimal cost of subtree of T rooted at v, given that we label v by X. Base case: easy General case?

DP algorithm (con ’ t) Cost(v,X) = min Y {Cost(v 1,Y)+cost(X,Y)} + min Y {Cost(v 2,Y)+cost(X,Y)} where v 1 and v 2 are the children of v, and Y ranges over the possible states, and cost(X,Y) is an arbitrary cost function.

DP algorithm (con ’ t) We compute Cost(v,X) for every node v and every state X, from the “ bottom up ”. The optimal cost is min X {Cost(root,X)} We can then pick the best states for each node in a top-down pass. However, here we have to remember that different substitutions have different costs.

DP algorithm (con ’ t) Running time? Accuracy? How to extend to many sites?

Solving NP-hard problems exactly is … unlikely Number of (unrooted) binary trees on n leaves is (2n-5)!! If each tree on 1000 taxa could be analyzed in seconds, we would find the best tree in 2890 millennia #leaves#trees x x x

1.Hill-climbing heuristics (which can get stuck in local optima) 2.Randomized algorithms for getting out of local optima 3.Approximation algorithms for MP (based upon Steiner Tree approximation algorithms). Approaches for “ solving ” MP/ML Phylogenetic trees Cost Global optimum Local optimum MP = maximum parsimony, ML = maximum likelihood

Problems with heuristics for MP (OLD EXPERIMENT) Shown here is the performance of a heuristic maximum parsimony analysis on a real dataset of almost 14,000 sequences. ( “ Optimal ” here means best score to date, using any method for any amount of time.) Acceptable error is below 0.01%. Performance of TNT with time

Summary (so far) Maximum Parsimony is an NP-hard optimization problem, but can be solved exactly (using dynamic programming) in polynomial time on a fixed tree. Heuristics for MP are reasonably fast, but apparent convergence can be misleading. And some datasets can take a long time.

Is Maximum Parsimony statistically consistent under CFN? Recall the CFN model of binary sequence evolution: iid site evolution, and each site changes with probability p(e) on edge e, with 0 < p(e) < 0.5. Is MP statistically consistent under this model?

Statistical consistency under CFN We will say that a method M is statistically consistent under the CFN model if: –For all CFN model trees (T,Θ) (where Θ denotes the set of substitution probabilities on each of the branches of the tree T), as the number L of sites goes to infinity, the probability that M(S)=T converges to 1, where S is a set of sequences of length L.

Is MP statistically consistent? We will start with 4-leaf CFN trees, so the input to MP is a set of four sequences, A, B, C, D. Note that there are only three possible unrooted trees that MP can return: –((A,B),(C,D)) –((A,C),(B,D)) –((A,D),(B,C))

Analyzing what MP does on four leaves MP has to pick the tree that has the least number of changes among the three possible trees. Consider a single site (i.e., all the sequences have length one). Suppose the site is A=B=C=D=0. Can we distinguish between the three trees?

Analyzing what MP does on four leaves Suppose the site is A=B=C=D=0. Suppose the site is A=B=C=D=1 Suppose the site is A=B=C=0, D=1 Suppose the site is A=B=C=1, D=0 Suppose the site is A=B=D=0, C=1 Suppose the site is A=C=D=0, B=1 Suppose the site is B=C=D=0, A=1

Uninformative Site Patterns Uninformative site patterns are ones that fit every tree equally well. Note that any site that is constant (same value for A,B,C,D) or splits 3/1 is parsimony uninformative. On the other hand, all sites that split 2/2 are parsimony informative!

Parsimony Informative Sites [A=B=0, C=D=1] or [A=B=1, C=D=0] –These sites support ((A,B),(C,D)) [A=C=1, B=D=0] or [A=C=0, B=D=1] –These sites support ((A,C),(B,D)) [A=D=0,B=C=1] or [A=D=1, B=C=0] –These sites support ((A,D),(B,C))

Calculating which tree MP picks When the input has only four sequences, calculating what MP does is easy! 1.Remove the parsimony uninformative sites 2.Let I be the number of sites that support ((A,B),(C,D)) 3.Let J be the number of sites that support ((A,C),(B,D)) 4.Let K be the number of sites that support ((A,D),(B,C)) 5.Whichever tree is supported by the largest number of sites, return that tree. (For example, if I >max{J,K}, then return ((A,B),(C,D).) 6.If there is a tie, return all trees supported by the largest number of sites.

MP on 4 leaves Consider a four-leaf tree CFN model tree ((A,B),(C,D)) with a very high probability of change (close to ½) on the internal edge (separating AB from CD) and very small probabilities of change (close to 0) on the four external edges. What parsimony informative sites have the highest probability? What tree will MP return with probability increasing to 1, as the number of sites increases?

MP on 4 leaves Consider a four-leaf tree CFN model tree ((A,B),(C,D)) with a very high probability of change (close to ½) on the two edges incident with A and B, and very small probabilities of change (close to 0) on all other edges. What parsimony informative sites have the highest probability? What tree will MP return with probability increasing to 1, as the number of sites increases?

MP on 4 leaves Consider a four-leaf tree CFN model tree ((A,B),(C,D)) with a very high probability of change (close to ½) on the two edges incident with A and C, and very small probabilities of change (close to 0) on all other edges. What parsimony informative sites have the highest probability? What tree will MP return with probability increasing to 1, as the number of sites increases?

Summary (updated) Maximum Parsimony (MP) is statistically consistent on some CFN model trees. However, there are some other CFN model trees in which MP is not statistically consistent. Worse, MP is positively misleading on some CFN model trees. This phenomenon is called “long branch attraction”, and the trees for which MP is not consistent are referred to as “Felsenstein Zone trees” (after the paper by Felsenstein). The problem is not limited to 4-leaf trees…

Overall summary Maximum Parsimony is not statistically consistent under standard sequence evolution models, but it can be consistent on some model trees. Maximum parsimony is NP-hard and computationally intensive in practice. The best heuristics for MP used to be faster than the best heuristics for ML (maximum likelihood), but this may no longer be true. Even so, MP remains one of the popular techniques for phylogeny estimation.

Maximum Compatibility Maximum Compatibility is another approach to phylogeny estimation, often used with morphological traits instead of molecular sequence data. (And used in linguistics as well as in biology.) Input: matrix M where M ij denotes the state of the species s i for character j. Output: tree T on which a maximum number of characters are compatible.

Binary character compatibility Here the matrix is 0/1. Thus, each character partitions the taxa into two sets: the 0-set and the 1-set. Note that a binary character c is compatible on a tree T if and only if the tree T has an edge e whose bipartition is the same as c.

Multi-state character compatibility A character c is compatible on a tree T if the states at the internal nodes of T can be set so that for every state, the nodes with that state form a connected subtree of T. Equivalently, c is compatible on T if the maximum parsimony score for c on T is k- 1, where c has k states at the leaves of T.

Computing the compatibility score on a tree Given a matrix M of character states for a set of taxa, and given a tree T for that input, how do we calculate the compatibility score? One approach: run maximum parsimony on the input, and determine which characters are compatible.

Setwise character compatibility Input: Matrix for a set S of taxa described by a set C of characters. Output: Tree T, if it exists, so that every character is compatible on T. How hard is this problem? First consider the case where all characters are binary.

Binary character compatibility To test binary character compatibility, turn the set of binary characters into a set of bipartitions, and test compatibility for the bipartitions. In other words, determining if a set of binary characters is compatible is solvable in polynomial time.

Lemmata Lemma 1: A set of binary characters is compatible if and only if all pairs of binary characters are compatible. Lemma 2: Two binary characters c,c’ are compatible if and only if at least one of the four possible outcomes is missing: –(0,0), (0,1), (1,0), and (1,1)

Maximum Compatibility Given matrix M defining a set S of taxa and set C of characters, find a maximum size subset C’ of C so that a perfect phylogeny exists for (S,C’). Equivalently, find a tree with the largest MC score (# characters that are compatible) How hard is this problem? Consider the case of binary characters first.

Input: matrix M of 0/1. Output: tree T that maximizes character compatibility Graph-based Algorithm: –Vertex set: one node v c for each character c –Edge set: (v c,v c’ ) if c and c’ are compatible as bipartitions (can co-exist in some tree) Maximum Compatibility for Binary Characters

Solving maximum binary character compatibility Vertex set: one node v c for each character c Edge set: (v c,v c’ ) if c and c’ are compatible as bipartitions (can co-exist in some tree) Note: Every clique in the graph defines a set of compatible characters. Hence, finding a maximum sized clique solves the maximum binary character compatibility problem.

Solving MC for binary characters Max Clique is NP-hard, so this is not a fast algorithm. This algorithm shows that Maximum Character Compatibility reduces to Max Clique – not the converse. But the converse is also true. So Maximum Character Compatibility is NP-hard.

Multi-state character compatibility When the characters are multi-state, the “setwise if and only if pairwise” compatibility lemma no longer holds. Testing if a set of multi-state characters is compatible is called the “Perfect Phylogeny Problem”. This has many very pretty algorithms for special cases, but is generally NP-complete.