Solving the Master Equation for Indels Ian H

Total Page:16

File Type:pdf, Size:1020Kb

Solving the Master Equation for Indels Ian H Holmes BMC Bioinformatics (2017) 18:255 DOI 10.1186/s12859-017-1665-1 COMMENTARY Open Access Solving the master equation for Indels Ian H. Holmes Abstract Background: Despite the long-anticipated possibility of putting sequence alignment on the same footing as statistical phylogenetics, theorists have struggled to develop time-dependent evolutionary models for indels that are as tractable as the analogous models for substitution events. Main text: This paper discusses progress in the area of insertion-deletion models, in view of recent work by Ezawa (BMC Bioinformatics 17:304, 2016); (BMC Bioinformatics 17:397, 2016); (BMC Bioinformatics 17:457, 2016) on the calculation of time-dependent gap length distributions in pairwise alignments, and current approaches for extending these approaches from ancestor-descendant pairs to phylogenetic trees. Conclusions: While approximations that use finite-state machines (Pair HMMs and transducers) currently represent the most practical approach to problems such as sequence alignment and phylogeny, more rigorous approaches that work directly with the matrix exponential of the underlying continuous-time Markov chain also show promise, especially in view of recent advances. Keywords: Phylogenetics, Alignment, Indels Background transmission dynamics [28], reconstruct key transmission Models of sequence evolution, formulated as continuous- events [29], and predict future evolutionary trends [30]. time discrete-state Markov chains, are central to statis- There are many other applications; the ones listed above tical phylogenetics and bioinformatics. As descriptions were selected to give some idea of how influential these of the process of nucleotide or amino acid substitu- models have been. tion, their earliest uses were to estimate evolutionary Continuous-time Markov chains describe evolution in distances [1], parameterize sequence alignment algo- astatespace, for example the set of nucleotides rithms [2], and construct phylogenetic trees [3]. Variations ={A,C,G,T}. The stochastic process φ(t) at any given on these models, including extra latent variables, have instant of time, t, takes one of the values in .Letp(t) be a been used to estimate spatial variation in evolutionary vector describing the marginal probability distribution of rates [4, 5]; these patterns of spatial variation have been the process at a single point in time: pi(t) = P(φ(t) = i). used to predict exon structures of protein-coding genes The time-evolution of this vector is governed by a master [6, 7], foldback structure of non-coding RNA genes equation [8, 9], regulatory elements [10], ultra-conserved elements d [11], protein secondary structures [12], and transmem- p(t) = p(t)R (1) brane structures [13]. They are widely used to reconstruct dt ancestral sequences [14–22], a method that is finding where, for i, j ∈ and i = j, Ri,j is the instantaneous increasing application in synthetic biology [16, 20–22]. rate of mutation from state i to state j. For probabilistic Trees built using substitution models used to classify normalization of Eq. 1, it is then required that species [23], predict protein function [24], inform con- R =− R servation efforts [25], or identify novel pathogens [26]. In i,i i,j ∈ = the analysis of rapidly evolving pathogens, these meth- j ,j i ods are used to uncover population histories [27], analyze The probability distribution of this process at equilib- rium is given by the vector π, which must satisfy the Correspondence: [email protected] equation Dept of Bioengineering, University of California, 94720 Berkeley, USA πR = 0 © The Author(s). 2017 Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated. Holmes BMC Bioinformatics (2017) 18:255 Page 2 of 10 The general solution to Eq. 1 can be written p(t) = As mentioned above, this mathematical approach is p(0)M(t) where M(t) is the matrix exponential fundamental to statistical phylogenetics and many appli- cations in bioinformatics. For small state spaces ,such ( ) = ( ) M t exp Rt (2) as (for example) the 20 amino acids or 61 sense codons, the matrix exponential M(t) in Eq. 2 can be solved exactly Entry Mi,j(t) of this matrix is the probability P(φ(t) = j|φ(0) = i) that, conditional on starting in state i,the and practically by the technique of spectral decomposi- system will after time t be in state j.Itfollows,bydefini- tion (i.e. finding eigenvalues and eigenvectors). Such an tion, that this matrix satisfies the Chapman-Kolmogorov approach informs the Dayhoff PAM matrix. It was also forward equation: solved for certain specific parametric forms of the rate matrix R by Jukes and Cantor [1], Kimura [31], Felsenstein M(t)M(u) = M(t + u) (3) [3], and Hasegawa et al. [32], among others. This approach is used by all likelihood-based phylogenetics tools, such ( ) That is, if Mi,j t is the probability that state i will, after a as RevBayes [33], BEAST [34], RAxML [35], HyPhy [36], ( ) finite time interval t,haveevolvedintostatej,andMj,k u PAML [37], PHYLIP [38], TREE-PUZZLE [39], and XRate is the analogous probability that state j will after time u [40]. Many more bioinformatics tools use the Dayhoff evolve into state k, then summing out j has the expected PAM matrix or other substitution matrix based on an result: underlying master equation of the form Eq. 1. ( ) ( ) = ( + ) ∀ ∈ Mi,j t Mj,k u Mi,k t u i, k Homogeneity, stationarity, and reversibility j∈ There exists a deep literature on Markov chains, to which This is one way of stating the defining property of a this brief survey cannot remotely do justice, but several Markov chain: its lack of historical memory previous to its concepts must be mentioned in order to survey progress current state. Equation 1 is just an instantaneous version in this area. of this equation, and Eq. 3 is the same equation in matrix A Markov chain is time-homogeneous if the elements form. of the rate matrix R in Eq. 1 are themselves independent The conditional likelihood for an ancestor-descendant of time. If a Markov chain is time-homogeneous and is pair can be converted into a phylogenetic likelihood for a known to be in equilibrium at a given time, for example ( ) =π set of extant taxon states S related by a tree T, as follows. p 0 , then (absent any other constraints) it will be in (I assume for convenience that T is a binary tree, though equilibrium at all times; such a chain is referred to as being relaxing this constraint is straightforward.) stationary. To compute the likelihood requires that one first com- The time-scaling of these models is somewhat arbitrary: /κ putes, for every node n in the tree, the probability F (n) if the time parameter t is replaced by a scaled version t , i κ of all observed states at leaf nodes descended from node while the rate matrix R is replaced by R , then the likeli- n, conditioned on node n being in state i. This is given by hood in Eq. 2 is unchanged. For some models, the rate is Felsenstein’s pruning recursion: allowed to vary between sites [4, 5]. A Markov chain is reversible if it satisfies the instanta- ( )( ) ◦ ( )( ) neous detailed balance condition π R =π R ,orits ( )= M tnl F l M tnr F r if n is an internal node with children l, r i i,j j j,i F n π =π (sn) if n is a leaf node in state sn finite-time equivalent iMi,j jMj,i.Thisamountstoa (4) symmetry constraint on the parameter space of the chain (specifically, the matrix S with elements Si,j = πi/πjRi,j where tmn denotes the length of the branch from tree node is symmetric) which has several convenient advantages: m to tree node n. I have used the notation ( j) for the it effectively halves the number of parameters that must unit vector in dimension j,andthesymbol◦ to denote the be determined, it eases some of the matrix manipulations Hadamard product (also known as the pointwise product), (symmetric matrices have real eigenvalues and the algo- defined such that for any two vectors u, v of the same size: rithms to find them are generally more stable), and it (u ◦ v)i =uivi. allows for some convenient manipulations, such as the so- Supposing that node 1 is the root node of the tree, and called pulley principle allowing for arbitrary re-rooting of that the distribution of states at this root node is given by the tree [3]. From another angle, however, these supposed ρ, the likelihood can be written as advantages may be viewed as drawbacks: reversibility is a simplification which ignores some unreversible aspects ( | ρ) =ρ · ( ) P S T, R, F 1 (5) of real data, limits the expressiveness of the model, and where u ·v denotes the scalar product of u and v.Itiscom- makes the root node placement statistically unidentifiable. mon to assume that the root node is at equilibrium, so that Stationarity has similar advantages and drawbacks. If ρ =π. one assumes the process was started at equilibrium, that is Holmes BMC Bioinformatics (2017) 18:255 Page 3 of 10 one less set of parameters to worry about (since the equi- publications by Ezawa [53–55] and Rivas and Eddy [56] librium distribution is implied by the process itself), but have highlighted this problem once again, directly leading it also renders the model less expressive and makes some to the present review.
Recommended publications
  • BMC Bioinformatics Biomed Central
    BMC Bioinformatics BioMed Central Software Open Access XRate: a fast prototyping, training and annotation tool for phylo-grammars Peter S Klosterman1, Andrew V Uzilov1, Yuri R Bendaña1, Robert K Bradley1, Sharon Chao1, Carolin Kosiol2,3, Nick Goldman2 and Ian Holmes*1 Address: 1Department of Bioengineering, University of California, Berkeley CA, USA, 2European Bioinformatics Institute, Hinxton, Cambridgeshire, UK and 3Department of Biological Statistics and Computational Biology, Cornell University, Ithaca NY, USA Email: Peter S Klosterman - [email protected]; Andrew V Uzilov - [email protected]; Yuri R Bendaña - [email protected]; Robert K Bradley - [email protected]; Sharon Chao - [email protected]; Carolin Kosiol - [email protected]; Nick Goldman - [email protected]; Ian Holmes* - [email protected] * Corresponding author Published: 03 October 2006 Received: 24 February 2006 Accepted: 03 October 2006 BMC Bioinformatics 2006, 7:428 doi:10.1186/1471-2105-7-428 This article is available from: http://www.biomedcentral.com/1471-2105/7/428 © 2006 Klosterman et al; licensee BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Abstract Background: Recent years have seen the emergence of genome annotation methods based on the phylo-grammar, a probabilistic model combining continuous-time Markov chains and stochastic grammars. Previously, phylo-grammars have required considerable effort to implement, limiting their adoption by computational biologists. Results: We have developed an open source software tool, xrate, for working with reversible, irreversible or parametric substitution models combined with stochastic context-free grammars.
    [Show full text]
  • Developing and Applying Heterogeneous Phylogenetic Models with Xrate
    Developing and Applying Heterogeneous Phylogenetic Models with XRate Oscar Westesson, Ian Holmes* Department of Bioengineering, University of California, Berkeley, California, United States of America Abstract Modeling sequence evolution on phylogenetic trees is a useful technique in computational biology. Especially powerful are models which take account of the heterogeneous nature of sequence evolution according to the ‘‘grammar’’ of the encoded gene features. However, beyond a modest level of model complexity, manual coding of models becomes prohibitively labor-intensive. We demonstrate, via a set of case studies, the new built-in model-prototyping capabilities of XRate (macros and Scheme extensions). These features allow rapid implementation of phylogenetic models which would have previously been far more labor-intensive. XRate ’s new capabilities for lineage-specific models, ancestral sequence reconstruction, and improved annotation output are also discussed. XRate ’s flexible model-specification capabilities and computational efficiency make it well-suited to developing and prototyping phylogenetic grammar models. XRate is available as part of the DART software package: http://biowiki.org/DART. Citation: Westesson O, Holmes I (2012) Developing and Applying Heterogeneous Phylogenetic Models with XRate. PLoS ONE 7(6): e36898. doi:10.1371/ journal.pone.0036898 Editor: Christos A. Ouzounis, The Centre for Research and Technology, Hellas, Greece Received October 18, 2011; Accepted April 9, 2012; Published June 5, 2012 Copyright: ß 2012 Westesson, Holmes. This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. Funding: This research was funded from an NIH Research Project Grant Program (R01).
    [Show full text]
  • Downloaded from Downloads/Clades
    UC Berkeley UC Berkeley Electronic Theses and Dissertations Title Statistical phylogenetic methods with applications to virus evolution Permalink https://escholarship.org/uc/item/362312kp Author Westesson, Oscar Publication Date 2012 Peer reviewed|Thesis/dissertation eScholarship.org Powered by the California Digital Library University of California Statistical phylogenetic methods with applications to virus evolution by Oscar Westesson A dissertation submitted in partial satisfaction of the requirements for the degree of Joint Doctor of Philosophy with University of California, San Francisco in Bioengineering in the Graduate Division of the University of California, Berkeley Committee in charge: Professor Ian Holmes, Chair Professor Rasmus Nielsen Professor Joe DeRisi Fall 2012 Statistical phylogenetic methods with applications to virus evolution Copyright 2012 by Oscar Westesson 1 Abstract Statistical phylogenetic methods with applications to virus evolution by Oscar Westesson Joint Doctor of Philosophy with University of California, San Francisco in Bioengineering University of California, Berkeley Ian Holmes, Chair This thesis explores methods for computational comparative modeling of genetic sequences. The framework within which this modeling is undertaken is that of sequence alignments and associated phylogenetic trees. The first part explores methods for building ancestral sequence alignments making explicit use of phylogenetic likelihood functions. New capabilities of an existing MCMC alignment sampler are discussed in detail, and the sampler is used to analyze a set of HIV/SIV gp120 proteins. An approximate maximum-likelihood alignment method is presented, first in a tutorial-style format and later in precise mathematical terms. An implementation of this method is evaluated alongside leading alignment programs. The second part describes methods utilizing multiple sequence alignments.
    [Show full text]
  • L BRAR IS 2012 Massachusetts Institute of Technology
    Identifying protein-coding genes and synonymous constraint elements using phylogenetic codon models by Michael F. Lin S.B. (2005), M.Eng. (2006), Massachusetts Institute of Technology Submitted to the Department of Electrical Engineering and Computer Science in partial fulfillment of the requirements for the degree of Doctor of Philosophy in Computer Science fMACHUSETS INSTITUTE OF TECHNOLOGY at the MASSACHUSETTS INSTITUTE OF TECHNOLOGY MAR February 2012 L BRAR IS 2012 Massachusetts Institute of Technology. All rights reserved ARCHIVES Signature of Author......................... Department of Electrical Engineering and Computer Science January 30, 2012 Certified by........................................ .......... Manolis Kellis Associate Professor of Electrical Engineering and Computer Science Thesis Supervisor ~f" I Accepted by........................... Professor Lie0. Kolodziejski Chair of the Committee on Graduate Students Identifying protein-coding genes and synonymous constraint elements using phylogenetic codon models by Michael F. Lin Submitted to the Department of Electrical Engineering and Computer Science on January 30, 2012 in partial fulfillment of the requirements for the degree of Doctor of Philosophy in Computer Science Abstract We develop novel methods for comparative genomics analysis of protein-coding genes using phylogenetic codon models, in pursuit of two main lines of biological investigation: First, we develop PhyloCSF, an algorithm based on empirical phylogenetic codon mod- els to distinguish protein-coding and non-coding regions in multi-species genome align- ments. We benchmark PhyloCSF to show that it outperforms other methods, and we apply it to discover novel genes and analyze existing gene annotations in the human, mouse, zebrafish, fruitfly and fungal genomes. We use our predictions to revise the canonical annotations of these genomes in collaboration with GENCODE, FlyBase and other cura- tors.
    [Show full text]
  • Developing and Applying Heterogeneous Phylogenetic Models with Xrate Oscar Westesson1, Ian Holmes2,∗
    Phylogenetic modeling with XRate 1 Developing and applying heterogeneous phylogenetic models with XRate Oscar Westesson1, Ian Holmes2;∗ Department of Bioengineering, University of California, Berkeley, CA, USA 1 [email protected] 2 [email protected] ∗ Corresponding author Abstract Modeling sequence evolution on phylogenetic trees is a useful technique in computational biology. Espe- cially powerful are models which take account of the heterogeneous nature of sequence evolution according to the \grammar" of the encoded gene features. However, beyond a modest level of model complexity, manual coding of models becomes prohibitively labor-intensive. We demonstrate, via a set of case studies, the new built-in model-prototyping capabilities of XRate (macros and Scheme extensions). These features allow rapid implementation of phylogenetic models which would have previously been far more labor-intensive. XRate's new capabilities for lineage-specific models, ancestral sequence reconstruction, and improved annotation output are also discussed. XRate's flexible model-specification capabilities and computational efficiency make it well-suited to de- veloping and prototyping phylogenetic grammar models. XRate is available as part of the DART software package: http://biowiki.org/DART . Introduction Phylogenetics, the modeling of evolution on trees, is an extremely powerful tool in computational biology. arXiv:1202.3834v1 [q-bio.QM] 17 Feb 2012 The better we can model a system, the more can learn from it, and vice-versa. Especially attractive, given the plethora of available sequence data, is modeling sequence evolution at the molecular level. Models describing the evolution of a single nucleotide began simply (e.g. JC69 [1]), later evolving to capture such biological features as transition/transversion bias (e.g.
    [Show full text]
  • Approximation of Indel Evolution by Differential Calculus of Finite State
    bioRxiv preprint doi: https://doi.org/10.1101/2020.06.29.178764; this version posted July 2, 2020. The copyright holder for this preprint (which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made available under aCC-BY-NC-ND 4.0 International license. Approximation of Indel Evolution by Differential Calculus of Finite State Automata Ian Holmes, Department of Bioengineering, University of California, Berkeley July 1, 2020 Abstract We introduce a systematic method of approximating finite-time tran- sition probabilities for continuous-time insertion-deletion models on se- quences. The method uses automata theory to describe the action of an infinitesimal evolutionary generator on a probability distribution over alignments, where both the generator and the alignment distribution can be represented by Pair Hidden Markov Models (Pair HMMs). In gen- eral, combining HMMs in this way induces a multiplication of their state spaces; to control this, we introduce a coarse-graining operation to keep the state space at a constant size. This leads naturally to ordinary dif- ferential equations for the evolution of the transition probabilities of the approximating Pair HMM. The TKF model emerges as an exact solution to these equations for the special case of single-residue indels. For the general case, the equations can be solved by numerical integration. Using simulated data we show that the resulting distribution over alignments, when compared to previous approximations, is a better fit over a broader range of parameters. We also propose a related approach to develop dif- ferential equations for sufficient statistics to estimate the underlying in- stantaneous indel rates by Expectation-Maximization.
    [Show full text]
  • Article Maximum-Likelihood Tree Estimation Using Codon
    View metadata, citation and similar papers at core.ac.uk brought to you by CORE Maximum-Likelihood Tree Estimation Using Codon provided by ZHAW digitalcollection Substitution Models with Multiple Partitions Stefan Zoller,1,2 Veronika Boskova,1 and Maria Anisimova*,3 1Computational Biochemistry Research Group, ETH Zurich,€ Zurich,€ Switzerland 2Swiss Institute of Bioinformatics, Switzerland 3Institute of Applied Simulations, School of Life Sciences and Facility Management, Zurich University of Applied Sciences, Wadenswil,€ Switzerland *Corresponding author: E-mail: [email protected]. Associate editor: Willie Swanson Abstract Many protein sequences have distinct domains that evolve with different rates, different selective pressures, or may differ in codon bias. Instead of modeling these differences by more and more complex models of molecular evolution, we present a multipartition approach that allows maximum-likelihood phylogeny inference using different codon models at predefined partitions in the data. Partition models can, but do not have to, share free parameters in the estimation process. We test this approach with simulated data as well as in a phylogenetic study of the origin of the leucin-rich repeat regions in the type III effector proteins of the pythopathogenic bacteria Ralstonia solanacearum. Our study does not only show that a simple two-partition model resolves the phylogeny better than a one-partition model but also gives more evidence supporting the hypothesis of lateral gene transfer events between the bacterial pathogens and its eu- karyotic hosts. Key words: amino acid substitution model, codon substitution model, Markov model, maximum-likelihood tree. many proteins have distinct domains which evolve with dif- Introduction ferent rates, different selective pressures and may differ in Phylogeny inference from molecular data became essential in codon bias (Adzhubei et al.
    [Show full text]