 Research article
 Open Access
 Published:
General continuoustime Markov model of sequence evolution via insertions/deletions: are alignment probabilities factorable?
BMC Bioinformatics volume 17, Article number: 304 (2016)
Abstract
Background
Insertions and deletions (indels) account for more nucleotide differences between two related DNA sequences than substitutions do, and thus it is imperative to develop a stochastic evolutionary model that enables us to reliably calculate the probability of the sequence evolution through indel processes. Recently, indel probabilistic models are mostly based on either hidden Markov models (HMMs) or transducer theories, both of which give the indel component of the probability of a given sequence alignment as a product of either probabilities of columntocolumn transitions or blockwise contributions along the alignment. However, it is not a priori clear how these models are related with any genuine stochastic evolutionary model, which describes the stochastic evolution of an entire sequence along the timeaxis. Moreover, currently none of these models can fully accommodate biologically realistic features, such as overlapping indels, powerlaw indellength distributions, and indel rate variation across regions.
Results
Here, we theoretically dissect the ab initio calculation of the probability of a given sequence alignment under a genuine stochastic evolutionary model, more specifically, a general continuoustime Markov model of the evolution of an entire sequence via insertions and deletions. Our model is a simple extension of the general “substitution/insertion/deletion (SID) model”. Using the operator representation of indels and the technique of timedependent perturbation theory, we express the ab initio probability as a summation over all alignmentconsistent indel histories. Exploiting the equivalence relations between different indel histories, we find a “sufficient and nearly necessary” set of conditions under which the probability can be factorized into the product of an overall factor and the contributions from regions separated by gapless columns of the alignment, thus providing a sort of generalized HMM. The conditions distinguish evolutionary models with factorable alignment probabilities from those without ones. The former category includes the “long indel” model (a spacehomogeneous SID model) and the model used by Dawg, a genuine sequence evolution simulator.
Conclusions
With intuitive clarity and mathematical preciseness, our theoretical formulation will help further advance the ab initio calculation of alignment probabilities under biologically realistic models of sequence evolution via indels.
Background
The evolution of DNA, RNA and protein sequences is driven by mutations such as base substitutions, insertions and deletions (indels), recombination and other genomic rearrangements (e.g., [1–3]). Some recent comparative genomic analyses revealed that indels account for more base differences between closely related genomes than base substitutions do (e.g., [4–7]). It is therefore imperative to develop a method to reliably calculate the probability of sequence evolution via mutations including indels. Since the groundbreaking works by Bishop and Thompson [8] and by Thorne, Kishino and Felsenstein [9], many studies have been made to calculate the probabilities of pairwise alignments (PWAs) and multiple sequence alignments (MSAs) under probabilistic models aiming to incorporate the effects of indels. And the methods have greatly improved in terms of the computational efficiency and the scope of application (reviewed, e.g., in [10–12]). Most of these studies are based on hidden Markov models (HMMs) (e.g., [13]) or transducer theories (e.g., [14]). Even today, the studies on these methods are steadily advancing (e.g., [15, 16]), and it seems that their mathematical and algorithmic bases are about to be established.
However, it is important to remember that these desirable properties alone are not sufficient for a model in natural science to be satisfactory. In addition to having the mathematical (or algorithmic) soundness, a satisfactory model must also approximate well, or at least decently, the real phenomena it is intended to describe. In the case of an indel probabilistic model, there are two key elements for this requisite: one is the evolutionary consistency of the model, and the other is the model’s flexibility to accommodate various biologically realistic features, i.e., the biological realism, of indels.
Let us first explain the evolutionary consistency. In natural sequence evolution, the probability (density) of an indel process must be given vertically, as a multiplicative accumulation of the probabilities of transitions between states of an entire sequence, each from one time point to the next one, along the time axis (or along a phylogenetic tree when dealing with MSAs) (Fig. 1a). If a probabilistic model gives the probability density of each evolutionary process according to this natural design, we call it a “genuine stochastic evolutionary model”, or simply an “evolutionary model” for short. And we will consider an indel probabilistic model as “evolutionarily consistent”, if its alignment probabilities can be derived directly from an evolutionary model, even if it does not appear to follow the aforementioned natural design. By definition, each of HMMs and transducers calculates (the indel component of) an alignment probability horizontally, as a product of either intercolumn transition probabilities or blockwise contributions (Fig. 1c). Therefore, it is a priori unclear whether each HMM or transducer is evolutionarily consistent or not, or, if it is, how (Fig. 1). It would be worth mentioning that some models were indeed derived explicitly from some sorts of evolutionary models (e.g., [9, 17, 18]). Unfortunately, all such studies in the past imposed some unnatural assumptions, such as the prohibition of overlapping indels and the restriction of deletions to singlebase ones. Such assumptions were necessary for an alignment probability to be trivially factorable, at least as a product of blockwise contributions. Thus, they are unsatisfactory from the viewpoint of the second key element, i.e., the biological realism.
Regarding the biological realism, past empirical studies revealed some properties of real indels, in addition to their possibilities to affect multiple contiguous residues at a time and to overlap others. Among the most important would be the studies that showed powerlaw distributions of indel lengths (see, e.g., [19] and references therein). On the contrary, standard HMMs and transducers can usually implement geometric distributions of indel lengths, or at best mixed geometric distributions (e.g., [20]), but cannot implement the powerlaw distributions themselves. But some generalized HMMs (or transducers) (e.g., [21, 22]) can incorporate powerlaw indel length distributions. For example, the HMM of Kim and Sinha [22] is quite flexible, and it can incorporate the powerlaw distributions and also do away with the commonly imposed timereversibility. As discussed e.g., in [21] and [23], there is no biological reason for imposing the time reversibility, and they were usually imposed to reduce the computational time. In this sense, the HMM of Kim and Sinha is two steps closer to the biological reality than the standard HMMs (and transducers). Unfortunately, similarly to the standard HMMs and transducers, their HMM is not evolutionarily consistent and thus cannot correctly handle overlapping indels along the same branch, though they can handle overlapping indels along different branches. Another possibly important biologically realistic feature is the indel rate variation across sites (or regions) (e.g., [24]), due to selection and the mutational predispositions (caused, e.g., by the sequence or epigenetic contexts). Thus far, attempts to incorporate this feature have been rare (e.g., [25]), and most studies have handled spacehomogeneous models, whose indel rates are homogeneous along the sequence.
As far as we know, except the models implemented in some genuine sequence evolution simulators (e.g., [26–28]), there is only one class of genuine stochastic evolutionary models discussed thus far that is also considerably biologically realistic, which are the “substitution/insertion/deletion (SID) models” proposed by Miklós et al. [21]. The SID models in general do not impose the aforementioned unnatural restrictions on indels. Moreover, the general SID model can accommodate any indel length distributions, and also some indel rate variations across sites (albeit through the residue state context alone). Unfortunately, however, we have not seen any further theoretical development of the general SID model since it was proposed. Instead, Miklós et al. developed the “long indel” model [21], which is a spacehomogeneous, timereversible SID model. (More precisely, the insertion rate depends on the inserted sequence only through the product of the frequencies of its constituent residues. As mentioned above, the timereversibility was introduced just for computational convenience, and it could be dispensed with if desired.) And they gave a verbal justification that the probability of a PWA under the “long indel” model can be calculated via a generalized HMM, as a product of contributions from “chopzones” delimited by gapless columns. In the present viewpoint, this is the most satisfactory HMM that we know was used for actual sequence analyses, because it satisfies both the evolutionary consistency and the biological realism to some degree. Nevertheless, their justification, although plausible, has two problems. First, it is unclear exactly how their HMM is related to the ab initio probabilities of evolutionary (especially indel) processes under their evolutionary model. And second, their justification takes advantage of the spacehomogeneity of the model, which makes it unclear how their HMM can be extended to be spaceheterogeneous while keeping the evolutionary consistency. To solve these two problems, we need at least to get back to their origin, i.e., the general SID model. It seems, however, that this model has never been theoretically dissected thus far, possibly due to the lack of mathematical or conceptual tools to handle it easily.
In this study, we examine a general continuoustime Markov model of the evolution of an entire sequence via insertions, deletions and substitutions. This model could be regarded as an extension of the general SID model, in the sense that it allows explicit (or inherent) rate variation across sites, not only due to residue state contexts. Such rate variation could be regarded as the effect of, e.g., the epigenetic context and/or the context within the 3D structure of the protein product (e.g., [25]).^{Footnote 1} To theoretically dissect the ab initio calculation of alignment probabilities under this model, we introduce some useful tools. Among the most important would be the operator representation of mutations, namely, insertions, deletions and substitutions. This enabled us to shift our focus from the trajectory of sequence states, which played a central role in [21], to the history of mutations (especially indels). Moreover, the operator representation enabled to algebraically define the equivalence relationships between two different series of indels. They, in cooperation with the focus shift, enabled to define the local history set (LHS) equivalence classes. These equivalence classes play an essential role when deriving the “sufficient and nearly necessary” set of conditions under which alignment probabilities are indeed factorable, thus providing a sort of generalized HMM. We also adapt techniques from the timedependent perturbation expansion in quantum mechanics [29, 30], expanding each alignment probability into a summation over contributing mutational histories with different numbers of indels. It should be noted, however, that we formally deal with all terms in the expansion.^{Footnote 2} Thus, at least formally, the probabilities we deal with are exact solutions of the model’s defining equation. For clarity, we will focus on insertions/deletions in the bulk of the manuscript. However, we can also incorporate substitutions; see, e.g., [31] for more details.
This paper describes the backbone of our study (more extensively recorded in an unpublished paper [32]) to give the theoretical basis of our ab initio probability calculation under the general continuoustime Markov model of indels. Peripheral topics surrounding the study can be found in [32].^{Footnote 3} Throughout the paper, we suppose that each probability is calculated under a given evolutionary model setting, including the phylogenetic tree of the sequences. In section R1 of Results and discussion, we briefly review the most general form of the SID model [21]. Then, in section R2, we introduce two important tools, namely, the ancestry index and the operator representation of mutations including indels. Using the results of sections R1 and R2, we define our general continuoustime Markov model in section R3, and formally give the general solution to its defining equation in terms of the operator representation. In section R4, we formally express the ab initio probability of a given PWA in a perturbation expansion. Then, using the concept of the LHS equivalence classes defined in section R5, we derive in section R6 the conditions under which the PWA probability is factorable. In section R7, the derivation is extended to the probability of a given MSA. In section S8, some examples are given to illustrate models with factorable and nonfactorable alignment probabilities. The former category includes the indel evolutionary model of Dawg [26] and the “long indel” model [21], among others. In section R9, we discuss the merits, possible uses and extensions, as well as some outstanding issues, of the results in this study. In Table 1, we summarize the key concepts and results of this paper, mainly for those who want its gist quickly. Likewise, Table S1 (in Additional file 1) summarizes mathematical symbols used commonly in this paper, to facilitate the readers’ cruise through the equations. Supplementary methods (in Additional file 1) and Supplementary appendix (in Additional file 2) give detailed derivations of some important results. The former is more essential and accessible to a wider audience; the latter is for those who are interested in further mathematical details.
We end this section with two notes. First, in this paper, the term “an evolutionary (or indel) process” means a series of successive mutation (or indel) events with both the order and the specific timing specified, and the term “an evolutionary (or indel) history” means a series of successive events with only the order specified. This usage should conform to the common practice in this field. Second, we will describe the results in the braket notation, similar to that in quantum mechanics [29, 33]. However, those who are unfamiliar with the notation need not worry about it. Our formulation via the braket notation can be proven to be equivalent to the standard formulation of the continuoustime Markov model via the vectormatrix notation. (We refer the interested readers to Supplementary appendix SA1 in Additional file 2.) Therefore, if desired, the symbols of a bra (〈x), a ket (y〉), and an operator (Ô) could be regarded simply as convenient reminders of a row vector, a column vector, and a matrix, respectively.^{Footnote 4}
Results and discussion
The key concepts and results proposed/obtained in this paper are summarized in Table 1. Readers can use the table to quickly grasp an overview of this paper, as well as to easily locate what they look for. Also, most mathematical symbols are briefly explained in Table S1 in Additional file 1.
R1. Brief review of general SID model
Miklós et al. [21] proposed a class of evolutionary models, which they called the “substitution/insertion/deletion (SID) models”. They are continuoustime Markov models defined on the space of strings (i.e., sequences) of any lengths, each of which consists of letters (i.e., residues, such as bases or amino acids) from a given alphabet (denoted as Ω here). Following [21], their state space will be denoted as: Ω*≡ ∪ ^{∞}_{ L = 0 } Ω ^{L}, whose component, Ω ^{L}, is the space of all sequences of length L. If desired, a sequence state, s ∈ Ω ^{L}, could be represented as: s = [ω _{1}, ω _{2}, …, ω _{ L }] (with ω _{ x } ∈ Ω for x = 1, 2, …, L) (see Fig. 2a). In this model, mutations are defined as transitions from a sequence state to another, and their instantaneous rates can be given via the following “rate grammar” they proposed:

