Abstract
The sample frequency spectrum (SFS), or histogram of allele counts, is an important summary statistic in evolutionary biology, and is often used to infer the history of population size changes, migrations, and other demographic events affecting a set of populations. The expected multipopulation SFS under a given demographic model can be efficiently computed when the populations in the model are related by a tree, scaling to hundreds of populations. Admixture, back-migration, and introgression are common natural processes that violate the assumption of a tree-like population history, however, and until now the expected SFS could be computed for only a handful of populations when the demographic history is not a tree. In this article, we present a new method for efficiently computing the expected SFS and linear functionals of it, for demographies described by general directed acyclic graphs. This method can scale to more populations than p reviously possible for complex demographic histories including admixture. We apply our method to an 8-population SFS to estimate the timing and strength of a proposed “basal Eurasian” admixture event in human history. We implement and release our method in a new open-source software package momi2.
Keywords: population genetics, coalescent theory, demographic inference, frequency spectrum
1. Introduction
All natural populations undergo evolutionary processes of migration, size changes, and divergence, and the history of these demographic events shape their present genetic diversity. Thus, inferring demographic history is of central concern in evolutionary and population genetics, both for its intrinsic interest (e.g., in dating the out-of-Africa migration of modern humans (Schaffner et al., 2005; Gutenkunst et al., 2009)) and also for biological applications (such as distinguishing the effects of natural selection from demography (Beaumont and Nichols, 1996; Boyko et al., 2008)). However, genetic sequence data and the space of possible demographic models are both very high dimensional objects, leading to numerous statistical and computational challenges when inferring demographic history from genetic data.
The joint sample frequency spectrum (SFS) is the multidimensional histogram of mutant allele counts in a sample of DNA sequences, and is a popular summary statistic which lies at the core of hundreds of empirical studies in population genetics; e.g., see Wakeley and Hey (1997); Griffiths and Tavaré (1998); Nielsen (2000); Gutenkunst et al. (2009); Coventry et al. (2010); Gazave et al. (2014); Gravel et al. (2011); Nelson et al. (2012); Excoffier et al. (2013); Jenkins et al. (2014); Bhaskar et al. (2015); Jouganous et al. (2017). Recently, progress has also been made on theoretical fronts to characterize statistical properties of SFS-based inference. In particular, studies of identifiability (Myers et al., 2008; Bhaskar and Song, 2014) and the rate of convergence (Terhorst and Song, 2015; Baharian and Gravel, 2018) have been carried out.
Demographic history can be inferred by fitting the observed value of the SFS to its expected value in a composite likelihood framework. The expected SFS can be efficiently computed when the demographic history is a tree, and in previous work we developed a method momi to compute the SFS of hundreds of populations related by a tree (Kamm et al., 2017). However, natural populations are often related by a more complex history that is not tree-like, as gene flow (the exchange of migrants between populations) adds extra edges to the topology associated with the demographic history. In this case, computing the expected SFS is much more computationally demanding, and existing methods for computing the exact expected SFS can scale to only a handful of populations (Gutenkunst et al., 2009; Jouganous et al., 2017).
In this article, we extend our previous algorithm momi to handle discrete (or pulse) migration events between populations, in which case demographies are described by general directed acyclic graphs (DAGs). Our new method momi2 can compute the exact expected SFS with admixture for more populations than previously possible, and uses novel insights from a stochastic process known as the Lookdown Construction (Donnelly and Kurtz, 1996; Donnelly et al., 1999). In addition, momi2 utilizes automatic differentiation (Corliss et al., 2002; Bhaskar et al., 2015) to compute gradients of the SFS, which we use to efficiently search the parameter space during optimization. Finally, momi2 can efficiently compute linear functionals of the SFS, which we exploit to compute the expected values of a number of standard population genetic summary statistics under complex demography.
The rest of this paper as organized as follows. In Section 2 we provide some background and survey related work. Section 3 describes our method, first with an illustrative example in Section 3.1, and then with formulas and pseudocode in Section 3.2. Finally, in Section 4, we apply our method to an 8-population SFS, including ancient and contemporary human populations, to estimate the timing and strength of a proposed “basal Eurasian” admixture event in human history. The Appendix contains all proofs, an analysis of the computational complexity of our method, and additional details of the application to ancient DNA.
2. Background
Suppose a sample of haploid genomes have been sampled from “demes” or populations. The positions in the genome where the samples are not all identical are called segregating sites. In most organisms mutations are rare; most sites are not segregating. It is therefore reasonable to assume, as we do from now on, that each position in the genome has experienced at most a single mutation in its history, and that each individual can be labeled as having the “ancestral” or “derived” (mutant) allele at each segregating site. In population genetics, this simplifying assumption is known as the infinite sites model.
The sample frequency spectrum (SFS) is a -dimensional array whose entry fx counts the number of segregating sites with exactly x copies of the derived allele and n – x copies of the ancestral allele, where with 0 ≤ xd ≤ nd for each . Note we only consider segregating sites with 2 alleles, so f0 = fn = 0 by definition. Compared to the full data set (i.e., the complete genetic sequences of all n = n1 +⋯+ nd genomes), the SFS [fx] is a compressed, low-dimensional summary which nevertheless preserves much of the signal about the various population size changes, divergence times, and admixture events that occurred over the course of the populations’ history.
2.1. Demographic events
The expected multipopulation SFS can be obtained by integrating over random genealogies formed by a backwards-in-time stochastic process known as the structured coalescent (Kingman, 1982; Takahata, 1988; Notohara, 1990). Before getting to the technical details, we first review the basic dynamics of this process in order to build intuition for how the data have power to infer population splits, size changes, and gene flow events. See Durrett (2008) for a more detailed introduction.
Informally, the topology and branch lengths of genealogies are affected by a demographic history in two ways:
Two lineages may not coalesce into a common ancestor until they reside in the same population, and the time until this occurs is affected by migration patterns and population split times.
At any particular point in time, two members within the same population are more likely to have a common parent if the population size is small; so, for example, residents of a small village will typically be more closely related than residents of a large city.
Regarding the second point, we define the scaled effective population size η(t) such that the rate at which any two lineages find a common ancestor at time t is 1/η(t). Under the simplest random mating model (the Wright Fisher model, cf. Durrett (2008)), the census population size exactly equals Tη, where T is the number of generations per unit time; more generally, η scales with the number of breeding individuals in the population. Thus, estimating η allows us to infer size change events such as bottlenecks, exponential growth, and population crashes.
If we could observe the true distribution of genealogies, then we could directly infer demographic history from the waiting times between coalescence events, following the principles listed in items 1 and 2 above. However, since genealogies are never directly observed, we must make inferences about demographic history indirectly using mutation data.
2.2. Likelihoods and the site frequency spectrum
Consider a genome with L positions and mutation rate per position per generation. So at any given position in the genome, mutations arise on the tree there as a Poisson point process with rate . The chance of 2 or more mutations at a single position is , and taking the limit L → ∞ we arrive at the aforementioned infinite sites approximation (Kimura, 1969; Durrett, 2008), which assumes that each segregating site was caused by a single mutation, so that each allele may be labeled as ancestral or derived.
The observed segregating sites are not independent, because trees at neighboring positions are correlated. Unfortunately, even in the simplest case of a single population with constant size, an analytic expression for the likelihood of mutation data at a set of linked (non-independent) sites is not known (Bhaskar et al., 2015). Therefore, SFS data are generally used with composite likelihood methods. Recall that fx Is the total number of segregating sites with derived allele count pattern . Define , i.e., ϕx is the expected frequency of x per unit mutation rate. Equivalently, ϕx is the expected branch length subtending x leaves in a random coalescent tree (i.e., with x1 descendants in population 1, x2 in population 2, and so on). A commonly used composite likelihood is the Poisson random field model (Sawyer and Hartl, 1992), which assumes that the total number of segregating sites is Poisson with rate , and that the patterns at the observed sites are independent with sampling probabilities proportional to ϕx; this yields a log-likelihood of
| (1) |
where and . Demographic history can then be inferred by searching for the parameter values that maximize .
2.3. Existing work and our contribution
The composite log-likelihood in (1) requires us to compute ϕx, the expected branch length subtending x. Let G be a random genealogical tree sampled under the demography, and Lx(G) be the total length of all branches in G subtending x, so that
| (2) |
The integral (2) is difficult since the support of G is at least as large as the number of labeled binary trees with n leaves, a quantity which grows faster than exponentially in the sample size n. Consequently, a number of different methods have been proposed for evaluating (or approximating) the integral (2). Sampling-based methods include Markov chain Monte Carlo (Griffiths and Tavaré, 1997; Nielsen, 2000), importance sampling (Stephens and Donnelly, 2000; De Iorio and Griffiths, 2004), simulation (Excoffier and Foll, 2011; Excoffier et al., 2013), and ABC (Wegmann et al., 2010). The main advantage of these methods is their flexibility: since, as mentioned above, computing the likelihood of the data is trivial conditional on G, these methods can be used on a rich class of models. However, the high dimension of ϕx makes it impractical to compute by sampling unless is small. In particular, since the support of x grows like , Monte Carlo methods will assign zero mass to configurations that are actually observed in the data.
A second approach, implemented in the software ∂a∂i (Gutenkunst et al., 2009), computes ϕx by numerically solving PDEs arising from the Wright-Fisher diffusion (Ewens, 2004), which is dual to the coalescent process described above. For populations, this involves numerically solving a -dimensional integral. The initial ∂a∂i method in Gutenkunst et al. (2009) could handle up to populations; subsequent improvements (Lukić and Hey, 2012; Jouganous et al., 2017) extended this to and then populations by using spectral representations or alternative basis functions for solving the PDEs.
The third approach for computing ϕx, which includes our method, integrates over the sample allele frequencies “backwards-in-time”, exploiting conditional independence relationships to reduce computation. This involves considering the alleles of the sample’s ancestors at different points in the demographic history, and integrating out these random variables via inference algorithms for probabilistic graphical models (Pearl, 1982; Felsenstein, 1981; Lauritzen and Spiegelhalter, 1988; Koller and Friedman, 2009). Bryant et al. (2012) and Chen (2012) computed the SFS for finite- and infinite-sites models using this backward-in-time approach under the coalescent. De Maio et al. (2015) and Kamm et al. (2017) substantially lowered the computational burden of this approach by replacing the coalescent with the continuous-time Moran model (Durrett, 2008), a stochastic process which induces the same sampling distribution as the coalescent, but using a much smaller state space. However, until now these Moran-based approaches have been limited to analyzing tree-shaped demographies without admixture between populations.1
The main contribution of this paper is to extend our previous Moran-based method (Kamm et al., 2017) to allow for demographies defined on general directed acyclic graphs (DAGs), thus allowing for admixture between populations. We describe and implement an algorithm for computing the expected infinite-sites SFS under the multipopulation Moran model with size changes, exponential growth, population splits, and point admixture events (i.e., instantaneous migration “pulses”). This substantially enlarges the space of demographies for which the expected SFS can be accurately computed.
Additionally, our algorithm computes not only individual SFS entries, but also linear functionals of the expected SFS. Specifically, our method computes rank-1 tensor products of the SFS in the same time as a single entry (general linear functionals are sums of these rank-1 products). A number of widelyused statistics in population genetics can be expressed as SFS functionals, and to our knowledge our method is the first to compute expectations of these statistics under complex demography.
We demonstrate our method by using it to infer the history of eight human subpopulations that have undergone multiple admixture events. We complement our theoretical contributions with an open-source, user-friendly software implementation that will enable practitioners to deploy our method. The software uses automatic differentiation (Corliss et al., 2002; Bhaskar et al., 2015; Maclaurin et al., 2015) to compute derivatives of the SFS, leading to efficient optimization and parameter inference. Our package, called momi2, is available for download at https://github.com/popgenmethods/momi2.
3. Method
In this section, we describe the algorithm implemented in momi2 for computing the expected SFS under complex demographies. We begin in Subsection 3.1 with an illustrative example that highlights the novel aspects of our work. Then in Subsection 3.2 we provide pseudocode for our algorithm, and state the formulas used by our algorithm as Propositions. The proofs of these Propositions, and the proof for the correctness of our algorithm, requires substantial additional notation, and we defer this to Appendix A.2. For ease of reference, the symbols we use are summarized in Table 1.
Table 1.
Notation. Rows in the second part of the table are only used for proofs in the Appendix and may be ignored in the main text.
| Symbol | Description | Reference |
|---|---|---|
| Sampled populations are | §2 | |
| n | # of samples per population | ” |
| fx | # of sites with x derived and n − x ancestral alleles | ” |
| θ | Mutation rate | §2.2 |
| ϕx | Expected branch length with x descendants, | ” |
| Population graph | Figure 2(a) | |
| v | A vertex in , corresponding to a population | §3.2 |
| Tv | time between top and bottom events of v | ” |
| ηv (t) | scaled population size of v at t ∈[0, τv] | ” |
| nv | # of samples with ancestry in v | ” |
| # of derived alleles in v at time t | ” | |
| Vector of allele counts at S = {v1,…,vk} | ” | |
| Xv, XS | Shorthand for , respectively | ” |
| Event tree | Figure 2(b) | |
| E | A join, split or leaf event in | ” |
| KE | Populations we are keeping track of at E | ” |
| Conditional likelihood | Eq. (4) | |
| Eq. (5) | ||
| , ϕE | Shorthand for , respectively when z fixed | ” |
| ntot | The total number of sampled lineages | Appendix A.1 |
| Label and allele of the ith lineage in v at t ∈[0, τv] | ” | |
| ” | ||
| where KE = {v1,…,vk} and t = (t1,…,tk) | ” | |
| the # derived among the 1st m lineages in v, t. (Note: ) | ” |
3.1. Example
Consider the model depicted in Figure 1. This model has 3 sampled (leaf) populations, related as follows. Populations 1 and 2 are sisters, with Population 3 an outgroup to them; however a pulse of migrants from 3 to 2 occurs after the split between populations 1 and 2.
Fig. 1.
An example of a 3-population Moran model. The bottom of the graph corresponds to the present and the top to the past. Population 2 receives admixture from population 3 after splitting from population 1. Other features of the demography include archaic samples in population 1, and various size changes along the edges of this demography. Lineages bearing the ancestral (derived) allele are shown in red (blue). The derived allele arises as the blue star (⋆) in the population immediately ancestral to population 4. The red circles (•) and blue stars represent one potential configuration of the allelic states of the ancestors to the sample; our method integrates over all potential configurations in order to calculate the likelihood. Arrows pointing to the right (→) represent reproduction events in the forward-time Moran model. The black arrow pointing to the left (←) at event 6 is a migration event from the population at node 7 to the population at node 5 (again in the forward-time sense).
At the leaves, we observe (n1, n2, n3) = (2,2,1) samples, with (X1, X2, X3) = (1,1,0) copies of the derived (blue star) allele. We wish to compute the expected number of mutations with pattern (X1, X2, X3); to do this, we will integrate over the unobserved variables (X4, X5, X6, X7, X8) which represent allele counts at certain internal positions within the demography. The random variables X1,…,X8 are related to each other by the DAG in Figure 2(a), with an edge from population v to w if alleles may pass directly from v into w.
Fig. 2.
The population DAG (a) and event tree (b) corresponding to the demography shown in Figure 1. (a) Each vertex in corresponds to a collection of alleles in Figure 1. (b) The corresponding event tree is a junction tree of the DAG in ; each vertex of corresponds to a set of vertices from .
In the realization of Figure 1, the hidden blue allele counts are (X4, X5, X6, X7, X8) = (3,2,0,0,0). The blue mutation occurs in the edge above X4, spreading to 3 of the lineages. One copy of the blue allele moves on to X1, while 2 copies move on to X5. However, due to the admixture, X2 only inherits 1 blue allele from X5, inheriting a red allele from the 2 red alleles at X6.
Under the infinite-sites assumption described above, the mutation observed at this site arose at a single point in the genealogical tree depicted in Figure 1. To compute the expected number of mutations with (X1, X2, X3) = (1,1,0), we may condition on the population (i.e., the edge in Figure 1) on which it arose:
| (3) |
We call , the “truncated SFS”; this only concerns events within a single population and can be computed using the method momi1. We refer the interested reader to Kamm et al. (2017) for further details. The second term gives the conditional likelihood of observing the data given a mutation and its allele count at population v. In momi1, we computed this term in the case where is a tree without admixture using the sum-product (also known as belief propagation) algorithm (Felsenstein, 1981; Koller and Friedman, 2009).
The main result of this work is to extend our previous dynamic program to the case where is given by a DAG due to admixture. We will use a dynamic program that is essentially a kind of junction tree algorithm (Koller and Friedman, 2009). This algorithm works by decomposing a DAG graph into a tree in such a way that vertices in the tree correspond to collections of nodes in the original graph. Belief propagation is then applied to the tree decomposition.
We illustrate our algorithm using the example demography in Figure 2(b). We call the tree decomposition an event tree, because each internal node corresponds to either an admixture or split event.2 We construct the event tree , and compute the conditional likelihoods , as follows:
- We initially start with a collection of 3 singleton sets of leaf populations: {{1},{2},{3}}. For v = 1, 2, 3, we also keep track of conditional likelihoods of the data beneath v; since we are at the leaves, these are simply the Kronecker delta functions
-
Going back in time, the first event is the admixture of populations 5 and 6 into 2. To process this event, we remove the set {2} and replace it with {5, 6}; the current collection of sets becomes {{1},{3},{5,6}}. We make the new set {5, 6} the parent of the removed set {2} in .
In addition, we compute , the conditional likelihood of the data beneath {5, 6} given the allele counts X5, X6. We obtain this by applying Lemmas 1 and 2 to the previous conditional likelihood . Specifically, we apply Lemma 1 to “lift” the conditional likelihood at population 2 to the time point immediately below the admixture event; then, we apply Lemma 2 to obtain , the conditional likelihood at {5, 6} immediately above the admixture event.
-
The next event has the alleles from 6 splitting off from population 3. To process this event, we merge the clusters containing the relevant populations ({5, 6} and {3}); then we remove 3,6 and replace them with their parent population 7, to obtain {5, 7} as the parent cluster of {5, 6} and {3} in . After this stage, our collection of sets becomes {{1},{5,7}}.
To obtain , the conditional likelihood of the data at the leaves beneath {5, 7}, we apply Lemma 3 to and . Lemma 3 computes the conditional likelihood at a split event when the children fall into separate clusters beneath the split (in this case, the child clusters are {3} and {5, 6}).
-
The next event is similar, with populations 1 and 5 merging into population 4. After combining the clusters {1} and {5, 7}, removing the merged populations 1 and 5, and adding in their parent 4, we are left with the collection {{4,7}}.
Similar to previous steps, we compute , the conditional likelihood of the data at the leaves beneath {4, 7}, by applying Lemma 1 to “lift” the conditional likelihoods and to the point immediately below the split event, and then apply Lemma 3 to compute the conditional likelihood at a split event above two independent clusters ({1},{5,7}).
-
The final event has populations 4 and 7 merging into population 8. We replace the cluster {4, 7} with its parent cluster {8} at the root of .
To compute from the child likelihoods , we first apply Lemma 1 to lift the likelihoods immediately below the split event, and then apply Lemma 4, which computes the conditional likelihood at the parent of a split when the children belong to the same cluster ({4, 7} in this case).
Finally, at each cluster {ν1, ν2,…} in with leaves {ι1, ι2…} we have computed , the conditional likelihoods at the leaves beneath {ν1, ν2,…}. But to apply equation (3), we need mutation at ν with Xν = i) This is given by
since we assume that each site experiences at most a single mutation in its history, and the only way derived alleles are observed in leaf populations 1,2 is if the corresponding mutation occurs in population 4 or 8.
Remark. The observant reader may have noticed that in Figure 1, population 8 has only n8 = 5 alleles, despite its children having n4 + n7 = 7 > 5 alleles in total. This is due to the fact that there are only 5 alleles at the leaves, so there are at most 5 ancestors in any population at any point; thus, when populations 4 and 7 merge into population 8, we can drop two of the tracked lineages. To show this formally, we use a stochastic process called the lookdown construction, which is a version of the Moran model with a countably infinite number of lineages. However, this analysis requires a great deal of additional notation and is not essential to the remainder of the text, so we defer it to Appendix A.1.
3.2. Algorithms and formulas
We now describe the algorithm to construct the event tree . We assume that the population graph has two types of topological events:
Population split: two child populations u, v split from each other; their parent population is w. Looking backward in time, u, v merge and become the population w.
Population admixture: a single child population u, inherits from exactly two parent populations v, w, with the probability that an allele comes from v(w, respectively) being p(1−P, respectively).
Note that more complicated events, such as trifurcating splits or symmetric pulse migrations, may be expressed as a succession of these 2-way split and admixture events.
We provide pseudocode to construct the event tree in Algorithm 1. In words, we initially start with equal to a collection of singleton sets corresponding to the leaves of . Processing each split or admixture event E back in time, we merge all blocks containing the child population(s) of E Then we remove the child population(s) from this merged block, and add in the parent population(s). Within , the new merged block is the parent of the blocks removed at this stage.
Algorithm 1.
Construct event tree
| 1: procedure EventTree() |
| 2: ⊳ State variable containing current set of tracked populations |
| 3: ⊳ Vertices of |
| 4: ⊳ Edges of |
| 5: for events E in BackInTimeEvents do |
| 6: if E is split then |
| 7: w1, w2 ← ChildPopulations(E) |
| 8: ν ← ParentPopulation(E) |
| 9: K1 ← block in containing w1 |
| 10: K2 ← block in containing w2 |
| 11: KE ← K1 ∪ K2 \{w1, w2} ∪ {ν} |
| 12: |
| 13: |
| 14: if K1 ≠ K2 then |
| 15: |
| 16: else |
| 17: |
| 18: end if |
| 19: else if E is admixture then |
| 20: w ← ChildPopulation(E) |
| 21: ν1, ν2 ← ParentPopulations(E) |
| 22: K′ ← block in containing w |
| 23: KE ← K′\{w}∪{ν1, ν2} |
| 24: |
| 25: |
| 26: |
| 27: end if |
| 28: end for |
| 29: return |
| 30: end procedure |
We now describe Algorithm 2, the dynamic program to compute the joint SFS. We need a bit more notation. For population v, let nv be the number of samples with ancestry in v, we will be keeping track of nv lineages within population v. Let Tv denote the amount of time between the top and bottom events of v, and let ην(t) denote the scaled population size of v at time t ∈ [0, τν] above the base of v, Let be the allele count within the nv lineages of v at time t above its bottom, so in our earlier notation.
At event E in , let be the corresponding block of populations in . We define the conditional likelihood at E as
| (4) |
where is the vector of allele counts in populations KE at times t, and XLeaves(E) the observed data at the leaves beneath E.
In addition, we define the “partial SFS”
| (5) |
as the expected branch length at or below KE subtending z leaves. (Here, the expectation is with respect to branch lengths in the coalescent tree relating the samples.) Note that gives the desired final result, and corresponds to equation (3) in the previous subsection.
Algorithm 2.
Dynamic program to compute the SFS ϕ
| 1: procedure |
| 2: for event E in DepthFirstSearch do |
| 3: if KE = {d} is leaf then |
| 4: ℓE,0 ← ℓd |
| 5: else if E is split event then |
| 6: ℓE,0 ← Lemmas 1 and 2 |
| 7: else if E is join event then |
| 8: if |ChildEvents(E)|=1 then |
| 9: ℓE,0 ← Lemmas 1 and 4 |
| 10: else if |ChildEvents(E) |= 2 then |
| 11: ℓE,0 ← Lemmas 1 and 3 |
| 12: end if |
| 13: end if⊳ Computed the conditional likelihood ℓE,0 |
| 14: ϕE ← (10) ⊳ Computes ϕE the partial SFS |
| 15: end for |
| 16: return ⊳ Return partial SFS at the root event |
| 17: end procedure |
For the remainder of the subsection, we will fix Leaved , and drop the dependence on z in and . Algorithm 2 defines a dynamic program (DP) over the conditional likelihoods and partial SFS ϕE. The DP takes input vectors corresponding to the leaf populations Leaves . If the inputs are set to indicator vectors corresponding to the observed counts , the DP of Algorithm 2 will return the corresponding SFS entry, as stated in the theorem below:
Theorem 1. If then
where denotes the vector with 1 at coordinate Xi and 0 elsewhere.
We now present the formulas used by Algorithm 2, in a series of lemmas also used to prove Theorem 1. We start with a formula to “lift” up to . That is, this formula transforms a likelihood conditioned on , the allele count at the bottom of v, into a likelihood conditioned on , the allele count at the top of v.
Lemma 1 (Lifting), thmadmixlift Let E be a split or admixture event with corresponding block KE, ν ∈ KE be a population within this block, and x, t be vectors of allele counts and times for the populations in KE. Then, for x(k) = x − keν the conditional likelihood of E is
| (6) |
where is the transition rate matrix of the Moran model with n lineages; in particular, and
To process event E, we first use Lemma 1 to lift up the conditional likelihoods at the child populations, up to the time of E We then apply one of Lemma 2, Lemma 3, or Lemma 4, to obtain the conditional likelihood at E from the lifted child likelihoods, depending on whether E is an admixture or split event, and whether the child populations of E fall into a single cluster or two independent clusters.
We first consider admixture events; Lemma 2 describes how to compute the conditional likelihood in this case. Let the child population be w and the parent populations be v1, v2 Each of the nw lineages in w independently inherits from v1 with probability q1, or from v2 with probability q2 =1 − q1. So the number of lineages inheriting from v1 is Binomial (nw, q1). Then, given that m1 alleles are inherited from v1 and m2 = nw = m1 inherited from v2, the particular alleles inherited from v1 or v2 are chosen by sampling without replacement.
Lemma 2 (Admixture event).
Let E be an admixture event, with child population w and parent populations v1, v2. Let E′ be the child event in . Suppose each lineage in w comes from v1 with probability q1, and from v2 with probability q2 = 1 − q1 For KE the population cluster at E, let x∩ be a vector of allele counts on KE\ {ν1, ν2}. Then the conditional likelihood of allele counts at E is given by
| (7) |
We next consider a split event E, with parent population v and child populations w1, w2. We first consider the case where E has 2 distinct children in , i.e., w1, w2 fall into 2 distinct blocks beneath E. Denote the corresponding child events as E1′, E2′ respectively. Then the conditional likelihood at E is given by a convolution of the conditional likelihoods at E1′, E2′, as described in Lemma 3:
Lemma 3 (Population split, 2 clusters). Let E be a split event with parent population v and child populations w1, w2. Suppose E has 2 child events E1′, E2′, with corresponding blocks , where . Let x−1 be allele counts on and x−2 be allele counts on , Then the conditional likelihood at E is
| (8) |
Next, consider the case where the child populations w1, w2 fall into the same cluster beneath E, so that E has just one child event, say E′. The next lemma describes how to obtain the conditional likelihood at E from the conditional likelihood at E′. This involves summing over the dimensions corresponding to w1, w2 within the conditional likelihood . In addition, note that we may have (recall nv is the number of samples with ancestry in v). That is, after merging w1, w2 backwards in time, we may be keeping track of more alleles than originally sampled, allowing us to “drop” some extraneous non-ancestral lineages, as illustrated in the root population of Figure 1. Formally, let be the vector whose i-th entry is the likelihood at E conditional on there being a total of i derived alleles in the child populations w1 and w2, and also conditional on the vector of allele counts x∩ in the other populations. If is a matrix whose (i, j)th entry is the probability of sampling without replacement j alleles in the parent population v out of the total of i alleles segregating in child populations w1 and w2, then the conditional likelihood ℓE at E satisfies the equation
leading to the following lemma.
Lemma 4 (Population split, 1 cluster). Let E be a population split with exactly one event E′. Denote the corresponding population clusters as KE and KE′. Denote the parent population as v, the child populations as w1, w2. Let x∩, and B be defined as in the preceding paragraph:
Then the conditional likelihood at E is given by
| (9) |
with B+ denoting the Moore-Penrose pseudoinverse of B.
Finally, having computed the conditional likelihoods at event E, we wish to compute the partial SFS ϕE at the event. This is given by the recursive formula in Lemma 5, which involves the conditional likelihood at E, the expected number of mutations arising within each parent population v, and the partial SFS at the child events.
Lemma 5. For an event E, define the partial ordering E′ ≺ E if E′ occurs beneath E in the event tree, and let be the populations newly formed at E (i.e., formed by a population split or admixture at E). For , let fν(k) be the truncated SFS in population v,
which can be computed by the formulas in Kamm et al. (2017). Then the partial SFS at E is given by
| (10) |
3.3. Normalizing constant and other linear functionals
To compute the probability of a mutation having observed allele counts z, we need not just ϕz, but also the normalizing constant the expected total branch length.
Computing ‖ϕ‖1 directly is inefficient because of the possible entries z. Instead, we can use Algorithm 2 to compute ‖ϕ‖1, and many more statistics of the SFS, in the same time as a single entry:
Theorem 2. For , the tensor dot product of the SFS ϕ against is
Theorem 2 says that for any rank-K tensor with
can be computed in K calls to DP . 3 In particular, the expected total branch length ‖ϕ‖1 is given by
with 1 the vector with 1 at every coordinate.
Beyond the applications we explore here, we expect this result to be useful in related settings. A number of population genetic statistics can be expressed as f ⨀ A, including Watterson’s estimator θW of the mutation rate (Watterson, 1975), Fay and Wu’s H statistic for positive selection (Fay and Wu, 2000), and Patterson’s f2, f3, f4 statistics for assessing topology (Patterson et al., 2012). Theorem 2 allows us to compute their expected values , and to construct test statistics from the deviance f ⨀ A − θϕ⨀A under an appropriate null model.
An even wider class of population genetic statistics can be written as nonlinear functions of SFS-tensor products like ; this class includes Tajima’s D statistic for selection (Tajima, 1989), the FST statistic for population structure (Holsinger and Weir, 2009), and Patterson’s D statistic for introgression (Patterson et al., 2012). These statistics may be viewed as plug-in estimators for g(ϕ⨀ A1, ϕ⨀A2,…) which we can compute with Theorem 2. Note that these estimators are biased due to the nonlinear function g, but the bias can be estimated via block jackknife, and will typically be small since almost surely as the number of independent SNPs grows.
Another interesting linear statistic of the SFS that can be computed with Theorem 2 is , the expected time of the most recent common ancestor. In particular, let d be any leaf population; for simplicity assume d is sampled at the present (i.e. d is not archaic). Then
To see this, note that TMRCA is proportional to the expected number of mutations hitting an arbitrary lineage in d, and if a mutation has configuration derived copies, then the chance of hitting the lineage is (Zeng et al., 2006).
4. Application
We tested our method on a demographic inference problem in human genetics that is currently of interest. Lazaridis et al. (2014) showed that genetic variation in present-day Europeans suggests an admixture model involving three ancestral meta-populations: Ancient North Eurasian (ANE), Western Hunter Gatherers (WHG), and Early European Farmers (EEF). They also showed that EEF contains ancestry from a source that is an outgroup to all non-African populations, and yet shares much of the genetic drift common to non-African populations; they dubbed this ancestry component as “Basal Eurasian” ancestry. Later work (Lazaridis et al., 2016) showed that Basal Eurasian ancestry is shared by ancient and contemporary Middle Eastern populations, and is correlated with a decrease in Neanderthal ancestry, implying that Basal Eurasian ancestry contains lower levels of Neanderthal admixture when compared with non-Basal ancestry. The results from Lazaridis et al. (2014, 2016) were based on several related methods for modeling covariances in population allele frequencies, most notably qpGraph and qpAdm (Patterson et al., 2012; Haak et al., 2015). These methods are computationally efficient, and are robust to ascertainment bias and misspecification of the population size history; however, they are unable to infer the timing of demographic events.
We applied momi2 to estimate the strength and timing of basal Eurasian admixture into early European farmers, and the split time of the basal Eurasian lineage. To do this, we built a demographic model relating 12 samples from 8 populations, shown in Figure 3. These samples consisted of the Altai Neanderthal (Prüfer et al., 2014); the 45,000 year old Ust’lshim man from Siberia (Fu et al., 2014); 3 present-day populations (Mbuti, Sardinian, Han) with 3, 2, and 2 samples respectively; and 3 ancient samples representing the European ancestry components identified by Lazaridis et al. (2014): a 7,500 year old sample from the Linearbandkeramik (LBK) culture (representing EEF), an 8,000 year old sample from the Loschbour rock shelter in Luxembourg (representing WHG), and the 24,000 year old Mal’ta boy (“MA1”) from Siberia (representing ANE). After data cleaning, our dataset consisted of 2.4 ×106 autosomal transversion SNPs. See Appendix A.4 for more details about the data.
Fig. 3.
Inferred model and bootstraps for the 11 population demography described in Section 4. The y-axis is linear below 5 × 104 then follows a logarithmic scale above 5 × 104 in the foreground (blue branches) is our point estimate from maximum composite likelihood; in the background (gray branches, with transluscent pulse arrows) are 300 nonparametric bootstraps. Population sampling times are indicated by open circles; note demographic events may still involve populations below their sampling times, as in the case of Loschbour. The nonparametric bootstrap estimates were created by splitting the data into 100 equally sized contiguous blocks, resampling these blocks with replacement, and refitting the model.
To construct the topology of the model in Figure 3, we first obtained a tree by neighbor joining (Saitou and Nei, 1987), then added 3 extra admixture events reflecting prior knowledge, as well as a recent Neanderthal population decline starting at the Mbuti-Eurasian split. We inferred split times, population sizes (including the Neanderthal decline), and admixture times and proportions by maximizing a composite likelihood , given by the product of the likelihoods at every SNP:
| (11) |
where and was computed by momi2. The low coverage of the MA1 sample and the deep divergence of the Neanderthal sample may cause bias in SFS entries where only these samples contain derived alleles; we thus excluded these entries and corrected the normalizing constant appropriately (see Appendix A.4).
We used automatic differentiation to compute the gradient , which we used to search for the optimum of logℒ. We constructed nonparametric bootstrap confidence intervals by splitting the genome into 100 equally sized blocks, resampling these blocks to create 300 bootstrap datasets, and re-inferring the demography for each bootstrap dataset. We also used 300 parametric bootstraps to assess how well we could infer the demography under simulated data; for each parametric bootstrap dataset, we used msprime (Kelleher et al., 2016) to simulate ten 300 Mb chromosomes from our initial point estimate, and re-inferred the demography. The nonparametric bootstrap was used for all confidence intervals reported below.
Our inferred demography, along with nonparametric bootstrap re-estimates, are shown in Figure 3 and Table 2. Our parametric bootstrap estimates are shown in Figure 4. We inferred a pulse of 0.094 (95% Cl of 0.049–0.174) from the ghost Basal Eurasian population to EEF ancestry (LBK), substantially less than the 0.44 inferred by (Lazaridis et al., 2014). This admixture was inferred to occur 33.7 kya (95% Cl of 10.8–41.1 kya), shortly after the Loschbour-LBK split at 37.7 kya (95% Cl of 32.2–42.3 kya). The split time of the ghost Basal Eurasian lineage from other Eurasians was inferred at 79.8 kya (95% Cl of 67.4–101 kya). Other parameters were broadly in line with previous estimates, such as a Mbuti-Eurasian split of 96 kya, a Han-European split of 50 kya, a Neanderthal split of 696 kya, and Eurasians deriving 0.03 of their ancestry from Neanderthal (Terhorst et al., 2017; Green et al., 2010; Meyer et al., 2016).
Table 2.
Estimated parameters of the demography in Figure 3, along with nonparametric bootstrap estimates of the bias and standard deviation, and 95% bootstrap quantiles. We use (A, B) to denote the ancestor of A and B; tv and Nv to denote the height and size at vertex v, and tA→B and pA→B to denote respectively the time and strength of an admixture arrow from A to B.
| Parameter | Estimate | Bias | SD | 2.5% | 97.5% |
|---|---|---|---|---|---|
| NLosch | 1.92e+03 | 14.1 | 185 | 1.57e+03 | 2.27e+03 |
| NMbu | 1.73e+04 | –255 | 1.86e+03 | 1.6e+04 | 1.92e+04 |
| N(Mbu,Losch) | 2.91e+04 | −270 | 2.34e+03 | 2.7e+04 | 3.21e+04 |
| t(Han,Losch) | 9.58e+04 | −1.48e+03 | 9.32e+03 | 9.19e+04 | 1.03e+05 |
| NHan | 6.3e+03 | −17.1 | 400 | 5.71e+03 | 6.91e+03 |
| N(Han,Losch) | 2.34e+03 | −70.2 | 372 | 2.13e+03 | 2.7e+03 |
| t(Han,Losch) | 5.04e+04 | −171 | 2.75e+03 | 4.71e+04 | 5.43e+04 |
| t(Ust,Losch) | 5.15e+04 | −79.4 | 2.47e+03 | 4.85e+04 | 5.47e+04 |
| N(Nean,Losch) | 1.82e+04 | −216 | 1.59e+03 | 1.7e+04 | 1.99e+04 |
| t(Nean,Losch) | 6.96e+05 | −7.6e+03 | 5.74e+04 | 6.49e+05 | 7.58e+05 |
| tNean→Eurasian | 5.68e+04 | −279 | 3.04e+03 | 5.38e+04 | 6.01e+04 |
| pNean→Eurasian | 0.0296 | −2.82e-05 | 0.00252 | 0.0251 | 0.0349 |
| NNean | 86.9 | −3.33 | 19.8 | 76.7 | 105 |
| t(MA1,Losch) | 4.49e+04 | 98.2 | 2.36e+03 | 4.11 e+04 | 4.87e+04 |
| NLBK | 75.7 | −685 | 629 | 4.12 | 1.9e+03 |
| t(LBK,Losch) | 3.77e+04 | 543 | 2.59e+03 | 3.22e+04 | 4.23e+04 |
| pBasal→EEF | 0.0936 | −0.0122 | 0.0366 | 0.0485 | 0.174 |
| tBasal→EEF | 3.37e+04 | 7.46e+03 | 1.01e+04 | 1.08e+04 | 4.11 e+04 |
| t(Basal,Losch) | 7.98e+04 | −706 | 1.37e+04 | 6.74e+04 | 1.01e+05 |
| NSard | 1.5e+04 | −1.28e+04 | 6.53e+04 | 8.58e+03 | 8.9e+04 |
| t(Sard,LBK) | 7.69e+03 | −1.69e+03 | 1.64e+03 | 7.51e+03 | 1.24e+04 |
| N(Sard,LBK) | 1.2e+04 | 1.32e+03 | 1.99e+03 | 7.33e+03 | 1.45e+04 |
| tGhostWHG→Sard | 1.23e+03 | −2.93e+03 | 3.1e+03 | 597 | 1.06e+04 |
| pGhostWHG→Sard | 0.0317 | −0.00223 | 0.0151 | 0.00631 | 0.0618 |
| t(GhostWHG,Losch) | 1.56e+03 | −1.32e+04 | 1.07e+04 | 964 | 3.49e+04 |
Fig. 4.
Parametric bootstraps for the demography inferred in Figure 3. The inferred demography (blue tree) was used to simulate 300 bootstrap replicates. Re-running our method on each replicate produced a new inferred demography which is plotted in gray.
Inferring the optimal demography from start to finish took 2.5 hours on a laptop with 4 CPU cores, and used 2 GB RAM. The 300 bootstraps were run separately on a high-performance computing cluster. To our knowledge, no other method can infer this demographic model using the full SFS. The moments software package (Jouganous et al., 2017) is capable of computing the SFS for up to 5 populations, less than the 8 populations here, though it can scale to more individuals per population than momi2. While the fastsimcoal2 software package (Excoffier et al., 2013) is capable of handling demographies of this size and larger, it doesn’t compute the full, exact SFS, and also does not include an option for the ascertainment scheme we use here (excluding mutations private to Neanderthal and MA1).
We also used our model to produce estimates of the human mutation rate, which we estimated as 1.22 × 10−8 per base per generation, with a bootstrap-quantile 95% Cl of (1.12, 1.32) × 10−8 closely matching previous estimates of the human mutation rate (Scally, 2016). To obtain this estimate, we compared the observed nucleotide diversity with that expected under the inferred demography, adjusting by the empirical transition to transversion ratio (Appendix A.4). Estimating the mutation rate was possible here because we did not use a prespecified mutation rate to estimate the model in Figure 3, instead using the known ages of the Ust’Ishim, LBK, Loschbour, and MA1 samples to calibrate dates.
Acknowledgments
This research is supported in part by an NIH grant R01-GM109454 (YSS); a Packard Fellowship for Science and Engineering (YSS); Wellcome Trust grants WT206194 and WT207492 (RD); and the Human Frontiers Science Program fellowship LT000402/2017 (JK). YSS is a Chan Zuckerberg Biohub investigator.
A. Appendix
A.1. Model and notation
In this section, we formally define the stochastic process underlying our model, and introduce some additional notation needed for the proofs in Section A.2.
The main stochastic process we use is the lookdown construction of the Moran model (Donnelly and Kurtz, 1996; Donnelly et al., 1999), a variant of the Moran model where copying only occurs in one “direction” (as in Figure 5). We will make use of certain conditional independence properties that result from this one-way copying. However, we note that there is a simple coupling between the lookdown and standard Moran models, and these two models generate data with the same distribution.
Fig. 5.
Standard and lookdown Moran models, (a) illustrates the standard Moran model, with copying in both directions; (b) illustrates the lookdown Moran model, with copying always from left to right. The sample genealogy (i.e., the lineages ancestral to present day samples) is in solid. The law of the genealogy is the coalescent under both models, and so the present-day samples of the two models are equal in distribution.
We now describe our lookdown model in more detail. Within each of the leaf populations we consider a countably infinite number of lineages, each with a unique label in . We arbitrarily assign the sampled lineages to the lowest labels {1,2, …, ntot}, where , and arbitrarily assign the remaining unsampled lineages to labels {ntot + 1,ntot + 2, …}. Each lineage extends infinitely backwards in time, and at each admixture event, each lineage randomly chooses the parent population it extends into. In addition, each lineage has an allele, which changes through time due to mutation and copying events.
Similar to the usual Moran model, copying between a pair of lineages in population v occurs at rate , where ην(t) is the scaled population size of v. However, copying only occurs in one direction, from lineages with lower labels to lineages with higher labels (Figure 5). So if two lineages are labeled i and j respectively, with i < j, then the copying event i → j, occurs at rate , whereas the reverse copying event i ← j never happens (has rate 0). By contrast, in the standard (non-lookdown) Moran model, both i → j and i ← j copying events happen at rate . However, under both models, two lineages going backwards in time coalesce at rate , as in the coalescent. Thus, the sample genealogies under both models follow the same multipopulation coalescent distribution.
Denote the labeled lineages in population v, and their alleles at height t, by
where is a pair, consisting of the ith lowest label at v, along with its corresponding allele at height t ∈[0, τν). Note that we have ordered the lineages by their labels, so that labelν,(i) < labelν,(i+1). Also note that we measure the time t from the bottom of v, so that alleleν,0,(i) denotes the ith allele at the bottom of v, and the ith allele at the top of v.
Let denote the number of derived alleles among the lowest m lineages at v, t. Let be the number of samples in leaves below v. During computation, we will only need to keep track of the lowest nv lineages in v, so we denote to be the number of derived alleles among the first nv lineages at v, t.
Finally, for an event E with KE = (ν1, …, νk) the corresponding block of populations in Algorithm 1, let t = (t1, …, tk) be a corresponding set of times within each population ν1, …, νk. We define as the labeled alleles at each of (ν1,t1), …, (νk, tk)
A.2. Proofs
For the reader’s convenience, theorem statements are reproduced from the main text before each proof. The following two lemmas will be useful for several of the proofs below:
Lemma 6. The distribution of is invariant to finite permutations of the labels within any population. ν ∈KE Furthermore, the labels are independent of the alleles.
Proof. By construction, none of the lineages within the populations in KE are ancestral to each other. Thus the sample genealogy of any finite subsample of the lineages is the multipopulation coalescent, because going backwards in time, coalescence (copying) between each pair of lineages occurs at rate at vertex w time s. The invariance to permutation, and independence of alleles and labels, follows from the coalescent. □
Lemma 7. For event E and population u ∈ KE, let be a (possibly random) collection of integers greater than nu, and let be the number of derived lineages in . Then XLeaves(E) is conditionally independent of the allele counts on , given the allele counts on the first lineages of KE = {ν1, …, νk}.
Proof. Integrate over the first labeled alleles within KE, and the labeled alleles at :
with the second equality because higher lineages cannot copy to lower lineages (so ), and the third equality because of the exchangeability and independence from Lemma 6 (so given , the alleles of are ordered by a uniform permutation independent of , and the labels of are independent of , ). □
A.2.1. Proof of Theorem 1
Theorem 1. If ,n, then
where denotes the vector with 1 at coordinate Xi and 0 elsewhere.
Proof. Lemmas 2–4 give formulas for the partial likelihood using terms like , where E′ ∈ Children(E) and E is an admixture, 2-cluster split, or 1-cluster split, respectively. The terms in turn can be computed from the partial likelihoods using Lemma 1; then Lemma 5 provides a formula for ϕE in terms of ℓE,0 and the partial SFS ϕE′.
Algorithm 2 traverses the event tree in a depth-first search, applying Lemmas 5,1,2,4,3 to compute , ϕE at each event E from their values at the children of E The input to Algorithm 2 are the likelihoods ℓ{d},0 at the leaves, and the output is the partial SFS at the root.
Thus, since
it follows that . □
A.2.2. Proof of Lemma 5
Lemma 5. For an event E, define the partial ordering E′ ≺ E if E′ occurs beneath E in the event tree, and let be the populations newly formed at E (i.e., formed by a population split or admixture at E). For , let fv(k) be the truncated SFS in population v,
which can be computed by the formulas in Kamm et al. (2017). Then the partial SFS at E is given by
| (10) |
Proof. Without loss of generality assume θ = 1. Then ϕE is the expected number of mutations at or below KE with observed counts XLeaves(E). We split ϕE into two parts: the mutations within (i.e. the populations formed by a split or join at E); and the mutations that occur in ∪E′≺EKE′, the populations that arise strictly below E.
The first part, of mutations at the new populations of E, is given by
since fv(k) is the expected number of mutations arising at v with Xv = k, and .
For the second part, of mutations strictly below E, we split into three cases: either E is a leaf event, or E has a single child event, or E has two child events. In the first case, if E is a leaf event, then no mutations can occur below E. In the second case, if E has a single child event E′, then the expected number of mutations strictly below E is simply ϕE′ by definition.
Finally, if E has two child events E1′, E2′, then E1′ and E2′ share no leaves, so a mutation underneath E1′ will have no derived alleles in Leaves(E2′) and vice versa. Thus, the number of mutations strictly below E is
□
A.2.3. Proof of Lemma 1
Lemma 1 (Lifting). Let E be a split or admixture event with corresponding block KE, v ∈ KE be a population within this block, and x, t be vectors of allele counts and times for the populations in KE. Then, for x(k) = x − kev, the conditional likelihood of E is
| (6) |
where is the transition rate matrix of the Moran model with n lineages; in particular, and
Proof. Define a “quasi-lookdown” Moran model , which is identical to , except within the nv lowest lineages of v, where we allow copying in both directions at rate the non-lookdown Moran model).
For an event E with populations KE = (v1, v2,…) and corresponding times t = (t1,t2…), let be the corresponding allele counts. Next, define as the sample path of allele counts below E, t, where (E′, s) (E, t) if either E is above E′, or E = E′ and s≤t component-wise. It will suffice to show , because then for t = τvev+t−v,
as desired.
follows from a coupling argument. Let the sample path of below E, t. We can map the partial sample paths of onto those of as follows: moving from the bottom to the top of v, whenever a lower label is copied over by a higher label, swap the labels of the lineages above the copying. Then the relabeled sample path has the same distribution as the lookdown construction, since the allele with the higher label is always copied over, and the rate of copying between pairs of lineages is . Since this relabeling also leaves unchanged, we have . □
A.2.4. Proof of Lemma 2
Lemma 2 (Admixture event).
Let E be an admixture event, with child population w and parent populations v1, v2. Let E′ be the child event in . Suppose each lineage in w comes from v1 with probability q1 and from v2 with probability q2 = 1 − q1 For KE the population cluster at E, let x∩ be a vector of allele counts on KE \ {v1, v2}. Then the conditional likelihood of allele counts at E is given by
| (7) |
Proof. First note that XLeaves(E) = XLeaves(E′) and
by sampling nw alleles in w from , alleles in v1, v2 which are exchangeable by Lemma 6.
Next, consider the highest alleles of v1, v2, and let their relative positions within w. Then we conclude the proof by noting that XLeaves(E) = XLeaves(E′) and applying Lemma 7, to get
□
A.2.5. Proof of Lemma 4
Lemma 4 (Population split, 1 cluster). Let E be a population split with exactly one event E′. Denote the corresponding population clusters as KE and KE′. Denote the parent population as v, the child populations as w1,w2. Let x∩, and B be defined as in the preceding paragraph:
Then the conditional likelihood at E is given by
| (9) |
with B+ denoting the Moore-Penrose pseudoinverse of B.
Proof.
Let be the vector of allele counts on KE∩KE′ at times 0. Then note that
with the second equality following from exchangeability (Lemma 6) and the third equality from XLeaves(E) = XLeaves(E′).
Next note that
with the second equality again due to exchangeability (Lemma 6).
Define so that are the indices in v of the first , alleles in w1, w2. Then because and Lemma 7,
and thus
so letting , we have and therefore . □
A.2.6. Proof of Lemma 3
Lemma 3 (Population split, 2 clusters). Let E be a split event with parent population v and child populations w1, w2 Suppose E has 2 child events E1′, E2′, with corresponding blocks , , where , . Let x−1 be allele counts on and x−2 be allele counts on . Then the conditional likelihood at E is
| (8) |
Proof. Notice that
with the first equality from the Markov property of the Moran process, and the second equality following from the exchangeability of the nv alleles at vertex v (Lemma 6). □
A.2.7. Proof of Theorem 2
Theorem 2. For , the tensor dot product of the SFS ϕ against is
Proof. Below, we will prove DP is a multilinear function of the input vectors . The result immediately follows from this, because then
We now show DP is a multilinear function of . We start by showing that if event E has leaf populations Leaves(E)=(d1,…, dL), then ℓE, t is a multilinear functions of . We show this by induction over (E,t). The base case, where t = 0 and E is a leaf with KE = (di), is trivially true because .
For the next case, we note that (6), (7), and (9) express ℓE, t as a tensor product of ℓE′, t′ with a matrix, where (E′, t′) ≺ (E, t) and Leaves(E) = Leaves(E′). ℓE′, t′ is a multilinear function of by induction, hence ℓE, t is also.
Similarly, (8) expresses ℓE, 0 as a product of and , where is a multilinear function of (ℓk:k ∈Leaves(E′i)} by induction, and furthermore Leaves(E′1)∩Leaves(E′2) = ∅ and Leaves(E′1)∩Leaves(E′2) = Leaves(E) Thus ℓE, 0 is a multilinear function of .
Thus, each of the operations (6), (7), (8), (9) in Algorithm 2 preserves multilinearity of ℓE, t, and thus each ℓE, t is a multilinear function of its leaf vectors by induction. Finally, a similar induction argument shows that each ϕE is a multilinear function of {ℓk : k ∈ Leaves(E)}, since (10) expresses ϕE as a sum of multilinear functions by induction. □
A.3. Computational complexity
Computing the SFS ϕz Algorithm 2 involves keeping track of the partial likelihoods at each event E. For a dataset with s unique observations z, the array of partial likelihoods for every z and every hidden state x at event E is a tensor with total entries (where ).
We now consider the time cost of each operation in Algorithm 2. We start by considering the “universal constants” that depend only on nv, and not on the parameters of the demography or the number of SNPs. Next, we consider terms that need to be computed once per demography, but don’t depend on the number of SNPs. Finally, we consider those terms that need to be recomputed once for each SNP and each demography.
Proposition 1. For a population graph with corresponding event tree , let |V| be the number of vertices (populations) in the graph, and let Madmix be the number of admixture events. Then, for a dataset with n samples and s unique observations, computing the likelihoods of d different demographies with the same topology { and ) but different parameters (sizes, pulse strengths, branch lengths), has a computational complexity of
Proof. In Lemma 1, we compute the matrix exponential of (6) as where U are the eigenvectors in the decomposition ; this eigenvalue decomposition costs . Similarly, in Lemma 4 we compute the pseudoinverse of (9) as B+ =VΣ−1UT for SVD B = UΣVT; this SVD also costs Both the eigenvalue decomposition and the SVD are universal for all demographic parameters, and computed at most once per population v, which contributes an overall complexity of O(V|n3).
The innermost sum of (7) in Lemma 2 is also universal, and costs to compute for all possible values of x1,x2,xw,m1 leading to the term O(Madmixn5). However, the middle sum of this equation is not universal, since it depends on q1, q2. While not universal, this middle sum only needs to be computed once per demography, and does not depend on the number of SNPs; in particular, computing it for all values of x1,x2,xw, costs per demography, contributing an overall complexity of O(Madmixdn4) similarly, the term in in (10) of Lemma 5 is computed once per demography, and costs (Kamm et al., 2017), contributing a complexity of O(d|V|n2).
Finally, we consider the terms that need to be recomputed for every SNP and every demography. Equations (6), (7), (8) of Lemmas 1, 2, 3, respectively, each cost per SNP, since they express as a sum of O(n) terms. Similarly, equation (9) of Lemma 4 costs , since we compute as a product of an O(n) × O(n) matrix B+ with a tensor containing entries; is itself computed by summing over all entries of . Altogether, this contributes a complexity of . □
A.4. Application supplement
A.4.1. Data
Table 3 gives the populations and samples we used for our example application in Section 4. All samples except for MA1 were taken from the SGDP dataset (Mallick et al., 2016). We added on the additional low-coverage MA1 sample (Raghavan et al., 2014) to represent the Ancient North Eurasian (ANE) component of European ancestry. Due to the low coverage of MA1, we only sampled a single random allele from it at each site, using a GATK pileup (McKenna et al., 2010) and restricting ourselves to reads with quality ≥30.
Table 3.
Populations and samples used for the example application in Section 4. We only used 1 random allele for MA1 due to low coverage. The ages of the samples are given in thousands of years ago (kya).
| Population | Individuals | Alleles | kya |
|---|---|---|---|
| Mbuti | 3 | 6 | 0 |
| Han | 2 | 4 | 0 |
| Sardinian | 2 | 4 | 0 |
| Loschbour | 1 | 2 | 7.5 |
| LBK (Stuttgart) | 1 | 2 | 8 |
| MA1 (Mal’ta) | 1 | 1 | 24 |
| Ust’Ishim | 1 | 2 | 45 |
| Altai Neanderthal | 1 | 2 | 50 |
We ascertained SNPs at SGDP filter level 1, then used the genotype calls at filter level 0 at the ascertained SNPs. When ascertaining SNPs, we limited ourselves to sites that were polymorphic among the samples excluding MA1 and Neanderthal. We excluded MA1 during ascertainment due to its low coverage. We also excluded the Neanderthal sample during ascertainment because it had substantially fewer new mutations than expected based on its age; it was unclear whether this was due to changes in the mutation rate on that lineage since its deep split with modern humans, or whether this was an artifact of the SNP calling strategy used by SGDP. We used Theorem 2 to correct the normalizing constant of the SFS due to excluding MA1 and Neanderthal during ascertainment; in particular, we normalized the SFS by the total branch length of the subtree excluding MA1 and Neanderthal.
To avoid biases in ancient DNA caused by deamination (Dabney et al., 2013), we removed all transitions (i.e. A ↔ G and C ↔T mutations), keeping only the transversions. We used Chimp as a proxy for the ancestral allele, removing all sites where the Chimp allele was missing. After data cleaning, we were left with 2,444,888 autosomal transversion SNPs that were segregating among the samples excluding MA1 and Neanderthal.
A.4.2. Model fitting procedure
We fit the model in Figure 3 in an iterative fashion, adding populations in one at a time and re-estimating the parameters. We started with a tree including the 4 populations Mbuti, Loschbour, Han, and Ust’lshim, with no admixture events. This initial model had 8 parameters: the population sizes at the Han, Mbuti, and Loschbour leaves, the population size at the Eurasian and human ancestor (the Ust’lshim leaf was set to the ancestral Eurasian population size), and the times that the Han, Ust’lshim, and Mbuti populations diverged from Loschbour.
We next added in the Neanderthal population, with an admixture event from Neanderthal to the Eurasian ancestor. We added parameters for the Neanderthal-human split time, the Neanderthal-Eurasian introgression tie and strength, the ancestral Neanderthal-human population size, and a Neanderthal population exponential decline rate starting at the Eurasian-Mbuti split, following results from Prüfer et al. (2014).
We followed by adding on the MA1 sample, adding a single parameter for its split time (we fixed its population size to be the ancestral Eurasian population size). We then added the LBK early farmer, adding 4 parameters for its divergence time, Basal Eurasian admixture time and strength, and the split time of the Basal Eurasian lineage. Finally, we added in a Sardinian population, along with parameters for its population size, its split time, and admixture times and strength from the Loschbour WHG.
At each step, we re-estimated all parameters using the L-BFGS-B optimization algorithm, maximizing the multinomial composite likelihood (11). For the final few models (adding in LBK and then Sardinian) we initialized each estimation with a stochastic gradient descent before finishing with L-BFGS-B.
A.4.3. Mutation rate estimation
We used the within-population nucleotide diversity to estimate the mutation rate. The nucleotide diversity is the number of sites where 2 random alleles (drawn without replacement) differ. The empirical value of the nucleotide diversity in population i is
while the expected value of the nucleotide diversity per unit mutation rate is
This yields a mutation rate estimate for each population, given by . We then averaged over to obtain our combined estimate . To obtain the per-site mutation rate we need to divide by the number of bases L after our data cleaning process. We approximated this as follows:
At SGDP filter level 1, there are about 2.13 × 109 sites per individual.
Multiply this by 0.93 due to excluding the sex chromosomes.
Multiply this by 0.32 due to only using transversions.
Multiply by 0.93 to account for excluding sites missing the Chimp allele.
Finally, multiply 1.1 to account for using genotype calls at filter level 0. The inflation in the number of sites here is because we are using a stricter filter to ascertain SNPs (SGDP filter level 1) than we are to call genotypes at the SNPs (SGDP filter level 0). In particular, we need to account for SNPs where the sample has a heterozygous genotype at filter level 0, but has a missing genotype at filter level 1 ; these genotypes are counted as heterozygotes in the SFS, and we need to adjust the number of bases L to account for this.
The latter 2 factors (accounting for sites missing the Chimp allele and for adding in genotype calls at filter level 0) we estimated by observing how the number of heterozygotes per individual changed after these data cleaning steps.
Footnotes
A reviewer noted that Jouganous et al. (2017) also employ a Moran-based model with discrete and continuous admixture, however, as noted above, their method of solution is completely different from ours.
We omit certain graph preprocessing steps (moralization and triangulation) from the general junction tree algorithm which are not necessary in our setting.
The calls to DP(e0,…,e0) and DP only need to be computed once for all statistics.
References
- Baharian S and Gravel S (2018). On the decidability of population size histories from finite allele frequency spectra. Theoretical Population Biology 120, 42–51. [DOI] [PubMed] [Google Scholar]
- Beaumont MA and Nichols RA (1996). Evaluating loci for use in the genetic analysis of population structure. Proceedings of the Royal Society of London. Series B: Biological Sciences 263(1377), 1619–1626. [Google Scholar]
- Bhaskar A and Song YS (2014). Descartes’ rule of signs and the identifiability of population demographic models from genomic variation data. Annals of Statistics 42 (6), 2469–2493. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Bhaskar A, Wang YXR, and Song YS (2015). Efficient inference of population size histories and locus-specific mutation rates from large-sample genomic variation data. Genome Research 25 (2), 268–279. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Boyko AR, Williamson SH, Indap AR, Degenhardt JD, Hernandez RD, Lohmueller KE, Adams MD, Schmidt S, Sninsky JJ, Sunyaev SR, et al. (2008). Assessing the evolutionary impact of amino acid mutations in the human genome. PLoS Genetics 4 (5), e1000083. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Bryant D, Bouckaert R, Felsenstein J, Rosenberg NA, and RoyChoudhury A (2012). Inferring species trees directly from biallelic genetic markers: bypassing gene trees in a full coalescent analysis. Molecular Biology and Evolution 29 (8), 1917–1932. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Chen H (2012). The joint allele frequency spectrum of multiple populations: A coalescent theory approach. Theoretical Population Biology 81 (2), 179–195. [DOI] [PubMed] [Google Scholar]
- Corliss G, Faure C, Griewank A, Hascoet L, and Naumann U (2002). Automatic Differentiation of Algorithms: From Simulation to Optimization, Volume 1 New York: Springer Science & Business Media. [Google Scholar]
- Coventry A, Bull-Otterson LM, Liu X, Clark AG, Maxwell TJ, Crosby J, Hixson JE, Rea TJ, Muzny DM, Lewis LR, et al. (2010). Deep resequencing reveals excess rare recent variants consistent with explosive population growth. Nature Communications 1, 131. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Dabney J, Meyer M, and Pääbo S (2013). Ancient DNA damage. Cold Spring Harbor perspectives in biology 5(7), a012567. [DOI] [PMC free article] [PubMed] [Google Scholar]
- De lorio M and Griffiths RC (2004). Importance sampling on coalescent histories. II: Subdivided population models. Adv. Appl Prob. 36, 434–454. [Google Scholar]
- De Maio N, Schrempf D, and Kosiol C (2015). Pomo: An allele frequency-based approach for species tree estimation. Systematic Biology 64 (6), 1018–1031. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Donnelly P and Kurtz T (1996). A countable representation of the Fleming-Viot measure-valued diffusion. Ann Probab 24, 698–742. [Google Scholar]
- Donnelly P, Kurtz TG, et al. (1999). Particle representations for measure-valued population models. The Annals of Probability 27 (1), 166–205. [Google Scholar]
- Durrett R (2008). Probability Models for DNA Sequence Evolution (2nd ed.). Springer, New York. [Google Scholar]
- Ewens WJ (2004). Mathematical Population Genetics: I. Theoretical Introduction. New York: Springer Science+Business Media, Inc. [Google Scholar]
- Excoffier L, Dupanloup I, Huerta-Sánchez E, Sousa VC, and Foil M (2013). Robust demographic inference from genomic and SNP data. PLoS Genetics 9 (10), e1003905. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Excoffier L and Foil M (2011). Fastsimcoal: a continuous-time coalescent simulator of genomic diversity under arbitrarily complex evolutionary scenarios. Bioinformatics 27 (9), 1332–1334. [DOI] [PubMed] [Google Scholar]
- Fay JC and Wu CI (2000). Hitchhiking under positive Darwinian selection. Genetics 155, 1405–1413. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Felsenstein J (1981). Evolutionary trees from DNA sequences: a maximum likelihood approach. Journal of Molecular Evolution 17, 368–376. [DOI] [PubMed] [Google Scholar]
- Fu Q, Li H, Moorjani P, Jay F, Slepchenko SM, Bondarev AA, Johnson PL, Aximu-Petri A, Prüfer K, de Filippo C, et al. (2014). Genome sequence of a 45,000-year-old modern human from western Siberia. Nature 514 (7523), 445. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Gazave E, Ma L, Chang D, Coventry A, Gao F, Muzny D, Boerwinkle E, Gibbs RA, Sing CF, Clark AG, et al. (2014). Neutral genomic regions refine models of recent rapid human population growth. Proceedings of the National Academy of Sciences 111 (2), 757–762. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Gravel S, Henn BM, Gutenkunst RN, Indap AR, Marth GT, Clark AG, Yu F, Gibbs RA, Bustamante CD, Altshuler DL, et al. (2011). Demographic history and rare allele sharing among human populations. Proceedings of the National Academy of Sciences 108 (29), 11983–11988. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Green RE, Krause J, Briggs AW, Maricic T, Stenzel U, Kircher M, Patterson N, Li H, Zhai W, Fritz MH-Y, et al. (2010). A draft sequence of the Neandertal genome. Science 328(5979), 710–722. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Griffiths R and Tavaré S (1998). The age of a mutation in a general coalescent tree. Communications in Statistics. Stochastic Models 14 (1–2), 273–295. [Google Scholar]
- Griffiths RC and Tavaré S (1997). Computational methods for the coalescent In Donnelly P and Tavaré S (Eds.), Progress in population genetics and human evolution, Volume 87, pp. 165–182. Springer-Verlag, Berlin. [Google Scholar]
- Gutenkunst RN, Hernandez RD, Williamson SH, and Bustamante CD (2009). Inferring the joint demographic history of multiple populations from multidimensional SNP frequency data. PLoS Genetics 5(10), e1000695. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Haak W, Lazaridis I, Patterson N, Rohland N, Mallick S, Llamas B, Brandt G, Nordenfelt S, Harney E, Stewardson K, et al. (2015). Massive migration from the steppe was a source for Indo-European languages in Europe. Nature 522, 207–211. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Holsinger KE and Weir BS (2009). Genetics in geographically structured populations: defining, estimating and interpreting FST. Nature Reviews Genetics 10 (9), 639–650. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Jenkins PA, Mueller JW, and Song YS (2014). General triallelic frequency spectrum under demographic models with variable population size. Genetics 196(1), 295–311. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Jouganous J, Long W, Ragsdale AP, and Gravel S (2017). Inferring the joint demographic history of multiple populations: Beyond the diffusion approximation. Genetics 206(3), 1549–1567. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kamm JA, Terhorst J, and Song YS (2017). Efficient computation of the joint sample frequency spectra for multiple populations. Journal of Computational and Graphical Statistics 26 (1), 182–194. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kelleher J, Etheridge AM, and McVean G (2016). Efficient coalescent simulation and genealogical analysis for large sample sizes. PLoS computational biology 12(5), e1004842. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kimura M (1969). The number of heterozygous nucleotide sites maintained in a finite population due to steady flux of mutations. Genetics 61 (4), 893–903. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kingman JFC (1982). The coalescent. Stoch. Process. Appl 13, 235–248. [Google Scholar]
- Koller D and Friedman N (2009). Probabilistic Graphical Models: Principles and Techniques. MIT press. [Google Scholar]
- Lauritzen SL and Spiegelhalter DJ (1988). Local computations with probabilities on graphical structures and their application to expert systems. Journal of the Royal Statistical Society. Series B (Methodological) 50 (2), 157–224. [Google Scholar]
- Lazaridis I, Nadel D, Rollefson G, Merrett DC, Rohland N, Mallick S, Fernandes D, Novak M, Gamarra B, Sirak K, et al. (2016). Genomic insights into the origin of farming in the ancient Near East. Nature 536 (7617), 419–424. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Lazaridis I, Patterson N, Mittnik A, Renaud G, Mallick S, Kirsanow K, Sudmant PH, Schraiber JG, Castellano S, Lipson M, et al. (2014). Ancient human genomes suggest three ancestral populations for present-day Europeans. Nature 513 (7518), 409–413. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Lukić S and Hey J (2012). Demographic inference using spectral methods on SNP data, with an analysis of the human out-of-Africa expansion. Genetics 192 (2), 619–639. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Maclaurin D, Duvenaud D, and Adams RP (2015). Autograd: Effortless gradients in numpy. In ICML 2015 AutoML Workshop. [Google Scholar]
- Mallick S, Li H, Lipson M, Mathieson I, Gymrek M, Racimo F, Zhao M, Chennagiri N, Nordenfelt S, Tandon A, et al. (2016). The Simons Genome Diversity Project: 300 genomes from 142 diverse populations. Nature 538 (7624), 201–206. [DOI] [PMC free article] [PubMed] [Google Scholar]
- McKenna A, Hanna M, Banks E, Sivachenko A, Cibulskis K, Kernytsky A, Garimella K, Altshuler D, Gabriel S, Daly M, et al. (2010). The Genome Analysis Toolkit: a mapreduce framework for analyzing next-generation DNA sequencing data. Genome Research 20 (9), 1297–1303. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Meyer M, Arsuaga J-L, de Filippo C, Nagel S, Aximu-Petri A, Nickel B, Martinez I, Gracia A, de Castro JMB, Carbonell E, et al. (2016). Nuclear DNA sequences from the middle pleistocene sima de los huesos hominins. Nature 531 (7595), 504–507. [DOI] [PubMed] [Google Scholar]
- Myers S, Fefferman C, and Patterson N (2008). Can one learn history from the allelic spectrum? Theor. Popul. Biol 73(3), 342–348. [DOI] [PubMed] [Google Scholar]
- Nelson MR, Wegmann D, Ehm MG, Kessner D, Jean PS, Verzilli C, Shen J, Tang Z, Bacanu S-A, Fraser D, et al. (2012). An abundance of rare functional variants in 202 drug target genes sequenced in 14,002 people. Science 337(6090), 100–104. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Nielsen R (2000). Estimation of population parameters and recombination rates from single nucleotide polymorphisms. Genetics 154 (2), 931–942. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Notohara M (1990). The coalescent and the genealogical process in geographically structured population. Journal of Mathematical Biology 29 (1), 59–75. [DOI] [PubMed] [Google Scholar]
- Patterson N, Moorjani P, Luo Y, Mallick S, Rohland N, Zhan Y, Genschoreck T, Webster T, and Reich D (2012). Ancient admixture in human history. Genetics 192(3), 1065–1093. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Pearl J (1982). Reverend bayes on inference engines: a distributed hierarchical approach. In Proceedings of the National Conference on Artificial Intelligence, pp. 133–136. [Google Scholar]
- Prüfer K, Racimo F, Patterson N, Jay F, Sankararaman S, Sawyer S, Heinze A, Renaud G, Sudmant PH, De Filippo C, et al. (2014). The complete genome sequence of a Neanderthal from the Altai Mountains. Nature 505(7481), 43–49. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Raghavan M, Skoglund P, Graf KE, Metspalu M, Albrechtsen A, Moltke I, Rasmussen S, Stafford TW Jr, Orlando L, Metspalu E, et al. (2014). Upper Palaeolithic Siberian genome reveals dual ancestry of Native Americans. Nature 505(7481), 87–91. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Saitou N and Nei M (1987). The neighbor-joining method: a new method for reconstructing phylogenetic trees. Molecular Biology and Evolution 4(A), 406–425. [DOI] [PubMed] [Google Scholar]
- Sawyer SA and Hartl DL (1992). Population genetics of polymorphism and divergence. Genetics 132(A), 1161–1176. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Scally A (2016). The mutation rate in human evolution and demographic inference. Current Opinion in Genetics & Development 41, 36–43. [DOI] [PubMed] [Google Scholar]
- Schaffner SF, Foo C, Gabriel S, Reich D, Daly WJ, and Altshuler D (2005). Calibrating a coalescent simulation of human genome sequence variation. Genome Res. 15, 1576–1583. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Stephens M and Donnelly P (2000). Inference in molecular population genetics. J. Royal Stat. Soc. B 62, 605–655. [Google Scholar]
- Tajima F (1989). Statistical method for testing the neutral mutation hypothesis by DNA polymorphism. Genetics 123 (3), 585–595. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Takahata N (1988). The coalescent in two partially isolated diffusion populations. Genetics Research 52(3), 213–222. [DOI] [PubMed] [Google Scholar]
- Terhorst J, Kamm JA, and Song YS (2017). Robust and scalable inference of population history from hundreds of unphased whole genomes. Nature Genetics 49(2), 303–309. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Terhorst J and Song YS (2015). Fundamental limits on the accuracy of demographic inference based on the sample frequency spectrum. Proceedings of the National Academy of Sciences 112(25), 7677–7682. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Wakeley J and Hey J (1997). Estimating ancestral population parameters. Genetics 145(3), 847–855. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Watterson G (1975). On the number of segregating sites in genetical models without recombination. Theoretical Population Biology 7(2), 256–276. [DOI] [PubMed] [Google Scholar]
- Wegmann D, Leuenberger C, Neuenschwander S, and Excoffier L (2010). ABCtoolbox: a versatile toolkit for approximate Bayesian computations. BMC bioinformatics 11 (1), 116. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Zeng K, Fu Y-X, Shi S, and Wu C-I (2006). Statistical tests for detecting positive selection by utilizing high-frequency variants. Genetics 174 (3), 1431–1439. [DOI] [PMC free article] [PubMed] [Google Scholar]





