ResearchAuto-validating von Neumann rejection sampling from small phylogenetic tree spaces1 Department of Statistics, University of Oxford, Oxford, OX1 3TG, UK 2 Biomathematics Research Centre, Department of Mathematics and Statistics, University of Canterbury, Private Bag 4800, Christchurch, New Zealand 3 Department of Biological Statistics and Computational Biology, Cornell University, Ithaca, New York 14853, USA 4 Boyce Thompson Institute for Plant Research, Cornell University, Ithaca, New York 14853, USA
Algorithms for Molecular Biology 2009, 4:1doi:10.1186/1748-7188-4-1 The electronic version of this article is the complete one and can be found online at: http://www.almob.org/content/4/1/1
©
2009 Sainudiin and York; licensee BioMed Central Ltd. AbstractBackgroundIn phylogenetic inference one is interested in obtaining samples from the posterior distribution over the tree space on the basis of some observed DNA sequence data. One of the simplest sampling methods is the rejection sampler due to von Neumann. Here we introduce an auto-validating version of the rejection sampler, via interval analysis, to rigorously draw samples from posterior distributions over small phylogenetic tree spaces. ResultsThe posterior samples from the auto-validating sampler are used to rigorously (i) estimate posterior probabilities for different rooted topologies based on mitochondrial DNA from human, chimpanzee and gorilla, (ii) conduct a non-parametric test of rate variation between protein-coding and tRNA-coding sites from three primates and (iii) obtain a posterior estimate of the human-neanderthal divergence time. ConclusionThis solves the open problem of rigorously drawing independent and identically distributed samples from the posterior distribution over rooted and unrooted small tree spaces (3 or 4 taxa) based on any multiply-aligned sequence data. BackgroundObtaining samples from a real-valued target density f• (t) is a basic problem in statistical estimation. The target f• (t): A more direct sampler that is capable of producing independent and identically distributed samples from the target density f• (t):= f(t)/(Nf), by only evaluating the target shape f(t) without knowing the normalizing constant None of the available samplers can rigorously produce independent and identically distributed samples from the posterior distribution over phylogenetic tree spaces, even for 3 or 4 taxa. We describe a new approach for rigorously drawing samples from a target posterior distribution over small phylogenetic tree spaces using the theory of interval analysis. This method can circumvent the problems associated with (i) heuristic convergence diagnostics in MCMC samplers and (ii) pseudo-envelopes constructed via non-rigorous point-valued methods in rejection samplers. Informally, our method partitions the domain into boxes and uses interval analysis to rigorously bound the target shape in each box; then we use as envelope the simple function which takes on in each box the upper bound obtained for that box. It is easy to draw samples from the density corresponding to this step function envelope. More formally, the method employs an interval extension of the target posterior shape f(t): We call our method auto-validating because we employ interval methods to rigorously construct the envelope for a large class of target densities. The method was described in a more rudimentary form in [5]. Unlike many conventional samplers, each sample produced by our method is equivalent to a computer-assisted proof that it is drawn from the desired target, up to the pseudo-randomness of the underlying, deterministic, pseudo-random number generator. MRS 0.1.2, a C++ class library for statistical set processing is available from http://www.math.canterbury.ac.nz/~r.sainudiin/codes/mrs webcite under the terms of the GNU General Public License. The rest of the paper is organized as follows. In the Methods Section, we introduce (i) von Neumann rejection sampler (RS), (ii) phylogenetic estimation problem, (iii) interval analysis and (iv) an interval extension of the rejection sampler called the Moore rejection sampler (MRS) in honor of Ramon E. Moore. Moore was one of the influential founders of interval analysis [6]. In Results Section, we employ MRS to rigorously draw samples from the posterior density over small tree spaces. Using one of the earliest primate mitochondrial DNA data sets we use the posterior samples to estimate the posterior probability of each rooted tree topology and conduct a non-parametric test of rate variation between protein-coding and tRNA-coding sites. Using one of the latest data sets we obtain a rigorous posterior estimate of the human-neanderthal divergence time. We can also draw samples from the space of unrooted triplet and quartet trees. We conclude after a discussion of the method. MethodsIn the following sections, we first introduce the rejection sampler (RS) due to von Neumann [3]. Secondly, we describe the basic phylogenetic inference problem (e.g. [7-9]). Then, we introduce the basic principles of interval methods (e.g. [6,10-13]). Finally, we construct interval extensions of RS to rigorously draw independent and identically distributed samples from small phylogenetic tree spaces. We leave the formal proofs to the Appendix for completeness. Rejection sampler (RS)Rejection sampling [3] is a Monte Carlo method to draw independent samples from a target random variable or random vector T with density f• (t):= f(t)/Nf, where t ∈ (iv) a normalizing constant input : (i) f; (ii) samplers for V ~ g and M ~ 1[0,1]; (iii) output : (i) possibly one sample t from T ~ f• and (ii) Trials initialize: Trials ← 0; Success ← false; t ← ∅; repeat //propose at most MaxTrials times until acceptance v ← sample(g); //draw a sample v from RV V with density g u ← if u ≤ f(v) then //accept the proposed v and flag Success t ← v; Success ← true end Trials ← Trials +1; //track the number of proposal trials so far until Trials ≥ MaxTrials or Success = true; return t and Trials Algorithm 1: von Neumann RS We use the Mersenne Twister pseudo-random number generator [14] to imitate independent samples from M ~ 1[0,1]. The random variable T, if generated by Algorithm 1, is distributed according to f• (e.g. [15]). Let A( and the probability distribution over the number of samples from g to obtain one sample from f• is geometrically distributed with mean 1/A( Phylogenetic estimationIn this section we briefly review phylogenetic estimation. A more detailed account can be found in [7-9]. Inferring the ancestral relationship among a set of extant species based on their DNA sequences is a basic problem in phylogenetic estimation. One can obtain the likelihood of a particular phylogenetic tree that relates the extant species of interest at its leaves by superimposing a continuous time Markov chain model of DNA substitution upon that tree. The length of an edge (branch length) connecting two nodes (species) in the tree represents the amount of evolutionary time (divergence) between the two species. The internal nodes represent ancestral species. During the likelihood computation, one needs to integrate over all possible states at the unobserved ancestral nodes. Next we give a brief introduction to some phylogenetic nomenclature. A phylogenetic tree is said to be rooted if one of the internal nodes, say node r, is identified as the root of the tree, otherwise it is said to be unrooted. The rooted tree is conventionally depicted with the root node r at the top. The four topology-labeled, three-leaved, rooted trees, namely, 0t, 1t, 2t and 3t, with leaf label set {1, 2, 3}, are depicted in Figure 1(i)–(iv). The unrooted, three-leaved tree with topology label 4 or the unrooted triplet 4t is shown in Figure 1(v). For each tree, the terminal branch lengths, i.e. the branch lengths leading to the leaf nodes, have to be strictly positive and the internal branch lengths have to be non-negative. Our rooted triplets (Figure 1(i)–(iv)) are said to satisfy the molecular clock, since the branch lengths of each kt, where k ∈ {0, 1, 2, 3}, satisfy the constraint that the distance from the root node r to each of the leaf nodes is equal to kt0 + kt1 with kt1 > 0 and kt0 ≥ 0.
Likelihood of a treeLet d denote a homologous set of sequences of length v with character set Any subset of the tree space with | An explicit model of sequence evolution is prescribed in order to obtain the likelihood of observing data d at the leaf nodes as a function of the parameter kt ∈ input : (i) a labeled tree with branch lengths kt := (kt1, kt2,..., output : initialize: For a leaf node h with observed character ai = dh, q at site q, set recurse : compute lh for each sub-terminal node h, then those of their ancestors recursively to finally compute lr for the root node r to obtain the likelihood for site q, For an internal node h with descendants s1, s2,..., sℏ, Algorithm 2: Likelihood by post-order traversal Assuming independence across all v sites we obtain the likelihood function for the given data d, by multiplying the site-specific likelihoods The maximum likelihood estimate is a point estimate (single best guess) of the unknown phylogenetic tree on the basis of the observed data d and it is The simplest probability models for character mutation are continuous time Markov chains with finite state space Posterior density of a treeThe posterior density f• (kt) conditional on data d at tree kt is the normalized product of the likelihood ld(kt) and the prior density p(kt) over a given tree space We assume a uniform prior density over a large box or a union of large boxes in a given tree space Likelihood of a triplet under Cavender-Farris-Neyman (CFN) modelWe now describe the simplest model for the evolution of binary sequences under a symmetric transition matrix over all branches of a tree. This model has been used by authors in various fields including molecular biology, information theory, operations research and statistical physics; for references see [7,18]. This model is referred to as the Cavender-Farris-Neyman (CFN) model in molecular biology, although in other fields it has been referred to as 'the on-off machine', 'symmetric binary channel' and the 'symmetric two-state Poisson model'. Although the relatively tractable CFN model itself is not popular in applied molecular evolution, the lessons learned under the CFN model often extend to more realistic models of DNA mutation (e.g. [17]). Thus, our first stop is the CFN model. Model 1 (Cavender-Farris-Neyman (CFN) model) Under the CFN mutation model, only pyrimidines and purines, denoted respectively by Y:= {C, T} and R:= {A, G}, are distinguished as evolutionary states among the four nucleotides {A, G, C, T}, i.e. and transition probability matrix P(t) = eQt : Thus, the probability that Y mutates to R, or vice versa, in time t is a(t): (1e-2t)/2. The stationary distribution is uniform on When there are only three taxa, there are five tree topologies of interest as depicted in Figure 1. There are 23 = 8 possible site patterns, i.e. for each site q ∈ {1, 2,..., v}, the q-th column of the data d, denoted by d•, q, is one of eight possibilities, numbered 0, 1,...,7 for convenience: Given a multiple sequence alignment data d from 3 taxa at v homologous sites, i.e. d ∈ {Y, R}3 × v, the likelihood function over the tree space where li(kt) is the likelihood of the the i-th site pattern as in (4) and ci is the count of sites with pattern i. In fact, li(kt) = P(i|kt) is the probability of observing site pattern i given topology label k and branch lengths t and similarly ld(kt) = P(d|kt). Consider the unrooted tree-space with a single topology labeled 4 and three non-negative terminal branch lengths 4t = (4t1, 4t2, 4t3) ∈ Therefore, the multiple sequence alignment data d from three taxa evolving under Model 1 can be summarized by the minimal sufficient site pattern counts (cxxx, cxxy, cyxx, cxyx):= (c0 + c1, c2 + c3, c4 + c5, c6 + c7), which simplifies (5) to: Note that the probability of our sample space with eight patterns given in (4) is Likelihood of a triplet under Jukes-Cantor (JC) modelThe r-state symmetric model introduced in [19] is specified by the r × r rate matrix with equal off-diagonal entries over an alphabet set Model 2 (Jukes-Cantor (JC) model) All four nucleotides form the state space for this mutation model, i.e. The transition probability matrix P(t) = eQt is also symmetric. The probability that any given nucleotide mutates to any other nucleotide in time t is Px, y(t) and that it is found in the same state is Px, x(t). These transition probabilities are: The stationary distribution is uniform, i.e. π(A) = π(C) = π(G) = π(T) = 1/4. Consider the three non-negative terminal branch lengths 4t = (4t1, 4t2, 4t3) ∈ Notice that the probability of observing one of the 64 possible site patterns is 1 for any 4t ∈ (0, ∞)3 : 4lxxx(4t) + 24lxyz(4t) + 12lxxy(4t) + 12lyxx(4t) + 12lyxx(4t) = 1. Let cijk denote the number of sites with the site pattern ijk ∈ {xxx, xyz, xxy, yxx, xyx}. Then, under the assumption of independence across sites, we obtain the likelihood of a given data d by multiplying the site-specific likelihoods: Once again, the likelihood of a rooted tree or the star tree can be obtained from that of the unrooted tree by substituting the appropriate constraints on branch lengths in the above equations or by directly applying Algorithm 2 with the appropriate input tree with its topology and branch lengths. Model 3 (Hasegawa-Kishino-Yano (HKY) model) The Hasegawa-Kishino-Yano or HKY model [25]has all four nucleotides in the state space, i.e. The transition probabilities are known analytically for this model (see for e.g. [[8], p. 203]). We can use these expressions when evaluating the likelihood of a rooted or unrooted tree along with the five mutational parameters via Algorithm 2. For simplicity we set the stationary distribution parameters to the empirical nucleotide frequencies and κ to be 2.0 in this study. Interval analysisLet Definition 1 (Interval Operation) If the binary operator ⋆ is one of +, -, ×,/, then we define an arithmetic on operands in x ⋆ y:= {x ⋆ y : x ∈ x, y ∈ y}, with the exception that x/y is undefined if 0 ∈ y. Theorem 1 (Interval arithmetic) Arithmetic on the pair x, y ∈ When computing with finite precision, say in floating-point arithmetic, directed rounding must be taken into account (see e.g., [6,10]) to contain the solution. Interval multiplication is branched into nine cases, on the basis of the signs of the boundaries of the operands, such that only one case entails more than two real multiplications. Therefore, a rigorous computer implementation of an interval operation mostly requires two directed rounding floating-point operations. Interval addition and multiplication are both commutative and associate but not distributive. For example, Interval arithmetic satisfies a weaker rule than distributivity called sub-distributivity: x(y + z) ⊆ xy + xz. An extremely useful property of interval arithmetic that is a direct consequence of Definition 1 is summarized by the following theorem. Theorem 2 (Fundamental property of interval arithmetic) If x ⊆ x' and y ⊆ y' and ⋆ ∈ {+, -, ×,/}, then x ⋆ y ⊆ x' ⋆ y', where we require that 0 ∉ y' when ⋆ = /. Note that an immediate implication of Theorem 2 is that when x = [x, x] and y = [y, y] are thin intervals, i.e. Let and the Hausdorff distance between the boxes x and y in the metric given by the maximum norm is then dist∞ (x, y) = ∥dist(x, y)∥∞. We can make Our main motivation for the extension to intervals is to enclose the range: range(f; S):= {f(x): x ∈ S}, of a real-valued function f : ℝn ↦ ℝ over a set S ⊆ ℝn. Except for trivial cases, few tools are available to obtain the range. Definition 2 (Directed acyclic graph (DAG) expression of a function) One can think of the process by which a function f : ℝm ↦ ℝ is computed as the result of a sequence of recursive operations with the sub-expressions fi of its expression f where, i = 1,..., n < ∞. This involves the evaluation of the sub-expression fi at node i with operands The leaf or terminal node of the DAG is a constant or a variable and thus the fi for a leaf i is set equal to the respective constant or variable. The recursion starts at the leaves and terminates at the root of the DAG. The DAG for an elementary f is simply its expression f with n sub-expressions f1, f2,...,fn: where each ⊙fi is computed according to (8). We look at some DAGs for 0 functions to concretely illustrate these ideas. Example 1 Consider the constant zero function f(x) = 0 expressed as (i) f(x) = 0, (ii) f'(x) = x × 0 and (iii) f"(x) = x - x. The corresponding DAG expressions are shown in Figure 2.
Definition 3 (The natural interval extension) Consider a real-valued function f(x): ℝn ↦ ℝm given by a formula or a DAG expression f(x). If real constants, variables, and operations in f(x) are replaced by their interval counterparts, then one obtains f(x) is known as the natural interval extension of the expression f(x) for f(x). This extension is well-defined if we do not run into division by zero. Although the three distinct expressions f(x), f'(x) and f"(x) of the real function f: ℝ ↦ ℝ of Example 1 are equivalent upon evaluation in the reals, their respective interval extensions f(x) = [0, 0], f'(x) = x × [0, 0], and f"(x) = x - x are not. For instance, if x = [1, 2], and in general for any x : [ Thus, f(x) = f'(x) ≠ f"(x) for any x ∈ Theorem 3 (Interval rational functions) Consider the rational function f(x) = p(x)/q(x), where p and q are polynomials. Let f be the natural interval extension of its DAG expression f such that f(y) is well-defined for some y ∈ Definition 4 (Standard functions) Piece-wise monotone functions, including exponential, logarithm, rational power, absolute value, and trigonometric functions, constitute the set of standard functions
Such functions have well-defined interval extensions that satisfy inclusion isotony and exact range enclosure, i.e. range(f; x) = f(x). Consider the following definitions for the interval extensions for some monotone functions in and a piece-wise monotone function in Definition 5 (Elementary functions) A real-valued function that can be expressed as a finite combination of constants, variables, arithmetic operations, standard functions and compositions is called an elementary function. The set of all such elementary functions is referred to as Example 2 (Probability of the pattern xxx under CFN star tree 0t) The trifurcating star-tree 0t := (0t1) has topology label 0 and common branch length parameter 0t1 as shown in Figure 1(i). Either a direct application of Algorithm 2 with input as 0t := (0t1) or a substitution of 0t1 for 4t1, 4t2 and 4t3 in (6), yields the likelihood for pattern xxx as: The probability of the pattern xxx under CFN star tree 0t given by lxxx(0t) with the corresponding DAG expression shown in Figure 3 is an elementary function.
It would be convenient if guaranteed enclosures of the range of an elementary f can be obtained by the natural interval extension f of one of its expressions f. The following Theorem 4 is the work-horse of interval Monte Carlo algorithms. Theorem 4 (The fundamental theorem of interval analysis) Consider any elementary function f ∈ The fundamental implication of the above theorem is that it allows us to enclose the range of any elementary function and thereby produces an upper bound for the global maximum and a lower bound for the global minimum over any compact subset of the domain upon which the function is well-defined. This is the work-horse for rigorously constructing an envelope for rejection sampling. Unlike the natural interval extension of an f ∈
Definition 6 A function f: Theorem 5 (Range enclosure tightens linearly with mesh) Consider a function f : and Likelihood of a box of treesThe likelihood function (2) over trees with a DAG expression that is directly or indirectly obtained via Algorithm 2 has a natural interval extension over boxes of trees [5,26]. This interval extension of the likelihood function allows us to produce rigorous enclosures of the likelihood over a box in the tree space. Next we give a concrete example of the natural interval extension of the likelihood function over an interval of trees 0t in the star-tree space Example 3 (Posterior density over the CFN star-tree space Therefore, on the basis of (4), (5), (6) and (7), the likelihood of the data at the star-tree 0t ∈ the posterior density (3) based on a uniform prior p(0t1) = 1/10 over Thus, under our conveniently chosen uniform prior, the target posterior shape (without the normalizing constant) is simply the likelihood function, i.e. Observe that the minimal sufficient statistics over Thus, f maps an interval 0t in the tree space For the human, chimpanzee and gorilla mitochondrial sequence data [27]analyzed in [17], cxxx = 762 and v = 895. Figure 4 shows log(f(0t)) or the log-likelihood function for this data set as the white line. Evaluations of its interval extension over partitions by 3, 7 and 19 intervals are depicted by colored rectangles in Figure 4. Notice how the range enclosure by the interval extension of the log-likelihood function, our target shape, tightens with domain refinement as per Theorem 5. The maximum likelihood estimate derived in [17](the red dot in Figure 4) is Moore rejection sampler (MRS)Moore rejection sampler (MRS) is an auto-validating rejection sampler (RS). MRS is said to be auto-validating because it automatically obtains a proposal g that is easy to simulate from, and an envelope Suppose f is an elementary function and its DAG expression f has a well-defined interval extension f on For a given partition The necessary envelope condition (1) is satisfied by where the normalizing constant Before making formal statements about our sampler let us gain geometric insight into the sampler from Example 3 and Figure 4. The upper boundaries of rectangles of a given color, depicting a simple function in Figure 4, is a partition-specific envelope function (14) for the logarithm of the posterior shape or the log-likelihood function of Example 3 over the prior-specified support [10-10, 10] ⊂ Theorem 6 shows that Moore rejection sampler (MRS) indeed produces independent samples from the desired target and Theorem 7 describes the asymptotics of the acceptance probability as the partition of the domain is refined. Proofs for both Theorems are included in the Appendix for completeness. Theorem 6 Suppose that the DAG expression f of the target shape f has a well-defined natural interval extension f over Next we bound the partition-specific acceptance probability Therefore, If f ∈ Theorem 7 Let Theorem 7 shows that if f ∈ Prioritized partitions and pre-processed proposalsWe studied the efficiency of uniform partitions for their mathematical tractability. In practice, we may further increase the acceptance probability for a given partition size by adaptively partitioning We employ a priority queue to conduct sequential refinements of Once we have a partition 1. Sample a box t(i) ∈ 2. Sample a point t uniformly at random from the box t(i). Sampling from large discrete distributions (with million states or more) can be made faster by pre-processing the probabilities and saving the result in some convenient look-up table. This basic idea [28] allows samples to be drawn rapidly. We employ an efficient pre-processing strategy known as the Alias Method [4] that allows samples to be drawn in constant time even for very large discrete distributions as implemented in the GNU Scientific Library [29]. We also minimize the number of evaluations of the target shape f by saving the box-specific computations of Thus, by means of priority queues and look-up tables we can efficiently manage our adaptive partitioning of the domain for envelope construction, and rapidly draw samples from the proposal distribution. Our sampler class MRSampler implemented in MRS 0.1.2, a C++ class library for statistical set processing, builds on C-XSC 2.0, a C++ class library for extended scientific computing using interval methods [30]. All computations were done on a 2.8 GHz Pentium IV machine with 1 GB RAM. Having given theoretical and practical considerations to our Moore rejection sampler, we are ready to draw samples from various targets over small tree spaces. ResultsThe natural interval extension of the likelihood function over labeled boxes in the tree space allows us to employ the Moore rejection sampler to rigorously draw independent and identically distributed samples from the posterior distribution over a compact box in the tree space given by our prior distribution. We draw samples from the posterior distribution based on two mitochondrial DNA data sets and use these samples (i) to estimate the posterior probabilities of each of the three rooted topologies, (ii) to conduct a nonparametric test of rate homogeneity between protein-coding and tRNA-coding sites and (iii) to estimate the human-neanderthal divergence time. Human, chimpanzee and gorillaWe revisit the data from a segment of the mitochondrial DNA of human, chimpanzee and gorilla [27] that was analyzed under the CFN model of DNA mutation (Model 1) within a point estimation setting [17]. The sufficient statistics of pattern counts for this data with total number of sites v = 895 under the CFN model over the space of all three-leaved phylogenetic trees are: (cxxx, cxxy, cyxx, cxyx) = (762, 54, 41, 38) Let human, chimpanzee and gorilla be denoted by leaf labels 1, 2 and 3, or H, C and G, respectively. Let the set of rooted tree labels corresponding to (ii),(iii) and (iv) of Figure 1 be Recall that due to our flat priors, our posterior shape f(it):= f(it0, it1) with i ∈ The 95% confidence interval for jP, based on asymptotic normality of the Monte Carlo estimator, is Point estimate and a symmetric 95% confidence interval for the posterior probability of each of the three topologies from n = 106 posterior samples are These point estimates are in agreement with estimates obtained in [31,32] through quadrature routines in Mathematica. The first 10,000 of these samples are shown in Figure 5 upon transforming the rooted and clocked trees, it := (it0, it1), i ∈ {1, 2, 3}, into constrained unrooted trees, 4t := (4t1, 4t2, 4t3), according to Table 1. Table 1. Rooted triplets as constrained unrooted triplets
Obtaining confidence intervals from dependent MCMC samples requires nontrivial computations for the burn-in period and the thinning rate [1]. These are not readily available for phylogenetic MCMC samplers. Thus, the independent and identically distributed samples from our rejection sampler has the advantage of producing valid confidence intervals for our integrals of interest. The point estimate of the posterior mean Chimpanzee, gorilla and orangutanWe focus here on the 895 bp long homologous segment of mitochondrial DNA from chimpanzee, gorilla and orangutan [27]. This gives us a greater phylogenetic depth than the human, chimpanzee and gorilla sequences that were just analyzed. These sequences encode the genes for three transfer RNAs and parts of two proteins. Under the assumption of independence across sites, the sufficient statistics, under the JC model of DNA mutation (Model 2) over triplets, are given in Table 2 for all of the data as well as a partition of the data into tRNA-coding and protein-coding sites. Table 2. Minimal sufficient statistics for the chimpanzee, gorilla and orangutan data Ten thousand independent and identically distributed samples were drawn in 942 CPU seconds from the posterior distribution over JC triplets, i.e. unrooted trees with three edges corresponding to the three primates. Figure 6 shows these samples (blue dots) scattered about the verified global maximum likelihood estimate (MLE) of the triplet obtained in [5,26] and subsequently confirmed algebraically in [23]. We also drew ten thousand independent and identically distributed samples from the posterior based on the 198 tRNA-coding DNA sites (green dots in Figure 6) as well as from that based on the remaining 697 protein-coding sites (red dots in Figure 6). The former posterior samples, corresponding to the tRNA-coding sites, are more dispersed than the posterior samples based on the entire sequence. This is due to the smaller number of tRNA-coding sites making the posterior less concentrated. Moreover, the cluster of samples from the posterior based on tRNA-coding sites seem to be farther away from that based on protein-coding sites. Such a clustering of two sets of posterior samples is a signal of mutational rate heterogeneity between the two types of sites. Hotelling's trace statistics, being a natural measure of distance between two clusters of points, can be used as a test statistic to determine the significance of the observed test statistic. On the basis of 100 random permutations of the sites, we obtain the null distribution of Hotelling's trace statistics. We were able to reject the null hypothesis of rate homogeneity between the posterior samples based on the tRNA-coding sites and that based on the protein-coding sites at the 10% significance level using this permutation test (P-value = 0.06). Any biological interpretation of this test must be done cautiously since the JC model employed here forbids any transition:transversion bias that is reportedly relevant for this data [27].
Neanderthal, human and chimpanzeeWe used the 15 site patterns and their counts in Table 3 to infer the human-neanderthal divergence time. These counts are obtained from a multiple sequence alignment of the data made available in [33]. Our alignment procedure is more robust at the ends of each locus than that of [33]. We do an ordered concatenation of all the loci for each species prior to a multiple sequence alignment. The alignment was further edited by hand to obtain the locus-specific alignments. Under the assumption of independence across sites, the sufficient statistics, under any Markov model of DNA mutation, is the set of distinct site patterns and their respective counts. They are given in Table 3 for this data set. Table 3. Minimal sufficient statistics for the neanderthal, human and chimpanzee data We drew 10,000 samples that were independently and identically distributed from each of three posterior densities; (i) over the space of unrooted triplets under the JC model in 312 CPU seconds, (ii) over the clocked and rooted triplets under the JC model in 375 CPU seconds and (iii) over the clocked and rooted triplets under the HKY model in 1.2 CPU hours. In the HKY model we used the empirical nucleotide frequencies from the data (π(T) = 0.2588, π(C) = 0.2571, π(A) = 0.2916, π(G) = 0.1925) and a hominid-specific transition:transversion rate of 2.0. Unlike the JC model with five sufficient statistics (cxxx, cxxy, cyxx, cxyx, cxyz) = (2343, 56, 2, 4, 0), all 15 distinct site patterns are required for the likelihood computations under the HKY model and this is reflected in its longer CPU time. Both models gave similar posterior samples over rooted triplets, as shown in Figure 7.
We transformed the three posterior distributions over the triplet spaces; (i) unrooted JC triplets that were rooted using the mid-point rooting method, (ii) rooted JC triplets and (iii) rooted HKY triplets, respectively, into three posterior distributions over the human-neanderthal divergence time relative to the human-chimp divergence time. The corresponding posterior quantiles ({5%, 50%, 95%}) for the human-neanderthal divergence time in units of human-chimp divergence time are {0.0643, 0.125, 0.214}, {0.0694, 0.142, 0.263} and {0.0682, 0.143, 0.268}, respectively. We constrained the neanderthal lineage to be a fraction of the human lineage in branch length in order to estimate the age of the neanderthal fossil from the rooted HKY triplets. The posterior quantiles of the fossil date in units of human-chimp divergence is {0.00685, 0.0666, 0.195}. The estimate of 38; 310 years based on carbon-14 accelerator mass spectrometry [33] is within our [5%, 95%] posterior quantile interval for the fossil date, provided the human-chimp divergence estimate ranges in [196103, 5.6 × 106]. Thus, reasonable bounds for the human-chimp divergence are 4 × 106 and 5.6 × 106 years, under the assumption that 4 × 106 is an acceptable lower-bound. Based on these two calendar year estimates, we transformed the posterior quantiles of the human-neanderthal divergence times from the rooted HKY triplets into {272680, 571124, 1073375} and {381752, 799574, 1502724} years, respectively. Our [5%, 95%] posterior intervals contain the interval estimate of [461000, 825000] years reported in [33]. However, our confidence intervals are from perfectly independent samples from the posterior and account for the finite number of neanderthal sites that were successfully sequenced, unlike those obtained on the basis of a bootstrap of site patterns [34] or heuristic MCMC [1]. Unfortunately, our human-neanderthal divergence estimates are overestimates as they ignore the non-negligible time to coalescence of the human and neanderthal homologs within the human-neanderthal ancestral population. Improvements to our estimates based on the other 310 human and 4 chimpanzee homologs reported in [33] may be possible with more sophisticated models of populations within a phylogeny and needs further investigation. Chimpanzee, gorilla, orangutan and gibbonWe were able to draw samples from JC quartets on the basis of the mitochondrial DNA of chimpanzee, gorilla, orangutan and gibbon [27]. The data for all four primates can be summarized by 61 distinct site patterns [5]. Now, the problem is more challenging because there are three distinct tree topologies in the unrooted, bifurcating, quartet tree space, and each of these topologies has five edges. Thus, the domain of quartets is a piecewise Euclidean space that arises from a fusion of 3 distinct five dimensional orthants. Since the post-order traversals (Algorithm 2) specifying the likelihood function are topology-specific, we extended the likelihood over a compact box of quartets in a topology-specific manner. The computational time was about a day and a half to draw 10000 samples from the quartet target due to low acceptance probability of the naive likelihood function based on the 61 distinct site patterns. All the samples had the topology which grouped Chimp and Gorilla together, i.e. ((chimpanzee, gorilla), (orangutan, gibbon)). The samples (results not shown) were again scattered about the verified global MLE of the quartet [5]. This quartet likelihood function has an elaborate DAG with numerous operations. When the data got compressed into sufficient statistics, the efficiency increased tremendously (e.g. for triplets the efficiency increases by a factor of 3.7). This is due to the number of leaf nodes in the target DAG, which encode the distinct site patterns of the observed data into the likelihood function, getting reduced from 29 to 5 for the triplet target and from 61 to 15 for the quartet target [24]. DiscussionInterval methods provide for a rigorous sampling from posterior target densities over small phylogenetic tree spaces. When one substitutes conventional floating-point arithmetic for real arithmetic in a computer and uses discrete lattices to construct the envelope and/or proposal, it is generally not possible to guarantee the envelope property, and thereby ensure that samples are drawn from the desired target density, except in special cases [35]. Thus, the construction of the Moore rejection sampler through interval methods, that enclose the target shape over the entire real continuum in any box of the domain with machine-representable bounds, in a manner that rigorously accounts for all sources of numerical errors (see [36] for a discussion on error control), naturally guarantees that the Moore rejection samples are independent draws from the desired target. Moreover, the target is allowed to be multivariate and/or non-log-concave with possibly 'pathological' behavior, as long as it has a well-defined interval extension. The efficiency of MRS is not immune to the curse of dimensionality and target DAG complexity. When the DAG expression for the likelihood gets large, its natural interval extension can have terrible over-enclosures of the true range, which in turn forces the adaptive refinement of the domain to be extremely fine for efficient envelope construction. Thus, a naive application of interval methods to targets with large DAGs can be terribly inefficient. In such cases, sampler efficiency rather than rigor is the issue. Thus, one may fail to obtain samples in a reasonable time, rather than (as may happen with non-rigorous methods) produce samples from some unknown and undesired target. There are several ways in which efficiency can be improved for such cases. First, the particular structure of the target DAG should be exploited to avoid any redundant computations. For example, sufficient statistics must be used to dissolve symmetries in the DAG. Second, we can further improve efficiency by limiting ourselves to differentiable targets in Cn. Tighter enclosures of the range of f(t(i)) with f(t(i)) can come from the enclosures of Taylor expansions of f around the midpoint mid (t(i)) through interval-extended automatic differentiation (e.g. [36]) that can then yield tighter estimates of the integral enclosures [37]. Third, we can employ pre-processing to improve efficiency. For example, we can pre-enclose the range of a possibly rescaled f over a partition of the domain and then obtain the enclosure of f over some arbitrary t through a combination of hash access and hull operations on the pre-enclosures. Such a pre-enclosing technique reduces not only the overestimation of target shapes with large DAGs but also the computational cost incurred while performing interval operations with processors that are optimized for floating-point arithmetic. In the next version of the MRS library we plan to extend interval arithmetic beyond Poor sampler efficiency makes it currently impractical to sample from trees with five leaves and 15 topologies. However, one could use such triplets and quartets drawn from the posterior distribution to stochastically amalgamate and produce estimates of larger trees via fast amalgamating algorithms (e.g. [39,40]), which may then be used to combat the slow mixing in MCMC methods [2] by providing a good set of initial trees. A collection of large trees obtained through such stochastic amalgamations would account for the effect of finite sample sizes (sequence length) as well as the sensitivity of the amalgamating algorithm itself to variation in the input vector of small tree estimates. It would be interesting to investigate if such stochastic amalgamations can help improve mixing of MCMC algorithms on large tree spaces, albeit auto-validating rejection sampling via the natural interval extension of the likelihood function may not be practical for trees with more than four leaves. ConclusionNone of the currently available punctual samplers can rigorously produce independent and identically distributed samples from the posterior distribution over phylogenetic tree spaces, even for 3 or 4 taxa. We describe a new approach for rigorously drawing samples from a target posterior distribution over small phylogenetic tree spaces using the theory of interval analysis. Our Moore rejection sampler (MRS), being an auto-validating von Neumann rejection sampler (RS), can produce independent samples from any target shape f whose DAG expression f has a well-defined natural interval extension f over a compact domain Competing interestsThe authors declare that they have no competing interests. Authors' contributionsRS developed the basic algorithm, analyzed the data and wrote the first draft. TY improved the object-oriented interface and refined the final implementation of the algorithm. Both authors edited the manuscript. AppendixLikelihoods for the CFN model on unrooted tripletsRecall that the probability that Y mutates to R, or vice versa, in time t is a(t):= (1 - e-2t)/2 and the stationary distribution π(R) = π(Y) = 1/2. Next we apply Algorithm 2 to compute the likelihood Proof of Theorem 1 (cf. [37])Since any real arithmetic operation x ⋆ y, where ⋆ ∈ {+, - ×,/} and x, y ∈ ℝ, is a continuous function x ⋆y := ⋆(x, y): ℝ ⊗ ℝ ↦ ℝ, except when y = 0 under / operation. Since x and y are simply connected compact intervals, so is their Cartesian product x ⊗ y. On such a domain x ⊗ y, the continuity of ⋆(x, y) (except when ⋆ =/and 0 ∈ y) ensures the attainment of a minimum, a maximum and all intermediate values. Therefore, with the exception of the case when ⋆ = / and 0 ∈ y, the range x ⋆ y has an interval form [min (x ⋆y), max (x ⋆y)], where the min and max are taken over all pairs (x, y) ∈ x ⊗ y. Fortunately, we do not have to evaluate x ⋆y over every (x, y) ∈ x ⊗ y to find the global min and global max of ⋆(x, y) over x ⊗ y, because the monotonicity of the ⋆(x, y*) in terms of x ∈ x for any fixed y* ∈ y implies that the extremal values are attained on the boundary of x ⊗ y, i.e. the set {x, y, Proof of Theorem 2x ⋆ y = {x ⋆y : x ∈ x, y ∈ y} ⊆ {x ⋆y : x ∈ x', y ∈ y'} = x' ⋆ y'. Proof of Theorem 3 (cf. [37])Since f(y) is well-defined, we will not run into division by zero, and therefore (i) follows from the repeated invocation of Theorem 2. We can prove (ii) by contradiction. Suppose range(f; x) ⊈ f(x). Then there exists x ∈ x, such that f(x) ∈ range(f; x) but f(x) ∉ f(x). This in turn implies that f(x) = f([x, x]) ∉ f(x), which contradicts (i). Therefore, our supposition cannot be true and we have proved (ii) range(f; x) ⊆ f(x). Proof of Theorem 4 (cf. [37])Any elementary function f ∈ The range enclosure is a consequence of inclusion isotony by an argument identical to that given in the proof for Theorem 3. Proof of Theorem 5 (cf. [37])The proof is given by an induction on the DAG for f similar to the proof of Theorem 4 (See [37]). Proof of Theorem 6Let the domain Algorithm 1 first produces a sample from the random vector (V, U) that is uniformly distributed in Since we sample a height u for a given v from the Uniform [0, Therefore, Thus, we have shown that the joint density of the random vector (V, U) initially produced by Algorithm 1 is uniformly distributed on Now, let (T, S) be the accepted random vector during the accept/reject step of Algorithm 1, i.e. Then, the uniform distribution of (V, U) on Thus, we have shown that the accepted random vector T has the desired density f•. Proof of Theorem 7Due to Theorem 5, Therefore and we have Therefore the lower bound for the acceptance probability A( AcknowledgementsR.S. is a Research Fellow of the Royal Commission for the Exhibition of 1851. This was partly supported by a joint NSF/NIGMS grant DMS-02-01037. Many thanks to Rob Strawderman, Warwick Tucker and Stephane Aris-Brosou for constructive comments, Joe Felsenstein for clarifying the transition probabilities under the HKY model and Ziheng Yang for various clarifications and encouragement. References
Have something to say? Post a comment on this article! |





on Google Scholar









author email
corresponding author email










Figure 1.
















































Figure 2.









Figure 3.



Figure 4.

















































Figure 5.
Figure 6.
Figure 7.






















