Abstract
The transition density function of the Wright–Fisher diffusion describes the evolution of population-wide allele frequencies over time. This function has important practical applications in population genetics, but finding an explicit formula under a general diploid selection model has remained a difficult open problem. In this article, we develop a new computational method to tackle this classic problem. Specifically, our method explicitly finds the eigenvalues and eigenfunctions of the diffusion generator associated with the Wright–Fisher diffusion with recurrent mutation and arbitrary diploid selection, thus allowing one to obtain an accurate spectral representation of the transition density function. Simplicity is one of the appealing features of our approach. Although our derivation involves somewhat advanced mathematical concepts, the resulting algorithm is quite simple and efficient, only involving standard linear algebra. Furthermore, unlike previous approaches based on perturbation, which is applicable only when the population-scaled selection coefficient is small, our method is nonperturbative and is valid for a broad range of parameter values. As a by-product of our work, we obtain the rate of convergence to the stationary distribution under mutation–selection balance.
DIFFUSION processes, which are continuous-time Markov processes with almost surely continuous sample paths, have been successfully applied in various population genetic analyses in the past. Examples include finding the stationary distribution of allele frequencies and approximating fixation times and probabilities (see Karlin and Taylor 1981; Ewens 2004; Durrett 2008 for other applications of diffusion processes). This success is largely due to the fact that the diffusion approximation captures the key features of an evolutionary model while ignoring unimportant details, thereby arriving at a simpler process that facilitates computation. However, when a reasonably complex model of evolution is considered, one is faced with unwieldy equations even under the diffusion approximation. In particular, for Wright–Fisher diffusions with general diploid selection, finding an explicit analytic transition density function, which characterizes the evolution of population-wide allele frequencies over time, has remained a challenging open problem. The diffusion theory allows one to write down a partial differential equation (PDE) satisfied by the transition density, but solving the PDE analytically has proved to be difficult.
The transition density has several practical applications, including the following: Recently, there has been growing interest in analyzing samples taken from the same or related populations at different time points. For example, such data arise from experimental evolution of model organisms in the laboratory (e.g., bacteria, see Lenski 2011), from viral/phage populations (Shankarappa et al. 1999; Wichman et al. 1999), or from ancient DNA (Hummel et al. 2005); see also Bollback et al. (2008) and references therein. In particular, the recent sequencing of Neanderthal (Green et al. 2010) and Denisova (Reich et al. 2010) genomes should provide new opportunities for studying the evolution of allele frequencies over time, possibly under the influence of natural selection. In applying the diffusion process to study the evolution of the populations underlying such samples, it is important to find the transition density accurately. Bollback et al. (2008) analyzed samples from multiple time points by using a hidden Markov model in which the hidden states are the population-wide allele frequencies. To approximate the evolution of the allele frequencies, they applied finite difference methods to obtain approximate numerical solutions to the PDE satisfied by the transition density. Finite difference methods were also employed by Gutenkunst et al. (2009) to obtain numerical approximations of the transition density in Wright–Fisher diffusions with population substructure, which the authors applied to develop a useful tool for demographic inference. When employing such numerical methods, however, one needs to exercise caution in choosing appropriate discretization grid points. Which discretization is appropriate may depend strongly on the parameters (e.g., the selection coefficient) of the model, and it is difficult to predict a priori whether a particular discretization will produce accurate solutions. Also, in a numerical approach, note that the PDE needs to be solved afresh if the initial or the final frequency is changed. It would be useful to have a solution that is analytic in those variables.
Since the transition density of the Wright–Fisher diffusion with selection has practical applications, finding an explicit formula has significant merit and several researchers have considered the problem. As detailed later in the text, the so-called spectral representation of the transition density can be found if the eigenvalues and eigenfunctions of the diffusion generator are known. Indeed, this is the approach taken by Kimura (1955a, 1957), first for a diallelic model with genic selection (i.e., the case with the dominance parameter h = 1/2, as described shortly) and later for the case of complete dominant selection (i.e., with h = 1), assuming no recurrent mutation in both cases. More precisely, Kimura proposed perturbation expansions of the eigenvalues and eigenfunctions in powers of the population-scaled selection coefficient σ (defined more precisely later). Although this method is valid for σ < 1, the expansions fail to converge for σ substantially >1 [say, σ > 10, which is not so unusual for adaptive alleles (Eyre-Walker and Keightley 2007)]. Furthermore, the perturbation expansion scheme described in Kimura’s work is not entirely transparent.
For a neutral parent-independent mutation model, an explicit spectral representation of the transition density for the one-locus Wright–Fisher diffusion has been known for some time (Shimakura 1977; Griffiths 1979). Griffiths and Li (1983) and Tavaré (1984) showed that this spectral representation can be interpreted in terms of a stochastic process dual to the diffusion. The time dependency of the transition density is solely given through the probability distribution of this dual process (see Griffiths and Spanò 2010 for an overview). Barbour et al. (2000) extended this duality approach to include a general selection model, but the transition rates of the dual process depend on the moments of the stationary distribution, and under selection these moments are difficult to compute (Donnelly et al. 2001). Hence, while being of theoretical interest, their method does not readily lead to efficient computation of the transition density.
In this article, we develop a new, simple computational method with which to find analytic transition density functions of diallelic Wright–Fisher diffusions under recurrent mutation and arbitrary diploid selection. In contrast to the aforementioned mathematical work based on duality, our method explicitly finds the eigenvalues and eigenfunctions of the diffusion generator associated with the diffusion, thus leading to an explicit spectral representation of the transition density function. Specifically, the eigenfunctions are found as a series of orthogonal functions. Although somewhat advanced mathematical concepts are needed to derive the necessary system of equations, the resulting algorithm is quite simple to describe and easy to implement, involving only standard linear algebra. Furthermore, unlike previous approaches (Kimura 1955a, 1957) based on perturbation, which is applicable only when the population-scaled selection coefficient σ is small, our method is nonperturbative and is valid for a broad range of parameter values, including large values of σ and an arbitrary dominance parameter h. As an application of our work, we obtain the rate of convergence to the stationary distribution under mutation–selection balance.
The rest of this article is organized as follows. We begin with a brief review of the Wright–Fisher diffusion and describe the notion of spectral representation. Orthogonal polynomials, which we extensively employ in our work, are also introduced. Then, we illustrate the key ideas behind our method in the simple case of genic selection and no recurrent mutation. Afterward, we apply our method to the general case of arbitrary diploid selection and recurrent mutation and show how the results for the no-mutation case can be recovered as a special case. We then assess the performance of our method and end with discussions on possible applications and extensions.
Background
In this section, we review useful facts about diffusion processes. In particular, we highlight some key properties satisfied by backward generators of one-dimensional diffusions. We also introduce the relevant orthogonal polynomials that we utilize in our method.
Wright–Fisher diffusions
We consider a Wright–Fisher diffusion process with two alleles, denoted A0 and A1. The population-wide frequency of A1 is denoted by x; hence, the frequency of A0 is 1 − x. The genotype fitness scheme considered in this article is as follows:
We refer to the case with the dominance parameter h = 1/2 as genic selection. The population-scaled selection coefficient is defined as σ = 2Ns, where N corresponds to the diploid population size, which is assumed to remain constant over time. The rate of mutation from A0 to A1 is given by α = 4Nu01 and from A1 to A0 by β = 4Nu10, where u01 (respectively, u10) denotes the per-generation probability of mutation from A0 to A1 (respectively, from A1 to A0).
Note that the genotype fitness scheme introduced above does not include the case in which the homozygotes have a relative fitness of 1 and the heterozygote has a relative fitness unequal to 1. However, by choosing s close to zero and h large, we can mimic such a scheme in our framework. More generally, it is straightforward to apply the technique developed in this article to a selection scheme in which the heterozygote has relative fitness 1 + s1 and the homozygote A1/A1 has relative fitness 1 + s2. However, to conform to the convention widely adopted in the literature, we use the above-mentioned parameterization of relative fitnesses.
Throughout, we use f to denote a twice continuously differentiable bounded function over [0,1]. The backward generator of a one-dimensional diffusion process on [0,1] with diffusion coefficient ν2(x) and drift coefficient μ(x) acts on f as
In the Wright–Fisher diffusion, ν2(x) = x(1 − x). The contribution to μ (x) from selection is
while the contribution from recurrent mutation is
See Ewens (2004, Chap. 5.1) for a more detailed description.
Self-adjointness and the spectrum of a generator
Let L2([0,1],ρ) denote the space of real-valued functions on [0,1] that are square integrable with respect to some real positive density ρ(x). We refer to ρ as the weight function. Define the inner product 〈⋅,⋅〉ρ as
(1) |
for f, g ∈ L2([0,1], ρ).
For a diffusion process with diffusion coefficient ν2(x) and drift coefficient μ(x), the scale density ξ(x) is defined as
(2) |
and the speed density π(x) is defined as
(3) |
where γ is some positive constant and x0 is an arbitrary state in [0,1]. For the results derived in this article it is crucial to establish that is self-adjoint with respect to π. To this end, let f, g ∈ L2([0,1], π) satisfy appropriate boundary conditions relevant to the boundary behavior of the corresponding diffusion. The diffusions considered in this article exhibit exit, regular reflecting, or entrance boundaries. If 0 is an exit boundary, then the appropriate boundary condition is Limx↓0 f(x) = 0. If 0 is either a regular reflecting or an entrance boundary, the appropriate boundary condition is Similar boundary conditions apply as x↑1. See Durrett (2008) or Ewens (2004) for more details. For the diffusions considered in this article, their corresponding boundary conditions and integration by parts imply
thus establishing that is self-adjoint.
The key property (known as the spectral theorem) that we utilize in our work is the following: Suppose B and B′ are eigenfunctions of that satisfy the requisite boundary conditions of the diffusion process. If their eigenvalues Λ and Λ′ are distinct, then the self-adjointness of (i.e., ) implies 〈B, B′〉π = 0. Hence, eigenfunctions of with distinct eigenvalues are orthogonal with respect to the weight function π(x).
That is a self-adjoint negative semidefinite differential operator implies that its eigenvalues are all real and nonpositive. Furthermore, for many boundary conditions, including the ones considered in this article, solutions of satisfying the requisite boundary conditions exist for countably many distinct values of Λ. Thus, for the diffusion processes considered in this article, there is a unique sequence
with Λn → ∞ as n → ∞ (Karlin and Taylor 1981, Chap. 15.13). These eigenvalues are called the “spectrum” of and it can be shown that their associated eigenfunctions which satisfy
form a basis of L2([0,1], π).
Spectral representation of the transition density
For any subset S ⊂ [0,1], the transition density function of a diffusion process is the function p: ℝ≥0 × [0,1] × [0,1] → ℝ≥0 such that
The transition density p(t; x, y) satisfies the Kolmogorov backward equation
and the appropriate boundary conditions, see Karlin and Taylor (1981, Chap. 15.5). Here, the differential operator is the backward generator of the diffusion and it acts on x.
Let {Bn(x)} be the eigenfunctions of that satisfy the proper boundary conditions of the diffusion process. Further, let −Λn denote the eigenvalue of Bn(x). Then, satisfies the partial differential equation
(4) |
and the requisite boundary conditions. Furthermore, since is a linear differential operator, a linear combination of is also a solution to (4). The spectral representation of p(t; x, y) is given by
where the coefficients cn(y) depend on y and are set to satisfy the initial condition. For p(0; x, y) = δ(x − y), the Dirac-delta distribution, we obtain
(5) |
where π is the speed density defined in (3) and 〈⋅,⋅〉π is the inner product defined in (1). See Karlin and Taylor (1981, Chap. 15.13) for further details and examples.
In summary, the transition density function of a diffusion process can be determined if the eigenvalues and the eigenfunctions of are known. The orthogonal polynomials described in the following two subsections are such eigenfunctions for certain neutral Wright–Fisher diffusion processes, and we make extensive use of them in our work to solve the eigenvalue problem in the presence of selection.
In practice, we do not need to sum over infinitely many terms in (5). Since Λn → ∞ as n → ∞, the exponential term will be negligibly small for n sufficiently large. Hence, we can obtain accurate approximations of p(t; x, y) for t > 0 by summing over n from 0 to some reasonable finite cutoff. In Empirical transition densities and stationary distributions and Rate of convergence to the stationary distribution we provide explicit examples illustrating this property.
Jacobi polynomials
An excellent treatise on orthogonal polynomials can be found in Szegö (1939) and a concise collection of related formulas can be found in Abramowitz and Stegun (1965, Chap. 22). Here, we briefly review some key facts about a particular type of classical orthogonal polynomials.
For z ∈ [−1,1], the Jacobi polynomials satisfy the differential equation
(6) |
For fixed a, b > −1, form an orthogonal system with respect to the weight function (1 − z)a (1 + z)b on the interval [−1,1]. Since the domain and the parameters of are not suitable for our purpose, we define the following modified Jacobi polynomials, for x ∈ [0,1] and a, b > 0:
Griffiths and Spanò (2010) use a slightly different, although related, convention.
For x ∈ [0,1], the modified Jacobi polynomials satisfy the differential equation
(7) |
which follows immediately from (6). For fixed a, b > 0, is an orthogonal system with respect to the weight function xa−1(1 − x)b−1 on [0,1]. More precisely,
(8) |
where δn,m denotes the Kronecker delta and the coefficient Δn(a,b) is defined as
(9) |
Furthermore, form a complete basis of the Hilbert space L2([0,1], xa−1(1 − x)b−1).
For n ≥ 1, it can be shown that satisfies the recurrence relation
(10) |
while, for n = 0,
(11) |
Also, note that . The above recurrence relations plays an important role in our work.
Gegenbauer polynomials
The classical Gegenbauer polynomials are a special case of the classical Jacobi polynomials, namely . In our work, we define Gn(x) as
and refer to them as modified Gegenbauer polynomials. The minus sign will prove convenient later. Using (7), it can be shown that Gn(x) satisfies the differential equation
(12) |
Further, {Gn(x)} form an orthogonal system of polynomials with respect to the weight function x−1(1 − x)−1:
Using the completeness of the Jacobi polynomials, it can be shown that {Gn(x)} form a complete basis of L2([0,1], x−1(1 − x)−1).
For n ≥ 1, Gn(x) satisfies the recurrence relation
(13) |
while, for n = 0,
These relations follow from (10) and (11). Furthermore, we have G0(x) ≡ −x(1−x).
Diffusions with Genic Selection and No Mutation
As described earlier, to obtain the spectral representation of p(t; x, y), we need to solve the eigenvalue problem for the diffusion generator. In this section, we illustrate the key ideas underlying our method by considering the simple case of no mutation and genic selection (h = 1/2), in which case the involved algebra simplifies significantly. Incidentally, the genic selection case has been considered by many other researchers in the past; for example, see Kimura (1955a, 1957), Etheridge and Griffiths (2009), and Griffiths (2003). The modified Gegenbauer polynomials introduced above will play an important role in this section. The case with both recurrent mutation and general diploid selection (i.e., h not necessarily equal to 1/2) is addressed in the next section.
Description of the main idea
Let denote the diffusion part of the backward generator:
(14) |
As is well known (Kimura 1955a,b, 1957; Karlin and Taylor 1981), it follows from Equation 12 that the modified Gegenbauer polynomials Gn(x) are eigenfunctions of ,
where
With genic selection, the full backward generator is
(15) |
The speed density corresponding to this diffusion process is
(16) |
where we used x0 = 0 and γ = 1 in (2) and (3), respectively.
Our goal is to find the eigenfunctions Bn(x) and the associated eigenvalues −Λn of the full generator :
(17) |
As discussed in Background, is self-adjoint with respect to the weight function π(x), which implies that its eigenfunctions Bn(x) and Bm(x), for n ≠ m, are orthogonal with respect to π(x); i.e.,
where π(x) is shown in (16). In addition to the eigenfunctions, there may exist other sets of functions that are orthogonal with respect to the same weight function π(y). For example, consider
(18) |
We can verify that Hn(x) and Hm(x), for n ≠ m, are orthogonal with respect to the weight function π(x):
However, by directly applying to Hn(x), one can check that Hn(x) are not eigenfunctions of . But, since both {Hn(x)} and {Bn(x)} are orthogonal with respect to the same weight function π(x), and {Hn(x)} form a basis of L2([0,1],π), we can represent Bn(x) as a linear combination of Hm(x),
(19) |
where un,m are constants to be determined. In the absence of mutation, states 0 and 1 are absorbing states (exit boundaries), so, as discussed in Background, Bn(x) must satisfy the boundary conditions limx↓0Bn(x) = limx↑1Bn(x) = 0. Indeed, our proposed eigenfunctions satisfy those conditions since Hm(0) = Hm(1) = 0 for all m ≥ 0.
Now, one can show
(20) |
where
(21) |
For small σ, Kimura (1955a) employed an equation similar to (20) to obtain perturbation expansions in powers of σ for the eigenvalues and the eigenfunctions of the forward diffusion generator. Here, we proceed along a different avenue. The key difference is that our approach is nonperturbative and that it is valid for all parameter values.
Using (20) together with (17) and (19), we obtain
(22) |
Now, for m ≥ 0, (13) can be used to show
where
(23) |
In the first line of (23), 1{Y} denotes an indicator function that is equal to 1 if statement Y is true or 0 otherwise. For a nonnegative integer k, multiplying (22) by Gk(x) and integrating over [0,1] with respect to the weight function x−1(1 − x)−1 yields
(24) |
where we define Note that (24) specifies a linear system of equations with un,0,un,1,un,2,…, as variables.
Algorithm 1 (genic selection)
The eigenvalues and eigenfunctions of the backward generator (15) for the genic selection case can be obtained as follows. In matrix form, (24) can be written as
(25) |
Let M denote the infinite-dimensional matrix on the left hand side of (25). The key fact is that the eigenvalues Λn of M correspond to the eigenvalues of (up to a sign), and the associated eigenvectors un = (un,0, un,1, un,2,…) of M determine the eigenfunctions of via (19). Now, we consider a sequence of approximations by truncating (25). For a positive integer D, we let M[D] be an D-by-D matrix obtained by taking the first D rows and the first D columns of M, and let . Then, we approximate (25) by
and solve this finite-dimensional linear system to obtain eigenvalues and eigenvectors This linear algebra problem can be easily solved using standard software packages such as Matlab, Mathematica, or the freely available LAPACK library (http://www.netlib.org/lapack/). We show in Empirical Results that and converge very rapidly as the truncation level D increases.
The eigenvectors come in two types: Either for all m even or for all m odd. In fact, the linear system can be decomposed into two subsystems, one involving only the even rows and even columns of M[D] acting on un,m for m odd, and the other involving only the odd rows and odd columns of M[D] acting on un,m for m even. Hence, the eigenvalues and eigenvectors of M[D], for D = 2D′, can be determined by solving two D′-dimensional linear systems.
In the case of genic selection with no recurrent mutation, the eigenfunctions Bn(x) of the backward generator are also known as the oblate spheroidal functions in mathematical physics, and they have received considerable amounts of attention previously (e.g., see Stratton et al. 1941). Note that the algorithm presented in this section provides an efficient way to evaluate these functions, a problem that remained difficult in the past.
Due to the exponential weighting factors in the speed density (16) and in the basis functions (18) for the eigenfunction expansion, evaluation of the transition density for large selection coefficients involves combining quantities with substantially different orders of magnitude. Thus, to obtain accurate numerical values of the transition density under strong selection, the coefficients must be determined with high precision.
Diffusions with General Diploid Selection and Recurrent Mutation
In this section, we generalize the method developed in the previous section by incorporating recurrent mutation and general diploid selection into the diffusion process. The same overall strategy described above applies here as well. The main computational differences are that general diploid selection leads to more involved algebra and that, to handle recurrent mutation, we need to deal with general Jacobi polynomials instead of the modified Gegenbauer polynomials.
Neutral diffusion with recurrent mutation
For a neutral diallelic model with recurrent mutation, the backward generator is given by
(26) |
See Background for the definitions of α and β. By appropriately choosing the constants x0 and γ in (2) and (3), the speed density corresponding to this diffusion can be defined as
(27) |
which is the unnormalized Beta distribution. It can be shown (see Karlin and Taylor 1981, Chap. 15.13, or compare with Equation 7) that the Jacobi polynomials are eigenfunctions of the backward generator with eigenvalues , where
(28) |
Furthermore, the Jacobi polynomials form an orthogonal system with respect to the weight function π0(x). Under recurrent mutation, the diffusion exhibits either regular or entrance boundaries (e.g., see Karlin and Taylor 1981, Chap. 15.6, Example 8). The respective conditions given in Background for x = 0 and x = 1 imply that the eigenfunctions ϕ(x) of need to satisfy
and the modified Jacobi polynomials obey these conditions.
Adding general diploid selection
The backward generator of the diffusion process with recurrent mutation and general diploid selection is
(29) |
where is the selectively neutral part shown in (26). With appropriate constants x0 and γ in (2) and (3), the speed density for this diffusion can be defined as
(30) |
where π0(x) is given in (27) and is the mean fitness function given by
(31) |
which simplifies to the linear function 2σx for h = 1/2. The discussion in Background implies that the full backward generator is self-adjoint with respect to the weight function π(x), and that its eigenfunctions {Bn(x)} form an orthogonal system with respect to the same weight function. Now, if we define Kn(x) as
(32) |
then (8) implies that {Kn(x)} is a complete system of orthogonal functions with respect to the weight function π(x). However, by applying the generator to Kn(x), one can show that Kn(x) is not an eigenfunction of . Rather, we obtain
where Q(x;α,β,σ,h) is the following degree-4 polynomial in x:
(33) |
For no recurrent mutation (α = β = 0) we get (1 − x)xσ[1 − 2h + 2(h + x −2hx)2σ], and for h = 1/2 (genic selection), (33) reduces to a degree-2 polynomial: In the case of just drift and genic selection, we obtain as in (21).
Again, {Bn(x)} and {Kn(x)} are orthogonal with respect to the same weight function π(x), and {Kn(x)} form a basis of L2([0,1],π), where π is defined in (30). Hence, we pose a representation for the eigenfunctions of the form
(34) |
where wn,m are constants to be determined. It can be checked that , for all m ≥ 0, satisfies the proper regular reflecting or entrance boundary conditions, and hence so does Bn(x).
Now, implies the following algebraic equation:
(35) |
Using (10), we can represent as a finite linear combination of :
(36) |
where the coefficients are constants that depend on m, α, β, σ, and h.
For a nonnegative integer k, multiplying (35) by and integrating over [0,1] with respect to the weight function π0(x) yields
(37) |
where we define if j < 0.
Algorithm 2 (recurrent mutation and general diploid selection)
We can now describe our algorithm for finding the eigenvalues and eigenfunctions of the backward generator defined in (29) for the case with recurrent mutation and general diploid selection. From (37), we arrive at a linear system M wn = Λn wn, where wn = (wn,0,wn,1,wn,2,…) is an infinite-dimensional vector of variables and M is an infinite-dimensional matrix given by
Closed-form formulas for can be found easily using symbolic computation software such as Mathematica. In the Appendix, we provide a dynamic programming algorithm for computing which is useful for implementation in an imperative programming language such as C/C++. If h = 1/2, for all m ≥ 0, and therefore only the innermost five diagonals of M will be nonzero. As in Algorithm 1, we approximate Mwn = Λn wn by a finite-dimensional truncated linear system
where and M[D] is the submatrix of M consisting of its first D rows and D columns. This finite-dimensional linear system can be easily solved to obtain the eigenvalues and the eigenvectors of M[D]. We show in Empirical Results that and converge very rapidly as the truncation level D increases.
Note that the same cautionary remark mentioned at the end of Algorithm 1 also applies here.
Special case: No recurrent mutation
Let denote the diffusion generator defined in (14), which can be obtained from (26) by setting α = β = 0. Since , it satisfies with λ = 0. However, for α = β = 0, the boundaries are exit boundaries, and therefore does not satisfy the requisite boundary conditions. Furthermore, as α, β → 0, so it is not of interest. In contrast, for n ≥ 0, converges to Gn(x) as α, β → 0, and, as established in Background, Gn(x) satisfies with and satisfies the requisite boundary conditions for α = β = 0. In summary, as α, β → 0, the first two modified Jacobi polynomials become irrelevant, while the rest converge to the appropriate eigenfunctions of . These facts have been noticed before (e.g., see Griffiths and Spanò 2010), and they allow us to embed the model with no recurrent mutation conveniently into the model with recurrent mutation as described below.
If α = β = 0, let Λn and wn = (wn,0,wn,1,…), respectively, denote the eigenvalues and eigenvectors of M′, the submatrix of M obtained by omitting the first two rows and the first two columns. Defining (instead of Equation 32) yields the eigenvalues Λn and the eigenfunctions Bn(x) for the backward diffusion generator with a general diploid selection model but no recurrent mutation. Indeed, under genic selection (h = 1/2) and α = β = 0, one can show that , while , , and , where are defined in (23). The cases α > 0, β = 0 and α = 0, β > 0 can be treated along similar lines.
Empirical Results
In this section we study the convergence behavior of the eigenvalues and eigenvectors of the submatrix M[D] as its dimension D increases. Further, we show how the spectral representation of the transition density can be employed to characterize the convergence rate of the diffusion to stationarity, i.e., mutation–selection equilibrium.
Convergence of the eigenvalues and eigenfunctions
As the dimension D of the submatrix M[D] increases, we generally observe rapid convergence of the eigenvalues and the entries of the eigenvectors, for fixed n,m < D. For example, the convergence behavior of is shown in Figure 1, A and B, for σ = 10 and σ = 100, respectively, with mutation parameters α = 0.01, β = 0.01 and the dominance parameter h = 1/2. Figure 1, A and B, illustrates that, for both σ = 10 and σ = 100, converges rapidly to 0 as D increases, consistent with our expectation (see below). The figures illustrate that in general converges rapidly for a wide range of σ values, but that the convergence rate slows down as σ increases. For α and β in biologically relevant ranges (say, 10−3 to 10−1), we generally observe that changing the mutational parameters does not affect the convergence behavior significantly. Also, the dominance parameter h has little influence on the convergence rate provided that 0 ≤ h ≤ 1.
The typical convergence behavior of the eigenvector entries is illustrated in Figure 1, C and D, for σ = 10 and σ = 100, respectively. As Figure 1C shows, the rate of convergence is very fast for small σ. For large σ, as in Figure 1D, may fluctuate for small values of D, but they stabilize rapidly as D increases. In general, we observe that the convergence of and that of are roughly synchronized; i.e., for a fixed n, Λn and stabilize near similar values of D.
Figure 2 shows the dependence of on σ, h, and n. Observe that increases rapidly as n increases, which implies that using a finite number of terms in the spectral representation of the transition density should yield an accurate approximation of the true transition density. Increasing σ or choosing h significantly different from 0.5 (the genic selection case) shifts the entire spectrum upward, but in all cases we observe that increases rapidly with n.
Empirical transition densities and stationary distributions
For given mutation and selection parameters, the eigenvalues −Λn and the eigenfunctions Bn(x) found by our method can be used to obtain the transition density via the spectral representation (5), for arbitrary t > 0 and x, y ∈ [0,1]. This representation includes the stationary density, which admits a more explicit analytic form. To this end, note that a diffusion generator maps constant functions to zero. In the case with recurrent mutation, we have either regular reflecting or entrance boundaries, and constant functions actually satisfy the requisite boundary conditions. Hence, constant functions are valid eigenfunctions of with eigenvalue zero. That is, Λ0 = 0 and B0(x) = C, where C is some constant, for all x ∈ [0,1]. Thus, the density of the stationary measure is given by
where is the speed density defined in (30). The integral in the denominator (which corresponds to a normalization constant for the stationary density) can be solved efficiently using our approach: Since B0 is a constant function, we can express the integral as
Then, using the representation
and the facts [cf., (31)] and , we obtain
(38) |
where Δm(α,β) is the combinatorial coefficient defined in (9). Thus, the integral can be evaluated purely algebraically. For a fixed n, wn,m → 0 as m → ∞, so we can obtain an accurate approximation of (38) by truncating the infinite sums and by computing w0,m using the method described in this article. In special cases, the integral can be evaluated numerically using other methods (e.g., see Wakeley and Sargsyan 2009), but, for general σ and h, standard numerical integration techniques do not seem to provide accurate answers.
Figure 3 shows some examples of the time evolution of the transition density function, with the t = ∞ case corresponding to the stationary distribution. Specifically, three different types of selection schemes are illustrated:
Illustrated in Figure 3A are the densities for strong positive selection (σ = 100, h = 0.5), when starting with a small initial frequency of x = 0.0005. As expected, for small t there is still some probability mass near 0, but already a substantial amount has moved to 1. At stationarity, the mass is concentrated at the boundaries, with the concentration near 1 being far more pronounced than that near 0.
Figure 3B shows the dynamics of balancing selection (σ = 0.01, h = 10000), starting from initial frequency x = 0.0005. As time evolves, the mass gets shifted from the boundary at 0 to an intermediate frequency of y = 0.5, where a large fraction of probability mass resides at stationarity.
In Figure 3C, the allele A1 exhibits weakly deleterious selection (σ = −1, h = 0.5), with the initial frequency being x = 0.5. Initially most of the probability mass is concentrated around frequency y = 0.5. As the density evolves with time, it spreads out over the interval, and the peak of the density moves to lower frequencies. At stationarity, most of the mass is concentrated around the boundary at 0.
Rate of convergence to the stationary distribution
The spectral representation also allows us to obtain the rate of convergence to the stationary density. The difference d(t; x, y) between the transition density and the stationary density is given by
Define . Then, by orthogonality of the eigenfunctions, we obtain
(39) |
which can be approximated by truncating the infinite sums. Figure 4 shows the dependence of on time t, for α = 0.01, β = 0.01, h = 0.5, σ∈{1,10,100}, and initial frequency x = 0.0005. As expected, the distance to the stationary distribution decreases over time, and the rate of convergence is faster for larger σ. We note that the spectral representation can also be readily employed to study convergence rates measured by other metrics such as the total variation distance or relative entropy.
Discussion
In this article, we developed a simple method for finding the eigenvalues and eigenfunctions of the diffusion generator associated with the Wright–Fisher diffusion with recurrent mutation and general diploid selection. As described in Background, these eigenvalues and eigenfunctions can be used to construct a spectral representation (5) of the transition density. Since the eigenvalues −Λn tend to −∞ as n → ∞, and the contribution of the nth eigenfunction to the transition density is proportional to , we can truncate the series (5) at some appropriate level and obtain a highly accurate approximation of the transition density. The mathematical derivation of our work invokes the theory of self-adjoint operators and orthogonal functions, but the resulting algorithm involves only standard linear algebra, which is straightforward to implement. For a given set of parameters, computing the first 500 eigenvalues and eigenfunctions using our method takes only a few seconds in Mathematica.
An accurate transition density enables one to estimate the parameters of Wright–Fisher diffusions, perhaps most interestingly the selection parameters. As mentioned in the Introduction, Bollback et al. (2008) suggested a hidden Markov model framework for estimating the selection coefficient σ by analyzing samples taken from multiple time points. The analytic transition density obtained from our method can be incorporated into that framework and thereby ameliorate potential numerical problems that may arise from trying to solve the Kolmogorov equation using discretization. Furthermore, our approach can be applied to devise an algebraic method for computing the sampling probability at stationarity under a general selection model.
There are several interesting extensions of our work to explore. It is known (Shimakura 1977; Griffiths 1979; Griffiths and Spanò 2010) that multivariate Jacobi polynomials, orthogonal with respect to the Dirichlet distribution, are eigenfunctions of multiallelic diffusions under parent-independent mutation models. We believe that the technique developed in this article can be extended to find the spectral representation of the transition density of a multiallelic diffusion with parent-independent mutation and general diploid selection.
For a neutral diallelic Wright–Fisher model with subdivided population structure, Lukić et al. (2011) recently obtained numerical approximations of the transition density by using a certain class of orthogonal polynomials. We remark that the orthogonal polynomials used in that approach are not eigenfunctions of the diffusion generator. Further, the system of ordinary differential equations (ODEs) satisfied by the coefficients of the basis functions does not admit a simple solution, so Lukić et al. (2011) employed a finite difference method with which to solve the ODEs numerically. Note that their method does not provide a proper spectral representation of the transition density, since it does not find the eigenvalues and eigenfunctions of the diffusion generator. It might be possible to extend the technique developed in this article to obtain a spectral representation of the transition density in the case with subdivided population structure and general diploid selection.
In this article, we considered only one-locus Wright–Fisher diffusions. It is generally acknowledged that inference of evolutionary parameters, especially regarding selection, can be improved significantly by taking into account additional data at closely linked loci. Hence, it would be desirable to extend the approach described here to handle the dynamics of multilocus diffusions. However, our current technique relies on the fact that the eigenfunctions are known for the diffusion generator under neutrality. Therefore, to be able to apply our approach to multilocus diffusions with recombination and selection, one would have to know the eigenfunctions in the neutral case. To our knowledge, no such eigenfunctions are known.
Since diffusion processes also arise in other disciplines (e.g., physics and mathematical finance), several approaches have been proposed to obtain efficient approximations of the transition densities for diffusions more general than the Wright–Fisher diffusion (see Srensen 2004; Aït-Sahalia 2008, for example). It would be interesting to investigate whether one could borrow techniques from those fields to the population genetics applications mentioned above.
Finally, we note that Mano (2009) recently employed the representation of the transition density given by Kimura (1955a) and the moment duality used in Barbour et al. (2000) to investigate the dynamics of the number of lineages in the ancestral selection graph dual to the Wright–Fisher diffusion. The representation of the transition density found in this article can be employed to include recurrent mutation into that framework.
Acknowledgments
We thank two reviewers for helpful comments and suggestions. This research is supported in part by National Institutes of Health grants R00-GM080099 and R01-GM094402 to Y.S.S. and Deutsche Forschungsgemeinschaft Research Fellowship STE 2011/1-1 to M.S.
Appendix
Here, we describe the computation of the coefficients in Equation (36). Recall that the polynomial Q(x; α,β,σ,h) defined in (33) is of degree 4. Represent this polynomial as
(40) |
where ql are coefficients that depend on α, β, σ, and h. As shown in (10) and (11), satisfies a three-term recurrence relation of the form
where g(m, m−1), g(m, m), g(m, m+1) are coefficients that depend on m and α, β. Note that (11) implies g(0, −1) = 0. Using the recurrence relation inductively gives
(41) |
where
(42) |
Now, (40) and (41) imply
Thus, the coefficients in (36) are given by
where h(m, l, k) can be computed efficiently using the dynamic programming in (42).
Footnotes
Communicating editor: L. M. Wahl
Literature Cited
- Abramowitz M., Stegun I. A. (Editors), 1965. Handbook of Mathematical Functions. Dover, New York [Google Scholar]
- Aït-Sahalia Y., 2008. Closed-form likelihood expansions for multivariate diffusions. Ann. Stat. 36(2): 906–937 [Google Scholar]
- Barbour A. D., Ethier S. N., Griffiths R. C., 2000. A transition function expansion for a diffusion model with selection. Ann. Appl. Probab. 10: 123–162 [Google Scholar]
- Bollback J. P., York T. L., Nielsen R., 2008. Estimation of 2 Nes from temporal allele frequency data. Genetics 179: 497–502 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Donnelly P., Nordborg M., Joyce P., 2001. Likelihoods and simulation methods for a class of nonneutral population genetics models. Genetics 159: 853–867 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Durrett R., 2008. Probability Models for DNA Sequence Evolution. Springer, New York [Google Scholar]
- Etheridge A. M., Griffiths R. C., 2009. A coalescent dual process in a moran model with genic selection. Theor. Popul. Biol. 75(4): 320–330 [DOI] [PubMed] [Google Scholar]
- Ewens W. J., 2004. Mathematical Population Genetics: I. Theoretical Introduction. Springer, New York [Google Scholar]
- Eyre-Walker A., Keightley P., 2007. The distribution of fitness effects of new mutations. Nat. Rev. Genet. 8(8): 610–618 [DOI] [PubMed] [Google Scholar]
- Green R. E., Krause J., Briggs A. W., Maricic T., Stenzel U., et al. , 2010. A draft sequence of the neandertal genome. Science 328(5979): 710–722
- Griffiths R. C., 1979. A transition density expansion for a multi-allele diffusion model. Adv. Appl. Probab. 11: 310–325 [Google Scholar]
- Griffiths R. C., 2003. The frequency spectrum of a mutation, and its age, in a general diffusion model. Theor. Popul. Biol. 64(2): 241–251 [DOI] [PubMed] [Google Scholar]
- Griffiths R. C., Li W.-H., 1983. Simulating allele frequencies in a population and the genetic differentiation of populations under mutation pressure. Theor. Popul. Biol. 23(1): 19–33 [DOI] [PubMed] [Google Scholar]
- Griffiths R. C., Spanò D., 2010. Diffusion processes and coalescent trees, pp. 358–375 Probability and Mathematical Genetics: Papers in Honour of Sir John Kingman, Vol. 10, edited by Bingham N. H., Goldie C. M. Cambridge University Press, Cambridge, UK [Google Scholar]
- Gutenkunst R. N., Hernandez R. D., Williamson S. H., Bustamante C. D., 2009. Inferring the joint demographic history of multiple populations from multidimensional snp frequency data. PLoS Genet. 5(10): e1000695 [DOI] [PMC free article] [PubMed]
- Hummel S., Schmidt D., Kremeyer B., Herrmann B., Oppermann M., 2005. Detection of the CCR5-Δ32 HIV resistance gene in bronze age skeletons. Genes Immun. 6(4): 371–374 [DOI] [PubMed] [Google Scholar]
- Karlin S., Taylor H., 1981. A Second Course in Stochastic Processes. Academic Press, San Diego [Google Scholar]
- Kimura M., 1955a. Stochastic processes and distribution of gene frequencies under natural selection, pp. 33–53 in Cold Spring Harbor Symposia on Quantitative Biology, Vol. 20. Cold Spring Harbor Laboratory Press, Cold Spring Harbor, NY [Google Scholar]
- Kimura M., 1955b Solution of a process of random genetic drift with a continuous model. Proc. Natl. Acad. Sci. USA 41: 144–150 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kimura M., 1957. Some problems of stochastic processes in genetics. Ann. Math. Stat. 28(4): 882–901 [Google Scholar]
- Lenski R. E., 2011. The E. coli long-term experimental evolution project site. Available at: http://myxo.css.msu.edu/ecoli. Accessed: November, 2011
- Lukić S., Hey J., Chen K., 2011. Non-equilibrium allele frequency spectra via spectral methods. Theor. Popul. Biol. 79(4): 203–219 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Mano S., 2009. Duality, ancestral and diffusion processes in models with selection. Theor. Popul. Biol. 75(2–3): 164–175 [DOI] [PubMed] [Google Scholar]
- Reich D., Green R. E., Kircher M., Krause J., Patterson N., et al. , 2010. Genetic history of an archaic hominin group from Denisova Cave in Siberia. Nature 468(7327): 1053–1060 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Shankarappa R., Margolick J. B., Gange S. J., Rodrigo A. G., Upchurch D., et al. , 1999. Consistent viral evolutionary changes associated with the progression of human immunodeficiency virus type 1 infection. J. Virol. 73(12): 10489–10502 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Shimakura N., 1977. Equations différentielles provenant de la génétique des populations. Tohoku Math. J. 29: 287–318 [Google Scholar]
- Stratton J. A., Morse P. M., Chu L. J., Hutner R. A., 1941. Eliptic Cylinder and Spheroidal Wave functions. Wiley, New York [Google Scholar]
- Szegö G., 1939. Orthogonal Polynomials, Ed. 4th American Mathematical Society, Providence, RI [Google Scholar]
- Srensen H. 2004. Parametric inference for diffusion processes observed at discrete points in time: a survey. Int. Statist. Rev. 73(3): 337–354
- Tavaré S., 1984. Line-of-descent and genealogical processes, and their applications in population genetics models. Theor. Popul. Biol. 26: 119–164 [DOI] [PubMed] [Google Scholar]
- Wakeley J., Sargsyan O., 2009. The conditional ancestral selection graph with strong balancing selection. Theor. Popul. Biol. 75(4): 355–364 [DOI] [PubMed] [Google Scholar]
- Wichman H. A., Badgett M. R., Scott L. A., Boulianne C. M., Bull J. J., 1999. Different trajectories of parallel evolution during viral adaptation. Science 285(5426): 422–424 [DOI] [PubMed] [Google Scholar]