Substitution: \( s={s}_L\omega {s}_R\overset{\rho_S\left({s}_L,\omega, {\omega}^{\prime },{s}_R\right)}{\to }{s}^{\prime }={s}_L{\omega}^{\prime }{s}_R; \) (R1.1)

Insertion: \( s={s}_L{s}_R\overset{\rho_I\left({s}_L,{s}_I,{s}_R\right)}{\to }{s}^{\prime }={s}_L{s}_I{s}_R; \) (R1.2)

Deletion: \( s={s}_L{s}_D{s}_R\overset{\rho_D\left({s}_L,{s}_D,{s}_R\right)}{\to }{s}^{\prime }={s}_L{s}_R. \) (R1.3)
Here, ρ _{ m }(…) with m = S, I and D denote the rates of the substitution, the insertion, and the deletion, respectively, possibly depending on the arguments in the parentheses. In each of the above rules, s and s′, respectively, denote the sequence states before and after the mutation. The symbols s _{ L } and s _{ R } denote the subsequences flanking the mutated portion from the left and from the right, respectively.^{Footnote 5} These SID models equipped with this “rate grammar” are genuine stochastic evolutionary models, and thus do not usually impose unnatural restrictions on the mutations (except possibly through restrictions on mutation rates). And the most general SID model can accommodate quite general mutation rates, including indel length distributions, by allowing their dependence on the sequence states before and after the mutation.^{Footnote 6} As far as we know, however, this most general SID model was not theoretically examined further (at least thus far), maybe because adequate mathematical or conceptual tools were not devised and because of some other reasons (mentioned below). In the following sections, we will provide such tools, which in turn will help theoretically dissect an extended version of the most general SID model.
R2. Ancestry indices and operator representation of mutations
First, we slightly extend the framework of the SID models, by assigning an ancestry to each site, which is a unit position in the sequence that accommodates a single residue. Hereafter, we will consider that it is the sites, instead of the residues, that are inserted/deleted. For example, the above example sequence state, s = [ω _{1}, ω _{2}, …, ω _{ L }](∈Ω^{L}), can be extended as:\( \breve{s}=\left[\left({\upsilon}_1,{\omega}_1\right),\left({\upsilon}_2,{\omega}_2\right),\dots, \left({\upsilon}_L,{\omega}_L\right)\right]\left(\in {\left(\varUpsilon \times \Omega \right)}^L\right) \) (Fig. 2b). Here, υ _{ x }(∈ϒ) is the ancestry index assigned to the xth site of the sequence (with x = 1, 2, …, L). Alternatively, the extended sequence state could also be represented as: \( \breve{s}=\left(\overrightarrow{\upsilon},\overrightarrow{\omega}\right), \) ^{Footnote 7} where \( \overrightarrow{\upsilon}=\left[{\upsilon}_1,{\upsilon}_2,\dots, {\upsilon}_L\right]\left(\in {\varUpsilon}^L\right) \) is an array of ancestry indices assigned to the sites, and \( \overrightarrow{\omega}=\left[{\omega}_1,{\omega}_2,\dots, {\omega}_L\right]\left(\in {\Omega}^L\right) \) is an array of residue states that fill in the sites. (Note that \( \overrightarrow{\omega} \) corresponds to the sequence state (s) in the SID models (in section R1)). The ancestry indices follow a number of rules: (i) different sites in the same sequence always have different ancestry indices; (ii) the ancestry index of a site remain unchanged as long as the site exists; and (iii) every time when an insertion takes place, new ancestry indices are assigned to the newly inserted sites. Other than these rules, the assignment of the indices is arbitrary. Especially, their values themselves are not so important. The most essential thing is whether two sites of different sequences share the same ancestry index or not; if so, the sites are mutually homologous (actually orthologous unless duplications are considered). Another important thing is the spatial relationship of the site having each ancestry with other sites, especially preserved ancestral sites (PASs, explained shortly). For the space of ancestry indices, ϒ, we will tentatively use the set of all positive integers (Ν _{1}≡{1, 2, 3, …}), although there should be a more appropriate mathematical entity.^{Footnote 8} Because of the rules imposed above, the space of the extended sequence states (denoted as \( {\breve{s}}^{II} \) in [31]) is included in but never equal to {ϒ × Ω}^{*} = ∪ ^{∞}_{ L = 0} {ϒ × Ω}^{L}.
We devised the ancestry indices to facilitate the description of indel histories by keeping track of the evolutionary course of each site. For example, consider that a sequence whose initial state had the ancestry indices \( {\overrightarrow{\upsilon}}_I=\left[1,2,3,4,5,6,7\right] \) evolved into the final state with \( {\overrightarrow{\upsilon}}_F=\left[1,5,6,8,9,A,7\right] \). (Here the “A” is an abbreviation of 10.) Then, we can immediately infer what happened during its evolution by aligning the two sequences (represented by the arrays of ancestry indices):
This alignment tells that the sites with ancestries 2, 3 and 4 were deleted and that the sites with ancestries 8, 9 and A were inserted. We can also see that the sites with 1, 5, 6 and 7 were preserved during the evolution. We will henceforth refer to such sites as “preserved ancestral sites (PASs)”. The PASs indicate that no indels occurred at or through the sites during the evolution under consideration. Thus, they can be used to narrow down the possible indel histories that might have resulted in the pairwise alignment (PWA) (as argued, e.g., in [21]). A fringe benefit of the ancestry indices is that they enable the mutation rates to vary beyond the dependence on the residue states (section R3). Hereafter, we refer to an array of ancestry indices (like \( \overrightarrow{\upsilon} \)) as a “basic sequence state” (abbreviated as a “sequence state” or a “basic state”), which is a backbone to be fleshed out by the residue states (like \( \overrightarrow{\omega} \)) to give the extended sequence state (like \( \breve{s} \)). Hereafter, the basic sequence state will often be denoted, e.g., as s (Fig. 2c). (Henceforth, symbols like s will never denote a residue state (like \( \overrightarrow{\omega} \)), which was a sequence state in section R1). And S ^{II}(⊂ϒ * = ∪ ^{∞}_{ L = 0} ϒ ^{L}) denotes the space of the basic states.
Another, probably more important, tool we introduce here is the operator representation of mutations. When considering the evolutionary processes (or histories), we symbolically represent each (extended) sequence state as a bravector, like \( \left\langle {\breve{s}}_I\right \), which could be regarded as an abstract extension of a row vector in the normal representation of the continuoustime Markov model. Then, each mutation of a sequence can be represented as a linear operator (regarded as an abstract extension of a matrix) acting on a bravector (Fig. 3). Operator \( {\widehat{M}}_S\left(x,\omega \mapsto {\omega}^{\prime}\right) \) denotes the substitution of the residue to ω ^{′}(≠ω) if it was ω at the x th site (or the null action otherwise) (Fig. 3a). Operator \( {\widehat{M}}_I\left(x,l\right) \) denotes the insertion of l sites between the xth and (x + 1)th sites (Fig. 3b). The insertion operator alone does not determine the residue states of the inserted sites. It is the job of the “fillin” operator, \( \widehat{F}\left(x,\delta {\overrightarrow{\omega}}^{\prime}\left[l\right]\right) \), which fills in the l inserted sites with a new array of residues, \( \delta {\overrightarrow{\omega}}^{\prime}\left[l\right]\left(\in {\Omega}^l\right) \). (This “division of labor” facilitates the decoupling of the substitution component and the indel component of an alignment probability. See Appendix A1 of [31] for more details). Finally, operator \( {\widehat{M}}_D\left({x}_B,{x}_E\right) \) denotes the deletion of the subsequence between (and including) the x _{ B }th and x _{ E }th sites in the sequence immediately before the event (Fig. 3c). The action of multiple successive mutation events can be expressed as a product of mutation operators on an initial (extended) sequence state. For example, the indel history illustrated in panels a and b of Fig. 4 can be represented as a series of indel events, \( \left[{\widehat{M}}_D\left(3,3\right),{\widehat{M}}_I\left(5,2\right),{\widehat{M}}_D\left(2,3\right),{\widehat{M}}_I\left(5,1\right)\right] \), on the initial basic state s _{ I } (given above). Then, the final result of this indel history is expressed as: \( \left\langle {s}_I\right{\widehat{M}}_D\left(3,3\right){\widehat{M}}_I\left(5,2\right){\widehat{M}}_D\left(2,3\right){\widehat{M}}_I\left(5,1\right) \). Figure 4c shows the MSA among the initial, intermediate and final sequence states. Figure 4d shows the resulting PWA between the initial and final sequence states.
These new tools, the ancestry indices and the operator representation of mutations, will play essential roles in our theoretical development described below. In the SID models [21], each evolutionary process was expressed as a (timerecorded) trajectory of sequence states, each of which was represented by an array of residues (without ancestry assignments). In consequence, an instantaneous transition from a state to the next state was often expressed as a summation of multiple possible mutations. (For example, the transition from \( \overrightarrow{\omega}=\left[A,A\right] \) to \( {\overrightarrow{\omega}}^{\prime }=\left[A\right] \) could result from either \( {\widehat{M}}_D\left(1,1\right) \) or \( {\widehat{M}}_D\left(2,2\right) \)). Ancestry indices help avoid such ambiguous channels by uniquely defining each instantaneous statetostate transition as an action of a single mutation. (In the above example, the former causes the transition from \( \overrightarrow{\upsilon}=\left[1,2\right] \) to \( {\overrightarrow{\upsilon}}_{(1)}^{\prime }=\left[2\right] \), and the latter yields the transition from \( \overrightarrow{\upsilon} \) to \( {\overrightarrow{\upsilon}}_{(2)}^{\prime }=\left[1\right] \)). This, in conjunction with the operator representation of mutations, enables us to shift the focus from the trajectory of sequence states to the history of mutations, especially indels. This shift of focus, as well as the “equivalence relations” between the products of operators (section R5), facilitates the examination of the factorability of alignment probabilities, as we will see in sections R4R6.
R3. Instantaneous transition (or rate) operator and finitetime transition operator
Now we are ready to define our evolutionary model, i.e., the general continuoustime Markov model to describe the evolution of an entire sequence along a time axis. If desired, this could be done by extending the rate grammar, Eqs. (R1.1,2,3), so that each mutation rate depend on the entire extended sequence states (i.e., not only on the residue states) immediately before and after the mutation. (We will also introduce the explicit time dependence. This may allow us to incorporate the effects of changes in the physiology, genomic contexts, external environments, etc. (See also section 2.4 of [32].)) However, to define the model more neatly, we will parametrize the mutation rates in coordination with the mutation operators defined in section R2. Although the parametrization is different from (the extended version of) Eqs. (R1.1,2,3), the two sets of mutation rates are equivalent. (To remember these differences in the parametrization, we will use the symbol r _{ m }(…) (m = S, I and D) instead of ρ _{ m }(…).) Let \( \overset{\operatorname{}}{s} \) be the extended sequence state immediately before the mutation. And let t be the time at which the mutation occurred. Then, \( {r}_S\left(x,\omega \mapsto {\omega}^{\hbox{'}};\breve{s},t\right) \) is the rate of the substitution, \( {\widehat{M}}_S\left(x,\omega \mapsto {\omega}^{\prime}\right) \). It must be zero unless ω is at the xth site of \( \breve{s} \). \( {r}_I\left(x,l,\delta {\overrightarrow{\omega}}^{\prime}\left[l\right];\breve{s},t\right) \) is the rate of the insertion, \( {\widehat{M}}_I\left(x,l\right) \) (accompanied by \( \widehat{F}\left(x,\delta {\overrightarrow{\omega}}^{\prime}\left[l\right]\right) \)). And \( {r}_D\left({x}_B,{x}_E;\breve{s},t\right) \) is the rate of the deletion, \( {\widehat{M}}_D\left({x}_B,{x}_E\right) \). Using these mutation rates that accompany the mutation operators, we can define our evolutionary model in a manner closer to the standard, by defining the instantaneous transition rate operator (or the “rate operator” for short), which is an analog of the instantaneous transition rate matrix in a continuoustime Markov model. Because the state space we are working in, \( {\breve{s}}^{II} \), is essentially infinite, we cannot give the explicit matrix expression of the rate operator on the entire state space. Nevertheless, the rate operator can be defined if we give its action on every state in \( {\breve{s}}^{II} \). Let \( {\widehat{Q}}^{SID}(t) \) denote our rate operator (at time t). It is convenient to decompose it as follows:
where \( {\widehat{Q}}^m(t) \) with m = S, I and D, respectively, are the substitution, insertion, and deletion components of the rate operator. Each of the three components can be further decomposed as:
Here, the “mutation part”, \( {\widehat{Q}}_M^m(t) \), describes the transitions to different states via mutations of type m (=S, I or D). And the “exit rate part”, \( {\widehat{Q}}_X^m(t) \), attenuates the state retention probability at the exit rate, \( {R}_X^m\left(\breve{s},t\right) \), which is determined by the type m mutations. It guarantees that the state probabilities sum up to unity at any time. Specifically, the mutation parts are defined by the following actions on every state:
Here, \( L\left(\breve{s}\right) \) denotes the length (i.e., the number of sites) of \( \breve{s} \), and \( {\omega}_x\left(\breve{s}\right) \) denotes the residue at the xth site of \( \breve{s} \). Figure 3 exemplifies the states on the right hand sides of Eqs. (R3.3R3.5). The terms with x = 0 and with \( x=L\left(\breve{s}\right) \) in Eq. (R3.4) represent insertions at the left and right ends, respectively, of the sequence. How to deal with such insertions varies depending on various factors including the model setting, and can be implemented by adjusting the insertion rates accordingly (see, e.g., [21, 26]). The terms with x _{ B } < 1 or \( {x}_E>L\left(\breve{s}\right) \) in Eq. (R3.5) represent the deletions of the subsequences sticking out of the subject sequence. These terms were included because the subject sequence is regarded as embedded in a “chromosome” with a virtually infinite length (e.g., [21, 26]).^{Footnote 9} The exit rate parts are defined in nearly the same form:
They differ only in the exit rates:
These equations, Eqs. (R3.1R3.9), cooperatively define the instantaneous transition rate operator, \( {\widehat{Q}}^{SID}(t) \), and thus define our evolutionary model. If desired, \( {\widehat{Q}}^{SID}(t) \) could be decomposed as:
Here \( {\widehat{Q}}_M^{SID}(t)\equiv {\widehat{Q}}_M^S(t)+{\widehat{Q}}_M^I(t)+{\widehat{Q}}_M^D(t) \) is the collection of all mutational transition terms, and \( {\widehat{Q}}_X^{SID}(t)\equiv {\widehat{Q}}_X^S(t)+{\widehat{Q}}_X^I(t)+{\widehat{Q}}_X^D(t) \) is the entire exit rate part, which attenuates the state retention probability at the total exit rate, \( {R}_X^{SID}\left(\breve{s},t\right)\equiv {R}_X^S\left(\breve{s},t\right)+{R}_X^I\left(\breve{s},t\right)+{R}_X^D\left(\breve{s},t\right). \) Actually, the total mutational part, \( {\widehat{Q}}_M^{SID}(t) \), is equivalent to (the extended version of) the “instantaneous rate matrix” of the general SID model (defined by Eq. (1) in [21]), although the two expressions appear quite different from each other. The difference mainly stems from the parametrization and the state representation. We use our parametrization because we believe it to clarify the meaning of each term in the rate operator. And, in this section, the sequence state after the mutation (say, \( \left\langle {\breve{s}}^{\prime}\right \)) was represented as the result of the mutation operator (say, \( {\widehat{M}}_m\left(\dots \right) \)) acting on the state before the mutation (say, \( \left\langle \breve{s}\right \)), like \( \left\langle {\breve{s}}^{\prime}\right=\left\langle \breve{s}\right{\widehat{M}}_m\left(\dots \right) \). This is legitimate because a mutation transfers a subject state uniquely to another state. This state representation will facilitate the unfolding of our theory below.
Thus far, we included substitutions (and residue states) mainly in order to discuss the relationship between our evolutionary model and the general SID model. However, our main interest here is in calculating the probability of the skeleton of a sequence alignment, composed only of the sites and gaps, which will then be filled in with residues to form a full alignment. Because such a skeleton can be created only through an evolutionary process of indels, we will hereafter omit the description of substitutions and the resulting changes in the residue state (\( \overrightarrow{\omega} \)). (This includes omitting the “fillin” operators, \( \widehat{F}\left(x,\delta {\overrightarrow{\omega}}^{\prime}\left[l\right]\right) \)’s.) (Henceforth, the alignment skeleton will be called the “alignment” for short.) But we will retain the basic sequence state consisting of ancestry indices (\( s=\overrightarrow{\upsilon} \)). The rate heterogeneity will be realized only through the ancestry dependence. This would be almost sufficient for representing the dependence of the rates on, e.g., the epigenetic or 3D structural context (e.g., [25]). And this may also be able to approximate the dependence on some residue state contexts, especially in highly conserved regions. Now, the rate operator defined by Eqs. (R3.1R3.9) is reduced as follows. (The reduced total rate operator will be denoted as \( {\widehat{Q}}^{ID}(t) \)).
Equations (R3.2,R3.6) remain unchanged except the exclusion of m = S and the replacement of \( \breve{s} \) by s. In Eqs. (R3.12,R3.14), the insertion rates could be related to those in Eqs. (R3.4,R3.8) by the equation:
where the \( \overrightarrow{\omega} \)dependence of the right hand side was omitted.
Now we can calculate the operator that gives the finitetime transition probabilities between states. We will call it the “finitetime transition operator”. Let \( {\widehat{P}}^{ID}\left(t,{t}^{\prime}\right) \) be such an operator describing the state transition via indels alone from an initial time, t, to a final time, t ^{′} (> t). Operator \( {\widehat{P}}^{ID}\left(t,{t}^{\prime}\right) \) is defined to give the following equations:
On the right hand side, P[(s ^{′}, t ^{′})(s, t)] is the probability that the sequence is in state s ^{′} at time t ^{′} conditioned on that it was in state s at time t. On the left hand side, s ^{′}〉 denotes a ketvector (an abstract extension of a column vector), whose exclusive role here is to give “innerproducts” with bravectors: 〈s s ^{′}〉 = 1 (if s = s ^{′}), = 0 (otherwise). From the evolutionary principle that our model must satisfy, or equivalently, from the fundamental properties (such as the ChapmanKolmogorov equation) of the continuoustime Markov model, the finitetime transition operator must be given by the multiplicative accumulation of the effects of the rate operators along the time axis. Thus, \( {\widehat{P}}^{ID}\left(t,{t}^{\prime}\right) \) is formally calculated as:
In the middle of the equation, Î is the identity operator (i.e., 〈sÎ = 〈s for every s ∈ S ^{II}), and \( {t}_k^{\left({N}_P\right)}\equiv t+\left(k{\scriptscriptstyle \frac{1}{2}}\right){\scriptscriptstyle \frac{t^{\prime }t}{N_P}} \). On the rightmost side, T{…} denotes the metaoperator that rearranges the operators in each operator product term in the temporal order so that the earliest operator comes leftmost. Another way to give \( {\widehat{P}}^{ID}\left(t,{t}^{\prime}\right) \) is through the firstorder timedifferential equation. Again, from the fundamental properties of the continuoustime Markov model, or equivalently, from Eq. (R3.18), we can show that the operator satisfies the following differential equations:
Equation (R3.19) is the “forward equation”, and Eq. (R3.20) is the “backward equation”. And the evolutionary principle naturally includes the following equation:
where [t _{ I }, t _{ F }] is the time interval in which the model is defined. This equation could be used as the initial condition for each of Eqs. (R3.19,R3.20). In the next section, we will obtain the solutions for Eqs. (R3.19, R3.20, R3.21) in a more tractable form than the defining solution, Eq. (R3.18).
R4. Perturbation expansion of finitetime transition operator and pairwise alignment probability: brief description
In timedependent perturbation theory of quantum mechanics (e.g., [29, 30]), the instantaneous time evolution operator (Hamiltonian Ĥ(t)) is considered as a sum of two operators, \( \widehat{H}(t)={\widehat{H}}_0(t)+\widehat{V}(t) \), and the time evolution of the system is described as if the system mostly evolves according to the wellsolvable instantaneous timeevolution operator (Ĥ _{0}(t)) and is occasionally perturbed by the “interaction” operator (\( \widehat{V}(t) \)). We adapt such a technique of timedependent perturbation expansion to our evolutionary model. Here, we briefly describe the results. For their detailed derivations, see Supplementary methods SM1 in Additional file 1. We first reexpress our rate operator as:
Here \( {\widehat{Q}}_0^{ID}(t)\equiv {\widehat{Q}}_X^I(t)+{\widehat{Q}}_X^D(t) \) describes the mutationfree evolution, and \( {\widehat{Q}}_M^{ID}(t)\equiv {\widehat{Q}}_M^I(t)+{\widehat{Q}}_M^D(t) \) describes the singlemutation transition between states. From the reduced form of Eq. (R3.6), we get:
Using Eq. (R4.1), the forward equation (Eq. (R3.19)) accompanied by the initial condition (Eq. (R3.21)) can be shown to be equivalent to a crucial integral equation:
Here, \( {\widehat{P}}_0^{ID}\left({t}^{\prime },{t}^{\prime \prime}\right)\equiv T\left\{ exp\left({\displaystyle {\int}_{t^{\prime}}^{t^{\prime \prime }}d\tau {\widehat{Q}}_0^{ID}\left(\tau \right)}\right)\right\} \). Similarly, the backward equation (Eq. (R3.20)) accompanied by Eq. (R3.21) is equivalent to another crucial integral equation:
Now, to formally solve Eq. (R4.4), we assume that the solution can be expanded as: \( {\widehat{P}}^{ID}\left(t,{t}^{\prime}\right)={\displaystyle {\sum}_{N=0}^{\infty }{\widehat{P}}_{(N)}^{ID}\left(t,{t}^{\prime}\right)} \), where \( {\widehat{P}}_{(N)}^{ID}\left(t,{t}^{\prime}\right) \) is the collection of terms containing N indel operators each. Substituting this expansion into Eq. (R4.4) and performing some formal calculations, we get the final form of the ab initio solution we desire:
Here, Η^{ID}(N; s _{0}) denotes the space of all possible histories of N indels each beginning with the sequence state, s _{0}. And
is the probability that an N event indel history, \( \left[{\widehat{M}}_1,{\widehat{M}}_2,\cdots, {\widehat{M}}_N\right] \) (with \( {\widehat{M}}_{\nu } \) (ν = 1, 2, …, N) being the νth event), occurred during time interval [t _{ I }, t _{ F }], given an initial sequence state (s _{0}) at time t _{ I }. The rate, \( r\left({\widehat{M}}_{\nu };{s}_{\nu 1},{\tau}_{\nu}\right) \), is r _{ I }(x, l; s _{ ν − 1}, τ _{ ν }) if \( {\widehat{M}}_{\nu }={\widehat{M}}_I\left(x,l\right) \), and it is r _{ D }(x _{ B }, x _{ E }; s _{ ν − 1}, τ _{ ν }) if \( {\widehat{M}}_{\nu }={\widehat{M}}_D\left({x}_B,{x}_E\right) \). It should be noted that Η ^{ID}(N = 0; s _{0})≡{(s _{0}, [])} consists only of the history with zero indel, [ ], whose conditional probability is: \( P\left[\left(\left[\right],\left[{t}_I,{t}_F\right]\right)\left\left({s}_0,{t}_I\right)\right.\right]= \exp \left\{{\displaystyle {\int}_{t_I}^{t_F}d\tau {R}_X^{ID}\left({s}_0,\tau \right)}\right\} \). Eq. (R4.6) supplemented with Eq. (R4.7) is also the solution of Eq. (R4.5). (Mathematically, Eq. (R4.7) is a multipletime integral over all possible timing, whose integrand is the probability density of an evolutionary process of N indels with particular timing, (τ _{1}, τ _{2}, …, τ _{ N })).
Equation (R4.6) states that the finitetime transition operator (acting on 〈s _{0}) is the collection of the effects of all possible indel histories starting with s _{0}, each weighted by its probability (Eq. (R4.7)). Thus, it mathematically underpins Gillespie’s [34] famous stochastic simulation algorithm, which provides the basis of genuine molecular evolution simulators (e.g., [26–28]). Our derivation of Eq. (R4.6) and Eq. (R4.7) through the integral equation (Eq. (R4.4) or Eq. (R4.5)) bridges Gillespie’s own intuitive reasoning and Feller’s [35] mathematically rigorous proof of the solution.
Now, substitute an “ancestral” sequence state, s ^{A}(∈S ^{II}), for s _{0} in Eq. (R4.6), and take the inner product between it and the ketvector, s ^{D}〉, of a “descendant” sequence state, s ^{D}(∈S ^{II}). Comparing the two sequence states in S ^{II} naturally gives a PWA, α(s ^{A}, s ^{D}) (e.g., Eq. (R2.1)).^{Footnote 10} Hence, the summation of \( \left\langle {s}^A\right{\widehat{P}}^{ID}\left({t}_I,{t}_F\right)\left{s}^D\right\rangle \)’s over all “equivalent” s ^{D}’s providing the same α(s ^{A}, s ^{D}) must be P[(α(s ^{A}, s ^{D}), [t _{ I }, t _{ F }])(s ^{A}, t _{ I })], which is the probability that α(s ^{A}, s ^{D}) results from sequence evolution during [t _{ I }, t _{ F }], given s ^{A} at t _{ I }. Similarly to the derivation of Eq. (R4.6), we obtain its formal expression as:
Here, Η ^{ID}[N; α(s ^{A}, s ^{D})] denotes the set of all indel histories with N indels each that can result in α(s ^{A}, s ^{D}), and N _{ min }[α(s ^{A}, s ^{D})] is the minimum number of indels required for creating the PWA.
Using the set of all PWAconsistent histories, \( {\tilde{H}}^{ID}\left[\alpha \left({s}^A,{s}^D\right)\right]\equiv {\displaystyle {\cup}_{N={N}_{min}\left[\alpha \left({s}^A,{s}^D\right)\right]}^{\infty }{H}^{ID}\left[N;\alpha \left({s}^A,{s}^D\right)\right]}, \) Eq. (R4.8) can be further simplified as:
Equation (R4.8) and Eq. (R4.9) are the formal expressions of the occurrence probability of α(s ^{A}, s ^{D}) derived in effect from the defining equations, Eqs. (R3.19, R3.20, R3.21), of our evolutionary model. Thus, they are the “ab initio probability” of the PWA. In the following, we will examine its factorability.
R5. Local historyset equivalence class of indel histories
Before advancing to the factorability of general PWA probabilities, we will introduce an essential concept here. For this purpose, we first consider the very simple PWA, Eq. (R2.1), as an example. (Here we make the substitutions, \( {s}^A={\overrightarrow{\upsilon}}_I \) and \( {s}^D={\overrightarrow{\upsilon}}_F \)). In this case, N _{ min }[α(s ^{A}, s ^{D})] = 2, and there are two 2indel histories that can yield this PWA: one is \( \left[{\widehat{M}}_D\left(2,4\right),{\widehat{M}}_I\left(3,3\right)\right] \) (Fig. 5a) and the other is \( \left[{\widehat{M}}_I\left(6,3\right),{\widehat{M}}_D\left(2,4\right)\right] \) (Fig. 5b). Thus, these two indel histories result in the same final state: \( \left\langle {s}_F\right=\left\langle {s}_I\right{\widehat{M}}_D\left(2,4\right){\widehat{M}}_I\left(3,3\right)=\left\langle {s}_I\right{\widehat{M}}_I\left(6,3\right){\widehat{M}}_D\left(2,4\right) \) (Fig. 5, panels a and b). In other words, the two different successive actions of two indel operators have the same effect on the sequence states (in space S ^{II}). This fact will be phrased as “the two products of the operators are equivalent”, and represented by the relationship:
This “binary equivalence” can be generalized to the following relationships between two indel events separated at least by a PAS:
Here, l ^{′}≡min{x _{ E } − x _{ B } + 1, x _{ E }} in Eq. (R5.2c), and l ^{′}_{2} ≡min{x _{ E2} − x _{ B2} + 1, x _{ E2}} in Eq. (R5.2d). If you will, these equivalence relations could be phrased as follows. “The operator representing the event on the left along the sequence will not change whether it comes first or second. The operator representing the event on the right will shift its operational position to the left/right by the number of sites deleted/inserted before its operation, when it comes second”.^{Footnote 11}
Now, we will extend the binary equivalence relations, Eqs. (R5.2aR5.2d), to the equivalence relations among more general complex indel histories, each consisting of more than two indel events. Let us consider a global history of N indel events, \( \left[{\widehat{M}}_1,{\widehat{M}}_2,\dots, {\widehat{M}}_N\right] \), which begins with an “ancestral state”, s ^{A}(∈S ^{II}), and ends with a “descendant state”, s ^{D}(∈S ^{II}). Obviously, the two states must satisfy the equation:
Given an indel history, we can identify PASs unambiguously. Suppose that such PASs separate the indel events, \( {\widehat{M}}_{\nu } \) (ν = 1, 2, …, N) in \( \left[{\widehat{M}}_1,{\widehat{M}}_2,\dots, {\widehat{M}}_N\right] \), into K local subsets of indels, each of which is confined either between a pair of PASs or between a PAS and an end of the resulting PWA. Number the K local subsets as k = 1, 2, …, K from left to right, and let N _{ k } be the number of indel events in the k th local subset. Naturally, ∑ ^{K}_{ k = 1} N _{ k } = N. And let \( {\widehat{M}}^{\prime}\left[k,{i}_k\right] \) be the element of \( {\left\{{\widehat{M}}_{\nu}\right\}}_{\nu =1,2,\dots, N} \) representing the i _{ k } th event (in the temporal order) in the k th local subset (i _{ k } = 1, 2, …, N _{ k }; k = 1, 2, …, K). (The prime here indicates that the operator is equivalent to the primeless version). Then, repeatedly applying the binary equivalence relations, Eqs. (R5.2aR5.2d), between the indel operators belonging to different local subsets, we can move the operators around in the product in Eq. (R5.3) and get the following equation:
Here \( \widehat{M}\left[k,{i}_k\right] \) is an operator that was obtained from \( {\widehat{M}}^{\prime}\left[k,{i}_k\right] \) through the series of equivalence relations Eqs. (R5.2aR5.2d) that brought Eq. (R5.3) into Eq. (R5.4). As in Eq. (R5.3), the operators in each pair of large square parentheses in Eq. (R5.4) are arranged in temporal order, so that the earliest event in each local subset will come leftmost. But it should be noted that the order among the pairs of large square parentheses is the opposite of the actual spatial order among the local subsets, so that the rightmost one along the sequence (the K th one here) will come leftmost. In this way, the operators in each local subset, e.g., \( \left\{\widehat{M}\left[k,1\right],\dots, \widehat{M}\left[k,{N}_k\right]\right\} \), are exactly the same as those when the events in the subset alone struck 〈s ^{A}. Thus the series of operators, \( \left[\widehat{M}\left[k,1\right],\dots, \widehat{M}\left[k,{N}_k\right]\right] \), for the k th local subset defines the k th local indel history that was isolated from the global indel history, \( \left[{\widehat{M}}_1,{\widehat{M}}_2,\dots, {\widehat{M}}_N\right] \), on s _{ I } ∈ S.
Now, let us consider a history of N indel events other than \( \left[{\widehat{M}}_1,{\widehat{M}}_2,\dots, {\widehat{M}}_N\right] \). If the temporal operator product of the history is shown to be equivalent to Eq. (R5.4) through a series of Eqs. (R5.2aR5.2d), then it should also be connected to Eq. (R5.3) though another series of Eqs. (R5.2aR5.2d). Therefore, it should be equivalent to \( \left[{\widehat{M}}_1,{\widehat{M}}_2,\dots, {\widehat{M}}_N\right] \) in this sense. Hence, we can define a particular equivalence class, which is the set of all global indel histories that can be “decomposed” into the identical set of local indel histories, such as Eq. (R5.4), only through a series of Eqs. (R5.2aR5.2d), between indel operators separated by at least a PAS. We will call it the “localhistoryset (LHS) equivalence class”. In the equivalence class defined by a local history set (LHS), \( {\left\{\left[\widehat{M}\left[k,1\right],\dots, \widehat{M}\left[k,{N}_k\right]\right]\right\}}_{k=1,\dots, K} \) (with ∑ ^{K}_{ k = 1} N _{ k } = N), on an initial sequence state s ^{A} ∈ S ^{II}, there are \( \frac{N!}{{\displaystyle {\prod}_{k=1}^K{N}_k}} \) LHSequivalent global indel histories beginning with s ^{A}. Each of the global histories corresponds to a way of reordering N indel events while retaining the relative temporal order among N _{ k } events within the k th local indel history (for every k = 1, …, K).
In the simplest example at the beginning of this section (Eq. (R5.1) and above), the corresponding LHS is: \( \left\{\left[{\widehat{M}}_D\left(2,4\right)\right],\left[{\widehat{M}}_I\left(6,3\right)\right]\right\} \). The LHS consists of two local histories, each of which is a singleindel history (Fig. 5c). As a slightly more complex example, consider the history, \( \left[{\widehat{M}}_D\left(3,3\right),{\widehat{M}}_I\left(5,2\right),{\widehat{M}}_D\left(2,3\right),{\widehat{M}}_I\left(5,1\right)\right] \), illustrated in Fig. 4. This history belongs to the LHS equivalence class represented by the LHS: \( \left\{\left[{\widehat{M}}_D\left(3,3\right),{\widehat{M}}_D\left(2,3\right)\right],\left[{\widehat{M}}_I\left(6,2\right),{\widehat{M}}_I\left(8,1\right)\right]\right\} \), which consists of two 2indel local histories. If this LHS is recast into the form in Eq. (R5.4), we have: \( \widehat{M}\left[1,1\right]={\widehat{M}}_D\left(3,3\right) \), \( \widehat{M}\left[1,2\right]={\widehat{M}}_D\left(2,3\right) \), \( \widehat{M}\left[2,1\right]={\widehat{M}}_I\left(6,2\right) \), and \( \widehat{M}\left[2,2\right]={\widehat{M}}_I\left(8,1\right) \).
R6. Factorability of pairwise alignment probability: brief description
Now we are ready to examine the factorability of the ab initio probability of PWA α(s ^{A}, s ^{D}), P[(α(s ^{A}, s ^{D}), [t _{ I }, t _{ F }])(s ^{A}, t _{ I })] in Eq. (R4.9), given the ancestral state (s ^{A}) at the initial time (t _{ I }). Here the “factorability” means that the PWA probability can be reexpressed as the product of an overall factor and contributions from local regions. Natural candidates for the local regions would be those in between the PASs, because we know that indels never hit or pierced PASs (if the alignment is correct). We are not interested in trivial factorability. Thus, we only consider PWAs (or global histories) each of which requires at least two local indel histories. In the following, we will only briefly describe our demonstration of the PWA probability factorization. Its more detailed yet rather intuitive description is given in Supplementary methods SM2 in Additional file 1. (It is complemented by mathematically rigorous arguments in Supplementary appendix SA2 in Additional file 2).
We first notice that each component probability, \( P\left[\left(\left[{\widehat{M}}_1,{\widehat{M}}_2,\cdots, {\widehat{M}}_N\right],\left[{t}_I,{t}_F\right]\right)\left\left({s}^A,{t}_I\right)\right.\right] \) given by Eq. (R4.7), will not be factorable. This is because its domain of multipletime integration is not a direct product. So, lets consider the total probability of a LHS equivalence class, \( {\left[\overset{\rightharpoonup }{\overset{\rightharpoonup }{\widehat{M}}}\right]}_{LHS} \) (with \( \overset{\rightharpoonup }{\overset{\rightharpoonup }{\widehat{M}}} \) abbreviating \( {\left\{\left[\widehat{M}\left[k,1\right],\dots, \widehat{M}\left[k,{N}_k\right]\right]\right\}}_{k=1,\dots, K} \)):
We can show that this probability can be factorized as:
where
if the following two conditions are satisfied.
Condition (i): The rate of an indel event (\( r\left({\widehat{M}}_{\nu };{s}_{\nu 1},{\tau}_{\nu}\right) \)) is independent of the portion of the sequence state (s _{ ν − 1}) outside of the region of the local history the event (\( {\widehat{M}}_{\nu } \)) belongs to.
Condition (ii): The increment of the exit rate due to an indel event (δR ^{ID}_{ X } (s _{ ν }, s _{ ν − 1}, τ)≡R ^{ID}_{ X } (s _{ ν }, τ) − R ^{ID}_{ X } (s _{ ν − 1}, τ), with \( \left\langle {s}_{\nu}\right=\left\langle {s}_{\nu 1}\right{\widehat{M}}_{\nu } \)) is independent of the portion of the sequence state (s _{ ν − 1}) outside of the region of the local history the event (\( {\widehat{M}}_{\nu } \)) belongs to.
See Supplementary appendix SA2 in Additional file 2 for the derivation of the mathematically rigorous version of this set of conditions. (For illustration, in Supplementary methods SM3 in Additional file 1, the factorability of the probability was examined for the simplest concrete LHS equivalence class (in Fig. 5)). Condition (i) is somewhat similar to the “contextindependence” condition imposed on the “long indel” model [21], though our condition is slightly less restrictive. Condition (ii) has never been found or even discussed thus far. In fact, the “long indel” model trivially satisfies this condition (see subsection R81), thus [21] did not need to pay attention to it. However, this condition is not always satisfied. Indeed, as exemplified in subsection R82, some models have nonfactorable alignment probabilities due to the violation of this condition even though condition (i) is satisfied.
Each global indel history (in the set of all PWAconsistent indel histories, \( {\tilde{\mathrm{H}}}^{ID}\left[\alpha \left({s}^A,{s}^D\right)\right] \)) belongs to a single LHS equivalence class (say, \( {\left[\overset{\rightharpoonup }{\overset{\rightharpoonup }{\widehat{M}}}\right]}_{LHS} \)). And all elements of \( {\left[\overset{\rightharpoonup }{\overset{\rightharpoonup }{\widehat{M}}}\right]}_{LHS} \) can result in the same PWA. Therefore, we get the direct sum structure:
where \( {\tilde{\Lambda}}^{ID}\left[\alpha \left({s}^A,{s}^D\right)\right] \) is the set of all LHSs consistent with α(s ^{A}, s ^{D}). Hence, the PWA probability, Eq. (R4.9), can be rewritten as:
We are considering all indel histories, including nonparsimonious ones, that can yield α(s ^{A}, s ^{D}). Thus, the LHSs belonging to \( {\tilde{\Lambda}}^{ID}\left[\alpha \left({s}^A,{s}^D\right)\right] \) may consist of different numbers of local histories. We will choose the maximum possible set of PASs in the given PWA, which separates the PWA into the finest potentially localhistoryaccommodating regions, denoted as \( {\gamma}_1,{\gamma}_2,\dots, {\gamma}_{\kappa_{max}} \). (κ _{ max } is uniquely determined by the PWA and the evolutionary model).^{Footnote 12} Then, we can represent any \( \overset{\rightharpoonup }{\overset{\rightharpoonup }{\widehat{M}}}={\left\{\left[\widehat{M}\left[k,1\right],\dots, \widehat{M}\left[k,{N}_k\right]\right]\right\}}_{k=1,\dots, K}\in {\tilde{\Lambda}}^{ID}\left[\alpha \left({s}^A,{s}^D\right)\right] \) as a vector with κ _{ max } components: \( \overset{\rightharpoonup }{\overset{\rightharpoonup }{\widehat{M}}}=\left(\overset{\rightharpoonup }{\widehat{M}}\left[{\gamma}_1\right],\overset{\rightharpoonup }{\widehat{M}}\left[{\gamma}_2\right],\dots, \overset{\rightharpoonup }{\widehat{M}}\left[{\gamma}_{\kappa_{max}}\right]\right) \). (See Figure S1 in Additional file 1). Substituting Eqs. (R6.2,R6.4) into Eq. (R6.6), and exploiting the vector representation of the LHSs, we can reach the desired expression:
Here, \( {\tilde{\Lambda}}^{ID}\left[{\gamma}_{\kappa };\alpha \left({s}^A,{s}^D\right)\right] \) denotes the set of local indel histories that can give rise to the subPWA of α(s ^{A}, s ^{D}) confined in γ _{ κ }, and the multiplication factor,
represents the total contribution from \( {\tilde{\Lambda}}^{ID}\left[{\gamma}_{\kappa };\alpha \left({s}^A,{s}^D\right)\right] \) to the PWA probability. (Here μ _{ P }[([], [t _{ I }, t _{ F }])(s ^{A}, t _{ I })] = 1 should be remembered).
Equation (R6.7) states that the PWA probability is factorized into the product of an overall factor (P[([], [t _{ I }, t _{ F }])(s ^{A}, t _{ I })]) and contributions from regions accommodating local indel histories (\( {\tilde{\mu}}_P\left[\left({\tilde{\Lambda}}^{ID}\left[{\gamma}_{\kappa };\alpha \left({s}^A,{s}^D\right)\right],\left[{t}_I,{t}_F\right]\right)\left\left({s}^A,{t}_I\right)\right.\right] \)’s). Therefore, the set of conditions, (i) and (ii), is sufficient for the factorability of the PWA probability. At present, we are not sure whether the set of conditions is also necessary or not. This may not be the case in the rigorous sense, and there may be some instances with factorable PWA probabilities despite the violation of condition (i) or (ii). Nevertheless, even if there are, we suspect that such cases should be isolated, requiring intricate cancellations of the terms. Thus, we will refer to the conditions (i) and (ii) as the “sufficient and nearly necessary set of conditions” for factorable PWA probabilities.
R7. Factorability of multiple sequence alignment probability: brief description
Thus far, we only examined the probability of a given PWA, conditioned on an ancestral state at initial time. Actually, once we know how to calculate such conditional PWA probabilities, we can build them up along the phylogenetic tree to calculate the probability of a given MSA, as described in the introductions of [13] and [14]. (See also [36] for an essentially equivalent method that appears different.) Here, we basically follow their procedures. However, it should be stressed that the MSA probability here will be calculated ab initio under a genuine evolutionary stochastic model and not under a HMM or a transducer, which is not necessarily evolutionarily consistent. This section briefly explains the derivation of the factorization of an ab initio MSA probability. For details on the derivation, see Supplementary methods SM4 in Additional file 1.
In this section, we formally calculate the ab initio probability of a MSA given a rooted phylogenetic tree, T = ({n}_{ T }, {b}_{ T }), where {n}_{ T } is the set of all nodes of the tree, and {b}_{ T } is the set of all branches of the tree. We decompose the set of all nodes as: {n}_{ T } = Ν ^{IN}(T) + Ν ^{X}(T), where Ν ^{IN}(T) is the set of all internal nodes and \( {N}^X(T)=\left\{{n}_1,\dots, {n}_{N^X}\right\} \) is the set of all external nodes. (The N ^{X}≡Ν ^{X}(T) is the number of external nodes.) The root node plays an important role and will be denoted as n ^{Root}. Because the tree is rooted, each branch b is directed. Thus, let n ^{A}(b) denote the “ancestral node” on the upstream end of b, and let n ^{D}(b) denote the “descendant node” on the downstream end of b. Let s(n) ∈ S ^{II} be a sequence state at the node n ∈ {n}_{ T }. Especially, we use abbreviations: s ^{A}(b)≡s(n ^{A}(b)) ∈ S ^{II} and s ^{D}(b)≡s(n ^{D}(b)) ∈ S ^{II}. Finally, as mentioned in Background, we suppose that the branch lengths, {bb ∈ {b}_{ T }}, and the indel model parameters, {Θ _{ ID }(b)}_{ T }≡{Θ _{ ID }(b)b ∈ {b}_{ T }}, are all given. Note that the model parameters Θ _{ ID }(b) could depend on the branch, at least theoretically.
First, we extend the ideas proposed in [13, 14, 36] to each indel history along a tree, by regarding the indel history along a branch as a map (or a transformation) from the ancestral state to the descendant state, as follows. An indel history along a tree consists of indel histories along all branches of the tree that are interdependent, in the sense that the indel process of a branch b determines a sequence state s ^{D}(b) at its descendant node n ^{D}(b), on which the indel processes along its downstream branches depend. Thus, an indel history on a given root sequence state s ^{Root} = s(n ^{Root}) ∈ S ^{II} automatically determines the sequence states at all nodes, {s(n) ∈ S ^{II} for ^{∀} n ∈ {n}_{ T }}. Let \( {\tilde{\mathrm{H}}}^{ID}\left({s}_0\right)\equiv {\displaystyle {\cup}_{N=0}^{\infty }{\mathrm{H}}^{ID}\left(N;{s}_0\right)} \) (with Η^{ID}(N; s _{0}) defined below Eq. (R4.6)) be the set of all indel histories along a time axis (or a branch) starting with state s _{0}. Then, each indel history, \( {\left\{\overset{\rightharpoonup }{\widehat{M}}(b)\right\}}_T \), along tree T and starting with s ^{Root} can be specifically expressed as:
Here, the symbol, \( {\widehat{M}}_{\nu }(b) \), denotes the ν th event in the indel history along branch b ∈ {b}_{ T }. The probability of the indel history, Eq. (R7.1), can be calculated as:
Here, the probability of an indel history, \( \overset{\rightharpoonup }{\widehat{M}}(b)=\left[\widehat{M}{}_1(b),\dots, \widehat{M}{}_{N(b)}(b)\right]\in {\tilde{\mathrm{H}}}^{ID}\left({s}^A(b)\right) \), along branch b ∈ {b}_{ T } is given by the probability during the corresponding time interval, [t(n ^{A}(b)), t(n ^{D}(b))]:
Here we explicitly showed the branchdependence of the model parameters.
Now, consider a MSA, \( \alpha \left[{s}_1,{s}_2,\dots, {s}_{N^X}\right] \), among the sequences at the external nodes, s _{ i } = s(n _{ i }) ∈ S ^{II} (n _{ i } ∈ Ν ^{X}(T)). (Remember that the term “MSA” here means its homology structure, as noted in endnote (10)). Let \( \left({s}^{Root},{\left\{\overset{\rightharpoonup }{\widehat{M}}(b)\right\}}_T\right) \) be a pair of a root state and an indel history along T starting with the state. And let \( {\tilde{\Psi}}^{ID}\left[\alpha \left[{s}_1,{s}_2,\dots, {s}_{N^X}\right];T\right] \) be the set of all such pairs defined on T consistent with \( \alpha \left[{s}_1,{s}_2,\dots, {s}_{N^X}\right] \). Then, analogously to Eq. (R4.9) supplemented with Eq. (R4.7) for a PWA, the probability of a given MSA under a given model setting (including T) should be expressed as:
which is supplemented with Eq. (R7.2). Here, P[(s ^{Root}, n ^{Root})] is the probability of state s ^{Root} at the root node. (It may be interpreted as the prior in a Bayesian formalism.) If you will, Eqs. (R7.4) and (R7.2) could be considered as the “perturbation expansion” of an ab initio MSA probability. To make this formal expansion more tractable, let \( {\left\{s(n)\right\}}_{N^{IN}}\equiv \left\{s(n)\in S\leftn\in {N}^{IN}(T)\right.\right\} \) denote a set of ancestral states at all internal nodes (, or, more precisely, its equivalence class in the sense of endnote (8)). To be consistent with a given MSA, the ancestral states must satisfy the “phylogenetic correctness” condition in each MSA column (e.g., [37, 38]).^{Footnote 13} Let \( \Sigma \left[\alpha \left[{s}_1,{s}_2,\dots, {s}_{N^X}\right];\left\{n\in {N}^{IN}(T)\right\};T\right] \) be the set of all \( {\left\{s(n)\right\}}_{N^{IN}} \)’s consistent with \( \alpha \left[{s}_1,{s}_2,\dots, {s}_{N^X}\right] \) (and tree T). Then, Eq. (R7.4) supplemented with Eq. (R7.2) can be rewritten as:
Here, \( P\left[\alpha \left[{s}_1,{s}_2,\dots, {s}_{N^X}\right];{\left\{s(n)\right\}}_{N^{IN}}\leftT\right.\right] \) is the probability of simultaneously getting \( \alpha \left[{s}_1,{s}_2,\dots, {s}_{N^X}\right] \) and \( {\left\{s(n)\right\}}_{N^{IN}} \). This probability is the sum of contributions from all indel histories sharing the same homology structure among sequence states at all nodes. Especially, the sequence states at internal nodes have homology structures (with the states at other nodes) fixed for respective nodes. Thus, through some reasoning (explained in SM4), we get:
Here,
is the probability of the ancestordescendant PWA along branch b. This Eq. (R7.6) is basically the expression proposed in [13, 14], and we demonstrated in effect that their proposal also holds even with a genuine stochastic evolutionary model. Usually, Eq. (R7.5) supplemented with Eq. (R7.6) is much more tractable than Eq. (R7.4) supplemented with Eq. (R7.2), because of the two reasons. (1) Usually, it is not the indel history along the tree but (the homology structure of) the set of ancestral sequence states that is inferred from a given MSA. (2) The probability of each indel history along the tree (Eq. (R7.2)) is not factorable in general, whereas Eq. (R7.6) is a product of PWA probabilities, each of which should be factorable if the conditions (i) and (ii) in section R6 are satisfied.
Now, we can show that, if the “condition (iii)” given below in addition to conditions (i) and (ii) is satisfied, we can factorize the MSA probability into a form somewhat similar to Eq. (R6.7) for the PWA probability. In subsection 4.2 of [32], we demonstrated it using the historybased expansion of the MSA probability (i.e., Eq. (R7.4) supplemented with Eq. (R7.2)). In Supplementary methods SM4, we will use the ancestralstatebased expansion (i.e., Eq. (R7.5) supplemented with Eq. (R7.6)), as was only briefly sketched at the bottom of subsection 4.2 of (ibid.). In a MSA, gapless columns play almost the same role as PASs in a PWA. Because of the aforementioned “phylogenetic correctness” condition, a gapless column indicates that no indel event hit or pierced the site. Therefore, gapless columns will partition a MSA into regions each of which accommodates a local subset of every global history. Analogously to the argument above Eq. (R6.7), let \( {C}_1,{C}_2,\dots, {C}_{K_{max}} \) be the maximum possible set of such regions determined by a given MSA and a model setting (including the tree) (Figure S2 in Additional file 1). (As argued in subsection R83, all gapless columns are not necessarily needed to delimit the regions.) Because the summation in Eq. (R7.5) involves the summation over all MSAconsistent root states, it would be convenient to specify a “reference” root state, s ^{Root}_{0} . It can be anything, as long as it is the state at the root consistent with \( \alpha \left[{s}_1,{s}_2,\dots, {s}_{N^X}\right] \). Technically, one good candidate for s ^{Root}_{0} would be a root state obtained by applying the Dollo parsimony principle [39] to each column of the MSA, because it is arguably the most readily available state that satisfies the phylogenetic correctness condition along the entire MSA. Then, we will impose the following condition.
Condition (iii):
Here the multiplication factor, μ _{ P }[s ^{Root}, s ^{Root}_{0} , n ^{Root}; C _{ Κ }], represents the change in the state probability at the root due to the difference between s ^{Root} and s ^{Root}_{0} within C _{ Κ }. This equation holds, e.g., when P[(s ^{Root}, n ^{Root})] is a geometric distribution or a uniform distribution of the root sequence length.^{Footnote 14}
Under the conditions (i), (ii) and (iii), through a series of formal calculations and reasoning, Eq. (R7.5) supplemented with Eq. (R7.6) can be reexpressed into the final factorized form:
Here,
is the probability of having state s ^{Root}_{0} that has been intact all across tree T, and \( {\tilde{\overset{\smile }{M}}}_P\left[\alpha \left[{s}_1,{s}_2,\dots, {s}_{N^X}\right];{s}_0^{Root};{C}_K\leftT\right.\right] \) is the multiplication factor contributed from all local indel histories (along T) confined in C _{ Κ }.^{Footnote 15} Briefly, the multiplication factor is the summation of terms over all possible sets of the MSAconsistent ancestral states in C _{ Κ }. And each of the terms is the product of the local PWA multiplication factors (Eq. R6.8) confined in C _{ Κ } (Figure S2 in Additional file 1), the exponential of minus the summation over all b’s of the timeintegrated exit rate differences between s ^{A}(b) and s ^{Root}_{0} coming from C _{ Κ }, and μ _{ P }[s ^{Root}, s ^{Root}_{0} , n ^{Root}; C _{ Κ }] for the root state probability. (For the factor’s exact expression and the detailed derivation of Eq. (R7.9), see Supplementary methods SM4 in Additional file 1).
R8. Examples: Models with factorable/nonfactorable alignment probabilities
A merit of conditions (i) and (ii) given in section R6 is that they can draw the line between evolutionary models with factorable PWA probabilities and those with nonfactorable ones. To illustrate the use of these conditions, we here give three examples: (1) a simple model with factorable probabilities, (2) a simple model with nonfactorable probabilities, and (3) a nontrivial model with factorable probabilities. (For more examples, see section 5 of [32]).
R81. Totally spacehomogeneous model
The simplest conceivable indel models would be those whose indel rate parameters are spacehomogeneous, i.e., independent of the positions where the indels occur:
In fully spacehomogeneous models, these equations hold for 1 ≤ x ≤ L(s) − 1, 1 ≤ l _{1} ≤ L ^{CO}_{ I } , 1 ≤ l _{2} ≤ L ^{CO}_{ D } , and 2 − l _{2} ≤ x _{ B } ≤ L(s), where L ^{CO}_{ I } and L ^{CO}_{ D } are the “cutoff lengths” for insertions and deletions, respectively. (Depending on the model, r _{ I }(0, l; s, t) = g _{ I;L }(l, t) and r _{ I }(L(s), l; s, t) = g _{ I;R }(l, t) could differ from g _{ I }(l, t) in Eq. (R81.1)). In fact, these conditions were imposed in nearly all continuoustime Markov models of indels that were studied in the past. Note that the rate parameters in Eqs. (R81.1,R81.2) could depend on time, although most studies thus far assumed that the rates are timeindependent as well. Eqs. (R81.1,R81.2) automatically guarantees condition (i). Thus, all we have to do is check whether or not condition (ii) is also satisfied. Indeed, we can show it is. The exit rate of this model is calculated by substituting Eqs. (R81.1,R81.2) into Eq. (R4.3) (supplemented with Eqs. (R3.14,R3.15)), and we find that it is an affine function of the sequence length (L(s)):
with \( A(t)={\displaystyle {\sum}_{l=1}^{L_I^{CO}}{g}_I\left(l,t\right)}+{\displaystyle {\sum}_{l=1}^{L_D^{CO}}{g}_D\left(l,t\right)} \) and \( B(t)={\displaystyle {\sum}_{l=1}^{L_D^{CO}}\left(l1\right){g}_D\left(l,t\right)}{\displaystyle {\sum}_{l=1}^{L_I^{CO}}{g}_I\left(l,t\right)}+{\displaystyle {\sum}_{l=1}^{L_I^{CO}}\left({g}_{I;L}\left(l,t\right)+{g}_{I;R}\left(l,t\right)\right)} \). If the exit rate is affine, we have, for \( \left\langle s\left(\nu \right)\right=\left\langle s\left(\nu 1\right)\right{\widehat{M}}_{\nu } \):
Here \( \delta L\left({\widehat{M}}_{\nu}\right) \) is the length change caused by the event, \( {\widehat{M}}_{\nu } \). The rightmost hand side of this equation depends only on \( {\widehat{M}}_{\nu } \) and the time it occurred, but not on the sequence state (s(ν − 1)). Thus, condition (ii) is always satisfied under fully spacehomogenous models, which means that alignment probabilities calculated ab initio (as in section R4) under such models are factorable, as shown in section R6.
An important special case of the spacehomogeneous model is the model used by Dawg [26], whose indel rate parameters are given as: g _{ I }(l, t) = g _{ I;L }(l, t) = g _{ I;R }(l, t) = λ _{ I } f _{ I }(l) and g _{ D }(l, t) = λ _{ D } f _{ D }(l). Because this is a special case of Eqs. (R81.1,R81.2), it naturally provides factorable alignment probabilities. This model is probably among the most flexible indel evolutionary models used thus far. The model accommodates any distributions of indel lengths (f _{ I }(l) and f _{ D }(l)) that are independent of each other, and independent total rates for insertions and deletions (λ _{ I } and λ _{ D }). Some of our studies [40, 41] are mostly based on this model.
Another important special case is the “long indel” model [21], whose (timeindependent) rate parameters are given by: g _{ I }(l, t) = λ _{ l }, \( {g}_{I;L}\left(l,t\right)={g}_{I;R}\left(l,t\right)={\tilde{\lambda}}_l^{(end)} \) (if L(s) > 0), \( {g}_{I;L}\left(l,t\right)={\tilde{\tilde{\lambda}}}_l^{(whole)} \) (if L(s) = 0), and g _{ D }(l, t) = μ _{ l }. This model is less flexible than Dawg’s model, because its indel rates are subject to the detailedbalance conditions: λ _{ l } = (λ _{1}/μ _{1})^{l} μ _{ l }, \( {\tilde{\lambda}}_l^{(end)}={\left({\lambda}_1/{\mu}_1\right)}^l{\displaystyle {\sum}_{l^{\prime }=l}^{L_D^{CO}}{\mu}_{l^{\prime }}} \), and \( {\tilde{\tilde{\lambda}}}_l^{(whole)}={\left({\lambda}_1/{\mu}_1\right)}^l{\displaystyle {\sum}_{l^{\prime }=l}^{L_D^{CO}}\left({l}^{\prime }1+1\right){\mu}_{l^{\prime }}} \). Like Dawg’s model, this model is a special case of the model defined by Eqs. (R81.1,R81.2). Thus, the alignment probabilities calculated under it are indeed factorable, as verbally justified in [21]. Indeed, we can explicitly show that, as far as each LHS equivalence class is concerned, the indel component of its probability calculated according to the recipe of [21] equals the product of P[([], [t _{ I }, t _{ F }])(s ^{A}, t _{ I })] and Eq. (R6.2), i.e., the “total probability” of the LHS equivalence class via our ab initio formulation, calculated with the aforementioned indel rate parameters. The proof is given in Supplementary appendix SA3 in Additional file 2. It should be stressed that, although [21] ignored condition (ii), this caused no problem thanks to Eq. (R81.4) satisfied by any fully spacehomogeneous models. Actually, it is this condition (ii) that guarantees the equivalence of the probabilities calculated via the two methods, because it equates each increment of the exit rate of a chopzone with that of an entire sequence. The equivalence can be extended to between PWA probabilities, provided that the contributing local indel histories are correctly enumerated. (We are uncertain about whether this extended equivalence indeed holds, because [21] did not explicitly describe how the local indel histories were enumerated).
Regarding the insertion rates, we could somewhat relax the spacehomogeneity without compromising the factorability of alignment probabilities. For example, the insertion rates could depend on the ancestries, υ(s, x) and υ(s, x + 1), of sites flanking the event:
These rates satisfy condition (i). Eq. (R81.5) combined with the spacehomogeneous deletion rates, Eq. (R81.2), still gives an exit rate whose increment due to an indel event depends only on the inserted/deleted subsequence (and flanking sites) but not on the regions separated from it by at least a PAS. Hence the model also satisfies condition (ii), thus providing factorable alignment probabilities. Relaxing the spacehomogeneity of deletion rates, however, is somewhat difficult, particularly because of condition (ii). In subsection R83, we will attempt it.
R82. Spacehomogeneous model flanked by biologically essential sites/regions
The spacehomogeneous models discussed above may decently approximate the evolution of a sequence region under no selective pressure. A real genome, however, is scattered with regions and sites under strong or weak purifying selection. Here, we consider one of the simplest such cases, in which biologically essential sites or regions flank a neutrally evolving region from both sides.^{Footnote 16} The insertion rates of this model are given by Eq. (R81.1) with the same domain, and the deletion rates are:
The exit rate for this model is calculated as:
For L(s) ≥ L ^{CO}_{ D } , this is affine, and given by Eq. (R81.3) with exactly the same A(t) as before and \( B(t)={\displaystyle {\sum}_{l=1}^{L_D^{CO}}\left(l1\right){g}_D\left(l,t\right)}{\displaystyle {\sum}_{l=1}^{L_I^{CO}}{g}_I\left(l,t\right)}+{\displaystyle {\sum}_{l=1}^{L_I^{CO}}\left({g}_{I;L}\left(l,t\right)+{g}_{I;R}\left(l,t\right)\right)} \). Therefore, with such a sequence length, the alignment probability is still factorable even under this model. For L(s) < L ^{CO}_{ D } , in contrast, it exhibits a nonaffine form:
Thus, in this case, condition (ii) will not be satisfied in general, whereas condition (i) is satisfied. This case gives the simplest example of a model with nonfactorable PWA probabilities despite spacehomogeneous rates of indels (as long as they are allowed). In a model with nonfactorable alignment probabilities, the “difference of exit rate differences”:
where \( \left\langle {s}^{\prime}\right=\left\langle s\right{\widehat{M}}_{\nu_1} \), \( \left\langle {s}^{\prime \prime}\right=\left\langle s\right{\widehat{M}}_{\nu_2} \) and \( \left\langle {s}^{\prime \prime \prime}\right=\left\langle s\right{\widehat{M}}_{\nu_2}{\widehat{M}}_{\nu_1} \), indicates the “degree of nonfactorability” due to the pair of events, \( {\widehat{M}}_{\nu_1} \) and \( {\widehat{M}}_{\nu_2} \), that belong to different local histories. (See the argument around Eq. (5.2.6) of [32] for more details.)
R83. Model with rateheterogeneity across regions
It is not only spacehomogenous models but also some spaceheterogeneous models that satisfy both conditions (i) and (ii), albeit partially. Here we give an example. We first define a set of nonoverlapping regions, Ε_{ y }(s _{ I })≡[x ^{0}_{ B;y } , x ^{0}_{ E;y } ] (with y = 1, …, Y), that existed in the initial state, s _{ I } ∈ S ^{II}. We define the “descendant region”, Ε_{ y }(s), of Ε_{ y }(s _{ I }) in a descendant state (s) by the closed interval, Ε_{ y }(s)≡[x _{ B;y }(s), x _{ E;y }(s)], where x _{ B;y }(s) and x _{ E;y }(s) are the leftmost and the rightmost sites, respectively, among those descended from the sites in Ε_{ y }(s _{ I }). Then, based on them, we define an indel model whose rate parameters are given by:
Here, the “baseline” indel rates, {r _{ I;Base }(x, l; s, t)}_{ x,l } and \( {\left\{{r}_{D; Base}\left({x}_B,{x}_E;s,t\right)\right\}}_{x_B,{x}_E} \), are given by Eq. (R81.5) and Eq. (R81.2), respectively. The regionspecific increments, {Δr _{ I }[Ε_{ y }](x, l; s, t)}_{ x,l } and \( {\left\{\Delta {r}_D\left[{\mathrm{E}}_y\right]\left({x}_B,{x}_E;s,t\right)\right\}}_{x_B,{x}_E} \), can be nonzero only within Ε_{ y }(s)≡[x _{ B;y }(s), x _{ E;y }(s)] defined above (panel a of Figure S3 in Additional file 1). Moreover, the increments can depend only on the portion of the sequence state within Ε_{ y }(s). The increments can be negative, as long as the entire rates, Eqs. (R83.1,R83.2), are nonnegative. From Eqs. (R83.1,R83.2), the exit rates can be decomposed as:
Here,
is the baseline exit rate. And
is the increment of the exit rate confined in, and dependent only on, Ε_{ y }(s) (y = 1, …, Y). As explained at the bottom of subsection R81, R ^{ID}_{ X;Base } (s, t) alone gives factorable alignment probabilities. And the increments, {ΔR ^{ID}_{ X } [Ε_{ y }](s, t)}_{ y = 1,…,Y }, behave independently of the portions of sequence states outside Ε_{ y }(s). Thus, if each indel event is completely confined in any of the Ε_{ y }(s)’s or in any spacer regions between neighboring Ε_{ y }(s)’s (Figure S3, panel a), the alignment probability can be expressed as the product of the overall factor and the contributions from Ε_{ y }(s)’s and within spacer regions. Even if some events within a Ε_{ y }(s) are separated from the others by at least a PAS, they must be put together into a single local indel history (panel a). A complexity arises because deletions may stick out of a Ε_{ y }(s), or even bridge two or more regions (panels b and c). The rates of such deletions and indels that are completely outside of the regions are given by the baseline rates. When a deletion sticks out of a region, the region will be extended to encompass the deletion, and all events within the extended region are lumped into a single local indel history (panel b). When a deletion bridges two or more regions, a “metaregion” encompassing all bridged regions is defined, and all events within the metaregion will form a single local indel history (panel c). In contrast, the indels completely outside of the regions should be independent of each other as long as they are separated by at least a PAS. Hence, under this model, the PWA probabilities are “factorable” in this somewhat nontrivial sense.
In Supplementary appendix SA3 in Additional file 2, we explicitly showed that the probability of a LHS equivalence class via the recipe of [21] is identical to that calculated via our ab initio formulation. Although we assumed the spacehomogeneity there, the proof can probably be extended to the model in this subsection as well, by slightly modifying the definition of the “chopzone”.
R9. Merits, possible extensions & applications, and outstanding issues
In this paper, we presented a theoretical formulation built up by tools that help mathematically precise dissection of the ab initio calculation of alignment probabilities under genuine stochastic evolutionary models. Another merit of this formulation is that it gives intuitively clear pictures. For example, the insertion and deletion operators simply mathematically represent the intuitive pictures of the indels naturally acting on sequences (Fig. 3). Thus, the action of the rate operator, given by Eqs. (R3.6R3.10) (or Eqs. (R3.11R3.15)), is intuitively understandable as merely the collection of all possible singlemutational channels from a given sequence state (and some compensating terms). Then, the expansion formula for the action of the finitetime transition operator, Eqs. (R4.6,R4.7), can also be intuitively interpreted as the collection of contributions from all possible mutational processes starting with an initial sequence state. Importantly, this expansion was not posed via a handwaving argument but rigorously derived as the solution of the defining equations of the model (Eqs. (R3.19R3.21)), which justifies its ab initio status. And the integral equations, Eqs. (R4.4,R4.5), bridged the expansion’s mathematically rigorous and intuitive aspects. Finally, the binary equivalence relations, Eqs. (R5.2aR5.2d) (e.g., Fig. 5), and their resulting LHS equivalence classes also allow intuitive interpretations as the invariance of the local effects of indels under their relative orders with spatially separate events. Therefore, the conditions for the factorability of PWA probabilities are also intuitively understandable. Although their mathematically rigorous derivations (in Supplementary appendix SA2 in Additional file 2) might appear somewhat formidable, they are actually not so difficult once the aforementioned intuitive pictures are understood. Hence, by coupling the mathematical preciseness with the intuitive clarity, our theoretical formulation is expected to facilitate further advances of the study of ab initio alignment probabilities under genuine stochastic evolutionary models with some biological realism.
For clarity, this study focused only on indels among various mutational types, because indels are essential for creating a sequence alignment. If desired, however, our theoretical formulation could also incorporate substitutions ([31]; see also [42]). Moreover, the formulation could also be extended to incorporate other genome rearrangements, such as duplications and inversions. (See [31] for an initial, rudimentary attempt.) Such an extended formulation will provide tools to enable concrete analyses of “rate grammars” extended to incorporate genome rearrangements (briefly mentioned in [21]).
The practical use of our formulation depends on how efficiently it can calculate quite accurate alignment probabilities. Although the factorability of alignment probabilities will help greatly speed up the computation, the contribution from each local region (e.g., Eq. (R6.8) or Eq. (SM4.22) in Additional file 1) is still composed of infinitely many terms. Good news is that the first approximation of each local contribution, which is the summation of the terms from parsimonious local indel histories alone, is quite accurate, as long as the gap lengths and the branch lengths are at most moderate (Ezawa, unpublished; draft manuscripts: [40, 41]). Thus, considerably efficient computation of considerably accurate alignment probabilities may be possible based on our formulation. Especially, at least when the model is spatiotemporally homogeneous, our ab initio calculation was shown to be equivalent to the calculation of [21], with a caveat (see subsection R81). Thus, their dynamic programming (DP) may be applicable, possibly with some modifications, to a wider class of models with factorable probabilities.
Despite these favorable aspects, our theoretical formulation still has some limitations and outstanding issues. First, we did not examine whether our “sufficient and nearly necessary” set of conditions for the alignment probability factorization is exactly necessary and sufficient or not. Nor did we provide any counterexamples that violate our set of conditions and still have factorable alignment probabilities. Solving these problems may be interesting at least mathematically.
Second, although in this study we tentatively used the set of positive integers to represent the space of ancestry indices (ϒ), it is obviously not the best choice. Finding, or establishing, a mathematical entity (either a set or a space) that is more suitable for representing ϒ should be another mathematically interesting issue.
Third, in section R8 (and in section 5 of [32]), we only considered simple boundary conditions. Each sequence end was either freely mutable or flanked by a biologically essential region that allows no indels. These boundary conditions may remain good approximations if the subject sequences were extracted from wellcharacterized genomic regions. In real sequence analyses, however, the ends of the aligned sequences are often determined by artificial factors, such as the methods to sequence the genome, detect sequence homology, and annotate the sequences. Moreover, the constant cutoff lengths (L ^{CO}_{ I } and L ^{CO}_{ D } ) were introduced just for the sake of simplicity, to broadly take account of the effects of various factors that suppress very long indels (such as selection, chromosome size, genome stability, etc.). In reality, it is much more likely that the cutoff lengths will vary across regions. Then, the alignment probabilities would be only approximately factorable, as in subsection R82. In order to pursue further biological realism and to enable more accurate sequence analyses, it should be inevitable to address these issues seriously. Eq. (R82.4) may be useful for such studies.
Fourth, we strongly caution the readers that, at this point, a naïve application of our formulation or its algorithmic implementation [41] to a reconstructed MSA is fraught with high risks of incorrect predictions of indel histories, etc. This is because reconstructed MSAs, even if they were reconstructed via stateoftheart aligners (reviewed, e.g., in [43]), are known to be considerably erroneous (e.g., [42, 44, 45]). Thus, it should be preferable to first develop a method or a program that accurately assesses and rectifies alignment errors, preferably by estimating the distribution of fairly likely alternative MSAs (as, e.g., in [16, 46, 47]), before using our formulation to make some evolutionary or biological predictions.
Fifth, in this study, the phylogenetic tree was regarded as given. In many cases, however, the phylogenetic trees must also be inferred from the input sequence data. A theoretically ideal way would be to infer the joint distribution of MSAs and phylogenetic trees, as it is expected to minimize possible prediction biases (e.g., [13, 48–50]). A major problem is that such an analysis would be tremendously timeconsuming in general. At present, it is a totally open question whether our formulation can be adapted to infer a quite accurate joint distribution efficiently enough.
Conclusions
To the best of our knowledge, this is the first study to theoretically dissect the ab initio calculation of alignment probabilities under a genuine stochastic evolutionary model, which describes the evolution of an entire sequence via insertions and deletions (indels) along the time axis. The model handled here extends the previously most general evolutionary model, i.e., the general form of the “substitution/inserton/deletion models” [21]. It should be noted that we did not impose any unnatural restrictions such as the prohibition of overlapping indels. Nor did we make the preproof assumption that the probability is factorable into the product of columntocolumn transition probabilities or blockwise contributions. The essential tool introduced in this study was the operator representation of indels. This enabled us to shift the focus from the trajectory of sequence states (as in [21]) to the series of indel events, and to define localhistoryset (LHS) equivalence classes of indel histories. Moreover, the operator representation also facilitated the adaptation of the timedependent perturbation expansion (e.g., [29, 30, 33]), which enabled us to express the probability of an alignment as a summation of probabilities over all alignmentconsistent indel histories. Then, under a most general set of indel rate parameters, we exploited the LHS equivalence classes and found a “sufficient and nearly necessary” set of conditions on the indel rate parameters and exit rates under which the ab initio alignment probabilities can be factorized to provide a sort of generalized HMMs. We also showed that quite a wide variety of indel models could satisfy this set of conditions. Such models include not only the “long indel” model [21] and the indel model of a genuine molecular evolution simulator, Dawg [26], but also some sorts of models with rate variation across regions. Moreover, we explicitly showed (in Supplementary Appendix SA3 in Additional file 2) that, as far as each LHS equivalence class is concerned, the probability calculated via the method of [21] is equivalent to that calculated via our ab initio formulation, at least under their spatiotemporally homogeneous indel model.
To summarize, by depending purely on the first principle and by providing intuitively clear pictures, this study established firm theoretical grounds that will help further advance the ab initio calculation of alignment probabilities under genuine stochastic evolutionary models with some biological realism. And our theoretical formulation will also provide other indel probabilistic models with a sound reference point, provided that there exist approximate methods that can quite accurately estimate the ab initio alignment probabilities fairly efficiently. Such approximate methods will be the subject of a related study (Ezawa, unpublished; draft manuscripts available [40, 41]).
Abbreviations
HMM, hidden Markov model; indel(s), insertion(s)/deletion(s); LHS, local history set; MSA, multiple sequence alignment; PAS, preserved ancestral site; PWA, pairwise (sequence) alignment; SID model, substitution/insertion/deletion model
Notes
This poses no problem here because the summation is always bounded from above (by a number less than or equal to unity) and all terms in the summation are nonnegative, which guarantees the convergence of the expansion.
However, the two manuscripts differ in some aspects, e.g., their starting points. In [32], we described our model from scratch, as a continuoustime Markov model, and only briefly discussed its relationship with the general SID model [21]. In contrast, this manuscript explicitly presents our model as an extension of the general SID model, because that would put our model into the historical context of studies on indel evolutionary models.
It may be worth mentioning, though, that the operator notation allows flexible representations of general state changes (by mutations). In the vectormatrix notation, this is possible only via abstract mutation matrices (and state vectors); concrete matrices (and vectors) can at most describe some fixed specific indel histories.
In Eq.(R1.1), ω(∈Ω) and ω ^{′}(∈Ω), respectively, are the residues before and after the substitution. s _{ I } in Eq.(R1.2) denotes the inserted subsequence, and s _{ D } in Eq.(R1.3) denotes the deleted subsequence. And the equation, s = s _{ L } ωs _{ R }, for example, states that the sequence s is formed by concatenating the three factors, s _{ L }, ω and s _{ R }.
Besides, as claimed in [21], the rate grammar could be extended to formally describe a wide variety of evolutionary processes, including duplication, inversion and translocation.
This should be understood as a brief representation. The precise representation is: \( \breve{s}={\left({\overrightarrow{\upsilon}}^t,{\overrightarrow{\omega}}^t\right)}^t \), where A ^{t} denotes the transposition (i.e., swapping the roles of rows and columns) of matrix A. (See Figure 2b.)
Inspired by profile HMMs (e.g., [51]) and the idea of positionspecific evolutionary rates [25], we originally devised ancestry indices in order to distinguish columns of a given alignment from one another. Their values themselves are not considered so important. Thus, it would be convenient to reassign the ancestry indices as follows, after an indel process (or history) created an alignment, α, whether it is among only extant sequences or among sequence states at all nodes of the phylogenetic tree. (1) Reassign 1, 2, …, α (= the number of columns in α) to the sites corresponding to the columns of α, from left to right. (2) Reassign α + 1, α + 2, …. to the “evanescent” sites with no corresponding alignment columns, again from left to right. This reassignment can be considered as replacing a set of aligned sequence states created by an indel process (or history) with a “representative” set “equivalent” to the former set in the sense that both give the same homology structure [48]. The reassignment may facilitate the understanding of the arguments in sections R5 through R8. (The figures in this paper do not undergo this reassignment, though.)
As far as the sequence (with state \( \breve{s} \)) is concerned, \( {\widehat{M}}_D\left({x}_B,{x}_E\right) \) with x _{ B } < 1, is indistinguishable from \( {\widehat{M}}_D\left(1,{x}_E\right) \), and \( {\widehat{M}}_D\left({x}_B,{x}_E\right) \) with \( {x}_E>L\left(\breve{s}\right) \) is indistinguishable from \( {\widehat{M}}_D\left({x}_B,L\left(\breve{s}\right)\right) \).
In this paper, α(…) (or α[…]) is intended to denote the homology structure [48] of an alignment, and thus the symbol doesn’t care about details on the ancestry indices or residue states filling in the alignment other than the distinction of different columns in the alignment. And, hereafter, the terms “alignment”, “PWA”, and “MSA” mean their homology structures.
Actually, we could also define the equivalence relationships between products of nonseparated indel operators (nonexhaustively listed in Appendix A1 of [32]), and they may assist further theoretical developments. However, discussing these extra equivalences is beyond the scope of this manuscript.
Such a maximum set does not necessarily consist of all PASs in the PWA. An example is given in subsection R83.
The “phylogenetic correctness” condition guarantees that the sites aligned in a MSA column should share an ancestry. The condition could be rephrased as: “if a site corresponding to the column is present at two points in the phylogenetic tree, the site must also be present all along the shortest path connecting the two points”.
HMMs commonly use geometric distributions of sequence lengths. The uniform distribution may be a good approximation if we can assume that the ancestral sequence was sampled randomly from a chromosome of length L _{ C }. In this case, the distribution of the sequence length, L(s)(< < L _{ C }), would be proportional to (1 − (L(s) − 1)/L _{ C }) ≈ 1.
\( {\tilde{\overset{\smile }{\mathrm{M}}}}_P\left[\alpha \left[{s}_1,{s}_2,\dots, {s}_{N^X}\right];{s}_0^{Root};{C}_K\leftT\right.\right] \) should be equivalent to \( {\tilde{\overset{\smile }{\mathrm{M}}}}_P\left[{\tilde{\Lambda}}_{\Psi}^{ID}\left[{C}_{\mathrm{K}};\alpha \left[{s}_1,{s}_2,\dots, {s}_{N^X}\right];T\right]\leftT\right.\right] \) given in Eq.(4.2.9c) of [32], although the two expressions may appear quite different at first glance.
Of course, we can also consider a model where only a single essential site/region flanks a ratehomogeneous neutral region. Alignment probabilities of this model can be shown to be factorable because the exit rate is an affine function of the sequence length (subsection 5.2 of [32]).
References
Graur D, Li WH. Fundamentals of Molecular Evolution. 2nd ed. Sunderland: Sinauer Associates; 2000.
Gascuel O, editor. Mathematics of Evolution and Phylogeny. New York: Oxford University Press; 2005.
Lynch M. The Origins of Genome Architecture. Sunderland: Sinauer Associates; 2007.
Britten RJ. Divergence between samples of chimpanzee and human DNA sequences is 5%, counting indels. P Natl Acad Sci USA. 2002;99:13633–5.
Britten RJ, Rowen L, Willians J, Cameron RA. Majority of divergence between closely related DNA samples is due to indels. P Natl Acad Sci USA. 2003;100:4661–5.
The International Chimpanzee Chromosome 22 Consotrium. DNA sequence and comparative analysis of chimpanzee chromosome 22. Nature. 2004;429:382–8.
The Chimpanzee Sequencing and Analysis Consortium. Initial sequence of the chimpanzee genome and comparison with the human genome. Nature. 2005;437:69–87.
Bishop MJ, Thompson EA. Maximum likelihood alignment of DNA sequences. J Mol Biol. 1986;190:159–65.
Thorne JL, Kishino H, Felsenstein J. An evolutionary model for maximum likelihood alignment of DNA sequences. J Mol Evol. 1991;33:114–24.
Rivas E. Evolutionary models for insertions and deletions in a probabilistic modeling framework. BMC Bioinformatics. 2005;6:63.
Bradley RK, Holmes I. Transducers: an emerging probabilistic framework for modeling indels on trees. Bioinformatics. 2007;23:3258–62.
Miklós I, Novák Á, Satija R, Lyngsø R, Hein J. Stochastic models of sequence evolution including insertiondeletion events. Stat Methods Med Res. 2009;18:453–85.
Holmes I, Bruno WJ. Evolutionary HMMs: a Bayesian approach to multiple sequence alignment. Bioinformatics. 2001;17:803–20.
Holmes I. Using guide trees to construct multiplesequence evolutionary HMMs. Bioinformatics. 2003;19:i147–57.
BouchardCôté A. A note on probabilistic models over strings: The linear algebra approach. Bull Math Biol. 2013;75:2529–50.
Herman JL, Novák Á, Lyngsø R, Szabó A, Miklós I, Hein J. Efficient representation of uncertainty in multiple sequence alignments using directed acyclic graphs. BMC Bioinformatics. 2015;16:108.
Thorne JL, Kishino H, Felsenstein J. Inching toward reality: an improved likelihood model of sequence evolution. J Mol Evol. 1992;34:3–16.
Miklós I, Toroczkai Z. An improved model for statistical alignment. In: Gascuel O, Moret BME, editors. WABI 2001, LNCS 2249. Heidelberg: SplingerVerlag; 2001.
Cartwright RA. Problems and solutions for estimating indel rates and length distribution. Mol Biol Evol. 2009;26:473–80.
Lunter G, Rocco A, Mimouni N, Heger A, Caldeira A, Hein J. Uncertainty in homology inferences: assessing and improving genomic sequence alignment. Genome Res. 2008;18:298–309.
Miklós I, Lunter GA, Holmes I. A “long indel” model for evolutionary sequence alignment. Mol Biol Evol. 2004;21:529–40.
Kim J, Sinha S. Indelign: a probabilistic framework for annotation of insertions and deletions in a multiple alignment. Bioinformatics. 2007;23:289–97.
Rivas E, Eddy SR. Probabilistic phylogenetic inference with insertions and deletions. PLoS Comput Biol. 2008;4:e1000172.
Gu W, Zhang F, Lupski JR. Mechanisms for human genomic rearrangements. PathoGenetics. 2008;1:4.
Rivas E, Eddy SR. Parameterizing sequence alignment with an explicit evolutionary model. BMC Bioinformatics. 2015;16:406.
Cartwright RA. DNA assembly with gap (Dawg): simulating sequence evolution. Bioinformatics. 2005;21:iii31–8.
Fletcher W, Yang Z. INDELible: A flexible simulator of biological sequence evolution. Mol Biol Evol. 2009;26:1879–88.
Strope CL, Abel K, Scott SD, Moriyama EN. Biological sequence simulation for testing complex evolutionary hypothesis: indelSeqGen version 2.0. Mol Biol Evol. 2009;26:2581–93.
Dirac PAM. The Principles of Quantum Mechanics. 4th ed. London: Oxford University Press; 1958.
Messiah A. Quantum Mechanics, Volume II. (Translated from French to English by Potter J). Amsterdam: NorthHolland; 1961.
Ezawa K, Graur D, Landan G. Perturbative formulation of general continuoustime Markov model of sequence evolution via insertions/deletions, Part IV: Incorporation of substitutions and other mutations. bioRxiv. 2015. doi:10.1101/023622. Accessed 4 Aug 2015.
Ezawa K, Graur D, Landan G. Perturbative formulation of general continuoustime Markov model of sequence evolution via insertions/deletions, Part I: Theoretical basis. bioRxiv. 2015. doi:10.1101/023598. Accessed 4 Feb 2016.
Messiah A. Quantum Mechanics, Volume 1. (Translated from French to English by Temmer GM). Amsterdam: NorthHolland; 1961.
Gillespie DT. Exact stochastic simulation of coupled chemical reactions. J Phys Chem. 1977;81:2340–61.
Feller W. On the integrodifferential equations of purely discontinuous markov processes. T Am Math Soc. 1940;48:488–515.
Redelings BD, Suchard MA. Joint Bayesian estimation of alignment and phylogeny. Syst Biol. 2005;54:401–18.
Chindelevitch L, Li Z, Blais E, Blanchette M. On the inference of parsimonious evolutionary scenarios. J Bioinform Comput Biol. 2006;4:721–44.
Diallo AB, Makarenkov V, Blanchette M. Exact and heuristic algorithms for the indel maximum likelihood problem. J Comput Biol. 2007;14:446–61.
Farris JS. Phylogenetic analysis under Dollo’s law. Syst Zool. 1977;26:77–88.
Ezawa K, Graur D, Landan G. Perturbative formulation of general continuoustime Markov model of sequence evolution via insertions/deletions, Part II: Perturbation analyses. bioRxiv. 2015. doi:10.1101/023606. Accessed 4 Aug 2015.
Ezawa K, Graur D, Landan G. Perturbative formulation of general continuoustime Markov model of sequence evolution via insertions/deletions, Part III: Algorithm for first approximation. bioRxiv. 2015. doi:10.1101/023614. Accessed 4 Aug 2015.
Ezawa K. Characterization of multiple sequence alignment errors using completelikelihood score and positionshift map. BMC Bioinformatics. 2016;17:133.
Notredame C. Recent evolutions of multiple sequence alignment algorithms. PLoS Comput Biol. 2007;3:e123.
Löytynoja A, Goldman N. Phylogenyaware gap placement prevents errors in sequence alignment and evolutionary analysis. Science. 2008;320:1632–5.
Landan G, Graur D. Characterization of pairwise and multiple sequence alignment errors. Gene. 2009;441:141–7.
Paten B, Herrero J, Fitzgerald S, Beal K, Flicek P, Holmes I, Birney E. Genomewide nucleotidelevel mammalian ancestor reconstruction. Genome Res. 2008;18:1829–43.
Westesson O, Lunter G, Paten B, Holmes I. Accurate reconstruction of insertiondeletion histories by statistical phylogenetics. PLoS One. 2012;7:e34572.
Lunter GA, Miklós I, Drummond A, Jensen JL, Hein J. Bayesian coestimation of phylogeny and sequence alignment. BMC Bioinformatics. 2005;6:83.
Suchard MA, Redelings BD. BAliPhy: simultaneous Bayesian inference of alignment and phylogeny. Bioinformatics. 2006;22:2047–8.
Novák Á, Miklós I, Lyngsø R, Hein J. StatAlign: an extendable software package for joint Bayesian estimation of alignments and evolutionary trees. Bioinformatics. 2008;24:2403–4.
Durbin R, Eddy S, Krogh A, Mitchison G. Biological sequence analysis: Probabilistic models of proteins and nucleic acids. Cambridge: Cambridge University Press; 1998.
The ORCID register of Kiyoshi Ezawa. http://orcid.org/0000000349068578. Accessed May 19, 2016.
Acknowledgements
This study is dedicated to the late Dr. Keiji Kikkawa, a key pioneer of string theory of elementary particle physics and the author’s best mentor. The author would like to greatly thank Dr. Dan Graur at the University of Houston and Dr. Giddy Landan at HeinrichHeine University Düsseldorf for their indispensable assistance with this study. The author is grateful to Dr. Reed A. Cartwright at Arizona State University for his useful information and discussions that inspired this study. The author appreciates the logistic support and the feedback of Dr. Tetsushi Yada at Kyushu Institute of Technology, as well as the encouragement and the feedback of Dr. Toshiaki Takitani, a professor emeritus at Nagoya University. The author would also like to thank Dr. Ian Holmes at the University of California, Berkeley, for his critical comments on the previous version of the manuscript and his information on some relevant previous studies, both of which helped substantially improve the manuscript. The author is also grateful to all of the reviewers and the handling editors of this manuscript and its predecessors, as their feedback definitely helped improve the manuscript.
Funding
This work was a part of the project, “Error Correction in Multiple Sequence Alignments”, which was funded by US National Library of Medicine (grant number: LM01000901 to Dan Graur and Giddy Landan, then at the University of Houston). The later stage of this work was supported by the Ministry of Education, Culture, Sports, Science and Technology (MEXT) of Japan (grant numbers: MEXT KAKENHI Grant numbers 221S0002, 15H01358, both to Tetsushi Yada).
Availability of data and material
The data sets supporting the conclusions of this article are included within the article and its additional files.
Author’s contributions
Not applicable because the paper was written by a single author (KE).
Author’s information
The author (KE) used to be a mathematical physicist, who studied theoretical elementary particle physics and quantum gravitational theories from 1991 till 1999. Then, since 2002, after having studied theoretical biophysics from 1999 till 2002, he has studied molecular evolution (including population genetics), mainly focusing on homologybased computational analyses of DNA and protein sequences. For more detailed information, including the list of his publications, refer to his ORCID record [52].
Competing interests
The author declares that he has no competing interests.
Consent for publication
Not applicable.
Ethics approval and consent to participate
Not applicable.
Author information
Affiliations
Corresponding author
Additional information
An erratum to this article is available at http://dx.doi.org/10.1186/s1285901612824.
Additional files
Additional file 1:
A PDF file that consists of Supplementary methods (sections SM1 through SM4), Figures S1, S2, S3, and Table S1. The sections of Supplementary methods provide detailed derivations of some essential results. Figures S1S3 graphically illustrate via MSAs some important concepts and ideas introduced in the main text. Table S1 summarizes mathematical symbols commonly used in this paper. (PDF 11751 kb)
Additional file 2:
A PDF file that consists of Supplementary appendix (sections SA1, SA2 and SA3). The sections of Supplementary appendix provide mathematical derivations of some important results. (PDF 9581 kb)
Rights and permissions
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.
About this article
Cite this article
Ezawa, K. General continuoustime Markov model of sequence evolution via insertions/deletions: are alignment probabilities factorable?. BMC Bioinformatics 17, 304 (2016). https://doi.org/10.1186/s1285901611057
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/s1285901611057
Keywords
 Stochastic evolutionary model
 Insertion/deletion (indel)
 Sequence alignment probability
 Factorability
 Biological realism
 Powerlaw distribution
 Rate variation
 Nonequilibrium evolution