Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2025 Oct 15.
Published in final edited form as: J Am Stat Assoc. 2024 Apr 17;119(548):2437–2449. doi: 10.1080/01621459.2024.2330732

An efficient coalescent model for heterochronously sampled molecular data

Lorenzo Cappello a,b,d, Amandine Véber c, Julia A Palacios d,e,#
PMCID: PMC12509649  NIHMSID: NIHMS1993015  PMID: 41079782

Abstract

Molecular sequence variation at a locus informs about the evolutionary history of the sample and past population size dynamics. The Kingman coalescent is used in a generative model of molecular sequence variation to infer evolutionary parameters. However, it is well understood that inference under this model does not scale well with sample size. Here, we build on recent work based on a lower resolution coalescent process, the Tajima coalescent, to model longitudinal samples. While the Kingman coalescent models the ancestry of labeled individuals, we model the ancestry of individuals labeled by their sampling time. We propose a new inference scheme for the reconstruction of effective population size trajectories based on this model and the infinite-sites mutation model. Modeling of longitudinal samples is necessary for applications (e.g., ancient DNA and RNA from rapidly evolving pathogens like viruses) and statistically desirable (variance reduction and parameter identifiability). We propose an efficient algorithm to calculate the likelihood and employ a Bayesian nonparametric procedure to infer the population size trajectory. We provide a new MCMC sampler to explore the space of heterochronous Tajima’s genealogies and model parameters. We compare our procedure with state-of-the-art methodologies in simulations and an application to ancient bison DNA sequences.

Keywords: Bayesian nonparametric, Kingman n-coalescent, Markov lumping, ancient DNA, Gaussian process, Effective population size

1. Introduction

Inference of population size dynamics and other evolutionary parameters from molecular sequence data is an important problem in evolutionary biology and molecular epidemiology of infectious diseases (Ho and Shapiro, 2011; Volz et al., 2013; Cappello et al., 2022). Phylogenetic models account for the dependence among n DNA sequences Y and models observed variation through two stochastic processes: an ancestral process of the sample represented by a genealogy g, and a mutation process with a given set of parameters μ that, conditionally on g, models the phenomena that have given rise to the sequences.

A standard choice for modeling g is the Kingman n-coalescent, (Kingman, 1982a, b), a model that depends on a parameter called effective population size Ne(t)t≥0) (henceforth Ne=Ne(t)t≥0), a measure of genetic diversity over time. Inference of Ne has important applications in many fields, such as genetics, anthropology, and public health. To give an example of the applications that can be handled with our proposal, we analyze ancient samples of bison in North America (Froese et al., 2017), revisiting the question of why the Beringian bison went extinct (Shapiro et al., 2004). Reproducing Shapiro et al. (2004) analysis with a new data set is interesting in light of the growing evidence of an arrival of humans in North America earlier than previously estimated (Bourgeon et al., 2017; Becerra-Valdivia and Higham, 2020).

In this manuscript, we assume the infinite sites mutation (ISM) model in which multiple mutations never occur at the same nucleotide position (site). A mutation under this model partitions the sample into sequences carrying the mutation and sequences not carrying the mutation. A consequence is that only a subset of the genealogical space has positive likelihood, making the ISM model computationally attractive. Recent work exploits this advantage (Speidel et al., 2019).

Standard Bayesian phylogenetic approaches approximate the augmented posterior πNe,g∣Y,μ through Markov chain Monte Carlo (MCMC). Here, the genealogy is treated as an auxiliary variable introduced to compute the likelihood in πNe,g∣Y,μ∝P(Y∣g,μ)πg∣NeπNe. Approximation of the posterior requires the definition of Markov chains (MCs) on genealogies, whose state space is the product space 𝒢n×R+n-1 of tree topologies (g∈𝒢n) and coalescent times t∈R+n-1 (times of coalescence events in the genealogy). Sampling from these distributions is extremely challenging: the target distribution is highly multi-modal, many different topologies have the same likelihood (Sanderson et al., 2015), and mixing times of tree-valued Markov chains are at best polynomial (Simper and Palacios, 2022). The issue is exacerbated as the sample size increases because the cardinality of 𝒢n grows superexponentially with n for the standard coalescent 𝒢n=n!(n-1)!/2n-1. The result is that state-of-the-art methodologies are not scalable to the amount of data available. To resolve this computational bottleneck, much research has focused on algorithms better suited for this setting, such as sequential Monte Carlo (Bouchard-Côté et al., 2012; Wang et al., 2015; Fourment et al., 2017; Dinh, Darling and Matsen IV, 2017), Hamiltonian Monte Carlo (Dinh, Bilge, Zhang and Matsen IV, 2017), and variational Bayes (Zhang and Matsen IV, 2018).

An alternative (or perhaps complementary) solution is to use a lower resolution ancestral (genealogical) process, known as the Tajima n-coalescent (Tajima, 1983; Sainudiin et al., 2015; Palacios et al., 2019). While the tree topologies under Kingman are labeled ranked tree shapes with n leaves, the tree topologies under Tajima are unlabeled ranked tree shapes with n-leaves (see, e.g., Figure 1), with a space of trees with a drastically smaller cardinality than that of the space of Kingman trees (Disanto and Wiehe, 2013). This amounts to taking equivalence classes of Kingman trees, in which the timed ranked tree shape is retained, but leaf labels are removed so that the external tree branches are all considered equivalent. This in turn, requires a new likelihood calculation in which individual DNA sequences are grouped by patterns of shared mutations. Intuitively, the likelihood of Tajima’s genealogies should be more concentrated and lead to more efficient inference. We elaborate on this argument through the following example.

Figure 1: Coalescence and mutation.

Figure 1:

A genealogy of 10 individuals at a locus of 100 sites is depicted as a bifurcating tree. Six mutations (at different sites) along the branches of the tree give rise to the 10 sequences. Black dots represent the 94 sites that do not mutate in the ancestral sequence. The nucleotides at the polymorphic sites are shown, and the colored arrows depict how ancestral sites are modified by mutation.

We generated a genealogy with n=6 tips and superimposed 3 mutations along the branches of the tree at 3 different sites (Figure 2). The resulting “unlabeled” data consist of one sequence carrying two mutations and two sequences carrying the same one mutation. This is the information used for calculating the likelihood of a Tajima genealogy. The “labeled” data used to compute the likelihood of a Kingman genealogy consist of sequence a carrying two mutations and sequences e and f carrying one mutation. We computed the likelihood of all Kingman and Tajima genealogies with 6 leaves, all with the same “true” coalescent times. There are 360 Kingman topologies and 16 Tajima topologies with positive likelihood. Figure 2 depicts the distribution of the normalized likelihood values along with their frequencies. Under Kingman’s coalescent, the maximum likelihood value is about 823.2 times larger than the minimum likelihood value. Under Tajima’s coalescent, this ratio between the maximum and minimum likelihood value is about 3.3. That is, the range of likelihood values is reduced. Moreover, the profiles are remarkably different: under Kingman’s coalescent, there are many trees with a negligible likelihood and a few with higher values; under Tajima’s coalescent, the more frequent likelihood values are closer to the center. Along with the lower cardinality, Tajima’s likelihood profile should make MCMC exploration of tree space more manageable. Indeed, one of the challenges in sampling from multimodal distributions is that MCs cannot fully explore the space because the chains struggle to move between modes due to the proposals getting rejected in low densities regions. The profile seen in Figure 2 will lead to higher acceptance probabilities in Metropolis Hastings, making it easier to move between modes. Importantly, the gains are obtained at no loss of information about Ne. All we lose are the sequence labels in the data and the mapping of mutations to a labeled genealogy. Instead, we retain the unlabeled data and the set of mappings of shared mutations to edges in the unlabeled genealogy. We will be more precise on this aspect in section 3.

Figure 2: Distributions of the likelihood values under the Kingman and the Tajima n-coalescent for a given data set.

Figure 2:

The first plot shows a realization of a genealogy of n=6 samples (tips) with three mutations superimposed (marked as X). The second plot shows the histogram of the likelihood values conditionally on all possible Tajima tree topologies, and the third plot shows the histogram of the likelihood values conditionally on all possible Kingman trees with 6 leaves. We assumed the same coalescent times across all trees.

The Tajima coalescent was first used to infer Ne by Palacios et al. (2019), but despite the advances in that paper, there are still many challenges to be addressed for the Tajima n-coalescent to be a viable alternative to the Kingman n-coalescent. First, the algorithm for the likelihood calculation of Palacios et al. (2019) can be prohibitively expensive; a loose upper bound of the current algorithm’s complexity is 𝒪(n!). Second, the definition of the likelihood relies on several restrictive modeling assumptions such as no recombination, no population structure, and the fact that all samples are obtained at a single point in time. In this paper, we address several of these issues. We introduce a new algorithm for likelihood calculation whose upper bound complexity is 𝒪n2, and we extend the Tajima modeling framework to sequences observed at different time points like those at the tips of the genealogy in Figure 1, i.e., heterochronous data. Our proposed method infers Ne, mutation rate μ, and can deal with data collected at multiple independent loci. For parsimony, this general setting is studied in the supplementary material.

Out of the many possible directions that may have been pursued from Palacios et al. (2019), the extension to heterochronous data was prioritized for several reasons: (i) data are collected longitudinally in many applications (e.g., ancient DNA and viral phylodynamics), (ii) employing longitudinal data reduces the variance of the estimators of Ne (Rodrigo et al., 2007) and (iii) the model becomes identifiable for joint estimation of mutation rates and effective population sizes (Drummond et al., 2002; Parag and Pybus, 2019).

Modeling longitudinal data requires the definition of a continuous time Markov chain, which is a lumping of the heterochronous n-coalescent introduced by Rodrigo and Felsenstein (1999). We refer to the lower resolution of this process (the lumped process) as the Tajima heterochronous n-coalescent. This process differs from the Tajima n-coalescent (Sainudiin et al., 2015; Palacios et al., 2019) in that sequences sampled at different time points are not exchangeable. The Tajima heterochronous is a model on partially-labeled genealogies of heterochronous samples.

The rest of the paper proceeds as follows. In Section 2, we define the Tajima heterochronous n-coalescent. In Section 3, we introduce the assumed mutation model, describe the data, define the likelihood and the new algorithm to compute it. Section 4 describes the MCMC algorithm for posterior inference; in Section 5 we discuss the gained efficiency of the proposed approach and in Section 6, we present a comprehensive simulation study outlining how the method works and compares with state-of-the-art alternatives. In Section 7, we analyze modern and ancient bison sequences described in Froese et al. (2017). Section 8 concludes.

2. The Tajima heterochronous n-coalescent

The Tajima heterochronous n-coalescent is a lumping of the heterochronous n-coalescent (Rodrigo and Felsenstein, 1999) that describes the ancestral relationships of a set of n individuals sampled, possibly at different times, from a large population. The set of ancestral relationships of the sample is represented by a ranked and partially labeled genealogy, for example the one depicted in Figure 3 in which internal nodes are ranked bottom-up and tips are partially labeled by their sampling time. We assume that every organism is dated and labeled according to the time in which the organism lived (if ancient, by radiocarbon date) or in which the living organism was sequenced. In this generalization of the Tajima coalescent, each pair of extant ancestral lineages merges into a single lineage at an instantaneous rate depending on the current effective population size Ne(t), and new lineages are added when one of the prescribed sampling times is reached. In this work, we do not model the stochasticity of sampling times but we condition on them being fixed. The main difference with the isochronous Tajima coalescent is that in the isochronous case, the genealogy is unlabeled, that is, all sequences are sampled at the same time.

Figure 3: Example of a Tajima heterochronous genealogy and its jump chain.

Figure 3:

A realization of a Tajima heterochronous n-coalescent with n=(7,3) and s=s1,s2, represented as a ranked tree shape with coalescence and sampling times, denoted g. The column to the right displays the corresponding jump chain (see the text for notation).

Let us introduce some notation and terminology. Let m be the number of sampling time points and n be the total number of samples. Let n=n1,…,nm denote the number of sequences collected at times s=s1,…,sm, with s1=0 denoting the present time, and sj>sj-1 for j=2,…,m (time goes from present towards the past). We refer to sampling group as the set sequences sampled at a given time; there are m of such groups. The sampling group corresponding to sequences sampled at si is labeled by si. Let t=tn+1,…,t2 be the vector of coalescent times with tn+1=0<tn<…<t2; these are the times when two lineages have a common ancestor. By convention, we include tn+1=0 (the present, or the time of the latest sample) despite not being a coalescent time. Such a convention is useful when defining the density of t. Note that the subscript in tk does not indicate the current number of lineages, as it is often done in the coalescent literature, but it indicates the number of lineages that have yet to coalesce (some sequences may not have been sampled yet). We use the rank order of the coalescent events (bottom-up) to label the internal nodes of the genealogy. That is, the node corresponding to the coalescent event occurring at time tn is labeled 1 (see t10 in Figure 3), the node corresponding to the coalescence event occurring at time tn-1 is labeled 2, etc. We refer to the internal node labels as vintages (i.e., rankings), and to lineages that subtend a vintage as vintaged lineages to highlight the fact that they are labeled by a given vintage, and thus, distinguishable from all other lineages.

The Tajima heterochronous n-coalescent is an inhomogeneous continuous-time Markov chain (a(t),b(t))t≥0 that keeps track of a(t), a vector of length m whose j-th position indicates the number of singletons from sampling group sj at time t, and b(t) is the set of vintaged lineages at time t. The process starts at t=0 in state (a(0)=n1,0,…,0,b(0)=Ø), jumps deterministically at every sampling time and jumps stochastically at every random coalescent time until it reaches the unique absorbing state at2=(0,…,0),bt2={n-1} at time t2, when all n samples have a single most recent common ancestor at the root (Figure 3). At each sampling time si, the state of the Tajima coalescent jumps deterministically as follows:

asi,bsi=asi-+niei,bsi-,

where fsi- denotes the left limit of the function f at si and ei is the i-th unit vector.

Let us now turn to the embedded jump chain at coalescent times. At time ti, a random pair of extant lineages coalesce to create a new lineage with vintage n+1-i. All extant lineages coalesce at rate 1 but the transition probability depends on which pair coalesces. Singleton lineages of the same sampling group are indistinguishable and distinguishable from those of other sampling groups and vintaged lineages. All vintaged lineages are uniquely labeled and distinguishable from all the others. Four types of coalescence transitions are possible depending on which lineages are involved: (1) two singletons from the same sampling group coalesce (up to m possible moves for the chain), (2) two singletons from different sampling groups coalesce (up to m(m-1)/2 possible moves), (3) one singleton lineage and one vintaged lineage coalesce (up to m possible moves), or (4) two vintaged lineages coalesce (only one possibility because for vintages, the sampling information is irrelevant). Each pair coalesces with the same probability and the transition probabilities at coalescent times are thus given by

Pati,bti∣ati-,bti- (1)
={∏j=1m(aj(ti−)aj(ti−)−aj(ti))(∑j=1maj(ti−)+|b(ti−)|2)if(a(ti),b(ti))≺(a(ti−),b(ti−))0otherwise

where ati,bti≺ati-,bti- means that ati,bti can be obtained by merging two lineages of ati-,bti- and |b| denotes the cardinality of the set b.

Observe that the quantity ∑j=1maj(ti−)+|b(ti−)| appearing in (1) corresponds to the total number of extant lineages just before the event at ti. Furthermore, since only two lineages coalesce at time ti, at most two terms in the product appearing in the numerator of (1) are not equal to one. Finally, if m=1, at any time t≥0 the vector a(t) is made of a single integer and (1) degenerates into the transition probabilities of the Tajima isochronous n-coalescent (Sainudiin et al., 2015; Palacios et al., 2019); on the other hand, if m=n, the process degenerates into the Kingman heterochronous n-coalescent since all singletons are uniquely labeled by their sampling times. Figure 3 shows a possible realization from the Tajima heterochronous n-coalescent. Notice that in applications, the number of observations collected at any given time instance is generally larger than one, and hence, the heterochronous Tajima model would have a smaller state space than the Kingman model on heterochronous data. We investigate this assertion in supplementary material (SM) section 6, where we developed a sequential importance sampling to tackle this combinatorial question.

To define the distribution of the holding times, we introduce the following notation. We denote the intervals that end with a coalescent event at tk by I0,k and the intervals that end with a sampling time within the interval tk+1,tk as Ii,k where i≥1 is an index tracking the sampling events in (tk+1,tk). More specifically, for every k∈{2,…,n}, we define

I0,k=maxtk+1,sj,tk, (2)

where the maximum is taken over all sj<tk, and for every i≥1 we set

Ii,k=maxtk+1,sj-i,sj-i+1, (3)

where the maximum taken over all sj-i+1>tk+1 and sj<tk. We also let ni,k denote the number of extant lineages during the time interval Ii,k. For example, in Figure 3, in t9,t8 we have I0,8=s2,t8,I1,8=t9,s2) and no Ii,8 for i≥2. The vector of coalescent times t is a random vector whose density with respect to Lebesgue measure on R+n-1 can be factorized as the product of the conditional densities of tk-1 knowing tk, which reads: for k=3,…,n+1,

p(tk−1∣tk,s,n,Ne)=C0,k−1Ne(tk−1)exp{−∫I0,k−1C0,k−1Ne(t)dt+∑i=1m∫Ii,k−1Ci,k−1Ne(t)dt}, (4)

where Ci,k:=ni,k2, and the integral over Ii,k-1 is zero if there are less than i sampling times between tk and tk-1. The distribution of the holding times defined above corresponds to the same distribution of holding times in the heterochronous Kingman coalescent (Rodrigo and Felsenstein, 1999). Although the heterochronous Tajima coalescent takes values on a different state space, it remains true that every pair of extant lineages coalesces at equal rate.

Finally, given n,s and t, a complete realization of the Tajima heterochronous n-coalescent chain can be uniquely identified with an unlabeled binary ranked tree shape g of n=n1,…,nm samples at s1,…,sm with its n-1 coalescent transitions, so that

P(g∣t,s,n)=∏i=2nP[(a(ti),b(ti))∣(a(ti−),b(ti−))]. (5)

Equation (5) gives the prior probability of the tree topology g under the Tajima heterochronous n-coalescent. Putting together (4) and (5), we obtain a prior distribution on the space of genealogies g=(g,t), which are ranked (unlabeled) topologies equipped with branch lengths

π(g∣s,n,Ne)=P(g∣t,s,n)∏k=3n+1p(tk−1∣tk,s,n,Ne). (6)

3. Data and Likelihood

3.1. Infinite Sites Model and the Perfect Phylogeny

We assume that the observed data Y consists of n unlabeled sequences at z polymorphic (mutating) sites at a non-recombining contiguous segment of DNA of organisms with a low mutation rate. Under these assumptions, a widely studied mutation model is the infinite sites model (ISM) (Kimura, 1969; Watterson, 1975) with Poissonian mutation, which corresponds to a Poisson point process with rate μ on the branches of g such that every mutation occurs at a different site and no mutations are hidden by a second mutation affecting the same site.

An important consequence of the ISM is that Y can be represented as an incidence matrix Y1 and a frequency counts matrix Y2.Y1 is a k×z matrix with 0–1 entries, where 0 indicates the ancestral type and 1 indicates the mutant type; k is the number of unique sequences (or haplotypes) observed in the sample, and the columns correspond to polymorphic sites. Y2 is a k×m count matrix where the (i,j) th entry denotes how many haplotype i sequences belonging to group s j are sampled. For example, the n=10 sequences defined by the realizations of the ancestral and mutation processes depicted in Figure 1 can be summarized into Y1 and Y2 displayed in Figure 4(A). Note that we make the implicit assumption that we know which state is ancestral at each segregating site. However, this assumption can be relaxed, see (Griffiths and Tavaré, 1995), although the computational cost will substantially increase.

Figure 4: Incidence matrix, frequency matrix and perfect phylogeny representation.

Figure 4:

Panel (A): data is summarized as an incidence matrix Y1(h denotes the haplotypes, l the segregating sites, the colors correspond to those depicted in Figure 1) and a matrix of frequencies Y2(s denotes the sampling group). Panel (B): T denotes the perfect phylogeny corresponding to Y1 and Y2; each of the 6 polymorphic sites labels exactly one edge. When an edge has multiple labels, the order of the labels is irrelevant. Each leaf node is labeled by a pair (haplotype, sampling time), with each haplotype possibly labeling more than one leaf nodes. Panel (C): Ei corresponds to the number of mutations along the edge subtending node Vi in (B) and Vi corresponds to the number of sequences descending from Vi in (B), see the text for details.

Y1 and Y2 can alternatively be represented graphically as an augmented perfect phylogeny T. Our likelihood algorithm exploits this graphical representation of the data. The augmented perfect phylogeny representation is an extension of the gene tree or perfect phylogeny (Gusfield, 1991; Griffiths and Tavare, 1994) to the heterochronous case. The standard perfect phylogeny definition leaves out the information carried by Y2. In the augmented perfect phylogeny T=(V,E), V is the set of nodes of T, and E is the set of weighted edges. For parsimony, the edge that connects node Vi to its parent node is denoted by Ei. Palacios et al. (2019) also employ a generalization of Gusfield’s perfect phylogeny but their construction differs in that there is no bookkeeping of sampling information. We define T as follows:

  1. Each haplotype labels at least one leaf in T. If a haplotype is observed at k different sampling times, then k leaves in T will be labeled by the same haplotype. The pair (haplotype label, sampling group) uniquely labels each leaf node.

  2. Each of the z polymorphic sites labels exactly one edge. When multiple sites label the same edge, the order of the labels along the edge is arbitrary. Some external edges (edges subtending leaves) may not be labeled, indicating that they do not carry additional mutations to their parent node.

  3. For any pair (haplotype hk, sampling group), the labels of the edges along the unique path from the root to the leaf hk specify all the sites where hk has the mutant type.

Figure 4(B) plots T corresponding to Y1 and Y2 displayed in Figure 4(A). Observe that T includes sampling information in the leaf labels. In the example, hC labels two leaves because it is observed at times s1 and s2. The corresponding edges E3 and E4 are unlabeled, i.e., no mutations are allocated to those edges because the underlying nodes carry identical sequences (same haplotype). We “augment” Gusfield’s perfect phylogeny because the sampling information is crucial in the likelihood calculation.

T implicitly carries some quantitative information that can be quickly summarized. We denote the number of observed sequences subtended by an internal node V by |V|. If V is a leaf node, |V| denotes the frequency of the haplotype h observed at the corresponding sampling time s. Similarly, we denote the number of mutation labels assigned to an edge E by |E|. If no mutations are assigned to E, then |E|=0. See Figure 4(C) for an example.

Gusfield (1991) gives an algorithm to construct the perfect phylogeny T’ in linear time. Constructing T from T’ is straightforward since all we need is to incorporate the sampling information and add leaf nodes if a haplotype is observed at multiple sampling times. If we drew T’ from the data in Figure 4, it would not have node V4, but only a single node V3 labeled by haplotype hC. A description of the algorithm can be found in the SM section 2.

3.2. Likelihood

The crucial step needed to compute the likelihood of a heterochronous Tajima genealogy g is to sum over all possible allocations of mutations to its branches with the corresponding sampling group. This can be efficiently done by exploiting the augmented perfect phylogeny representation of the data T and by first mapping nodes of T to subtrees of g. We note that with Kingman’s coalescent, tree leaves are labeled by the sequences so there is a unique possible allocation of mutations to branches. With isochronous Tajima coalescent, leaves are unlabeled and there are potentially multiple allocations of mutations to branches. In Palacios et al. (2019), the authors employ a backtracking algorithm that traverses bottom-up the isochronous perfect phylogeny. Here, we reverse the point of view with a two-steps approach: first, we define a top-down algorithm that uses T to identify all possible allocations (Section 3.2.1), then the output of the first step is fed into a sum-product algorithm that uses the set of possible allocations to compute the likelihood efficiently (Section 3.2.2).

3.2.1. Allocations

Let a be a vector of length n-1 that encodes a possible mapping of nodes of T to subtrees of g. The i-th entry of a gives the node in T which is mapped to the subtree with vintage i,gi (including the branch that subtends vintage i). Our algorithm first maps all non-singleton nodes V of T to subtrees of g, that is, only nodes such that |V|>1 are entries of a. Singleton nodes in T(V∈V such that |V|=1) are treated separately and are initially excluded from the allocation step. For example, Figure 5 shows a possible vector a whose entries are the non-singleton nodes V0,V1,V2, and V5 of T of Figure 4. We note that nodes can appear more than once in a, meaning that they can be mapped to more than one subtrees. On the other hand, a single node Vi is not necessarily mapped to all the vintages, leaves and internal branches of gj; different nodes may be mapped to some subtrees of gj (including external branches), leading to a situation where Vi is mapped to only a subset of the vintages and branches constituting gj. For example, in Figure 5, V1 is mapped to g6 and g3, but V2 is mapped to g1, a subtree of both g6 and g3; hence V1 is only mapped to the green part of g6 and g3 as depicted in the Figure.

Figure 5: A possible allocation of non-singleton nodes of V to subtrees of g.

Figure 5:

For a given allocation a (bottom figure), we display how subtrees in g (identified by the vintage tag at their root – black number in the top figure) are allocated to the nodes of T. Each color depicts an allocation of a subtree to a node: V5 (red), V0 (blue), V1 (green) and V2 (yellow).

The precise mapping of nodes in T to subtrees of g is needed to allocate mutations in T to branches of g. The algorithm, described in the SM section 3, outputs all possible allocations. We denote by #a, the number of possible allocations and a given allocation as ai, for i=…,#a.

3.2.2. Likelihood Calculations

To calculate the likelihood, we assume the ISM of mutations and that mutations occur according to a Poisson point process with rate μ on the branches of g, where μ is the total mutation rate. To compute the likelihood we need to map mutations in T to branches of g and this is done for each mapping ai of non-singleton nodes of T to subtrees of g. For every V in T such that |V|>1, we define EV as the set formed by the edges in T that subtend singleton children of V and, with the exception of V=V0,EV in addition includes the edge that subtends V. For the example in Figure 4(B), EV1=E1,E3,E4. Let V* be the set of all V∈V such that |V|>1, then the likelihood function is defined as

P(Y∣g,Ne,μ)=∑i=1#aP(Y,ai∣g,Ne,μ)=∑i=1#a∏V∈V*P(V,EV,ai∣g,Ne,μ), (7)

where PV,EV,ai∣g,Ne,μ is the probability of observing the mutations of the EV edges along the corresponding branches of g defined by the mapping ai as follows.

If V has no singleton child nodes, then EV={E} and

PV,{E},ai∣g,Ne,μ∝(μl)|E|e-μ𝒯, (8)

where l is the length of the branch in g that subtends gj,j is the largest index such that ai,j=V, and 𝒯 denotes the length of the subtree in g to which V is mapped in ai (as described in Subsection 3.2.1). For example, considering V2 in Figure 5, we have 𝒯2=2tn+tn-2-tn and l=tn-2-tn is the length of the branch connecting vintage 1 to vintage 3.

If node V has singleton child nodes,

P(V,{E,Ech1,…,Echk},ai∣g,Ne,μ)∝(μl)|E|e−μT∑R∈Π(EV)∏j=1k(μlRj)|Echj|, (9)

where the first term on the r.h.s is defined exactly as the quantity on the r.h.s. of (8), while the second term corresponds to the probability of all possible different matchings between R1,…,Rk, the first k indexes such that ai,Rj=V, and Ech1,Ech2,…,Echk, the k numbers of mutations observed on the edges Ech1,…,Echk leading to the child nodes of V. In this expression, ΠEV is the set of all possible such matchings R.

Before defining ΠEV more precisely, we make two observations. First, not all matchings are possible since not all leaf branches terminate at the same time (heterochronous sampling). Second, it is enough to consider the allocations that contribute to distinct likelihood values, i.e., allocations for which the underlying samples are “distinguishable” in the sense that they have a different number of mutations.

We define ΠEV as the set of all possible “distinct matchings of number of observed singleton mutations to singleton branches”, that is, allocations which lead to a distinct likelihood values. To construct ΠEV, we first partition the singleton edges Ech1,…,Echk according to the sampling times of the corresponding nodes Vch1,…,Vchk. Let ki be the number of nodes in Vch1,…,Vchk with sampling time si, i.e., the size of each subset of the partition. We then further partition these subsets by grouping together the edges carrying the same number of mutations (defined as Ech1,…,Echk). For each given sampling time sj, let kj(1),…,kjmj denote the cardinalities of the mj sub-subsets obtained by this procedure, so that kj=∑h=1mjkj(h). The cardinality of ΠEV is then

|Π(EV)|=∏j=1mkj!kj(1)!…kj(mj)!, (10)

where the product in (10) is the number of permutations with repetition of the different edges that are compatible with the data in terms of sampling times and numbers of mutations carried. Note that Equation (10) is not the same as Equation (6) in Palacios et al. (2019) because here we account for the different sampling groups. It degenerates into Equation (6) in Palacios et al. (2019) in the isochronous case.

Last, we note that knowing a priori the full matrix A of all possible allocations, allows to compute efficiently the likelihood (7) via a sum-product algorithm. The set of all possible a is an #a×(n-1) matrix A, where each row is a possible a (n-1 columns) and the number of rows #a is equal to the number of possible allocations. Now, for each V∈V* there may be several rows a of A such that PV,EV,a∣g,Ne,μ is the same, due to the fact that V is mapped to the same subtree in all these allocations. For such a V, one could compute the likelihood corresponding to these r distinct allocations, which we denote by a1′,…,ar′, in the following way:

∑i=1r∏V∈V*P(V,EV,ai′∣g,Ne,μ)=P(V,EV,a1′∣g,Ne,μ)∑i=1r∏V′∈V*\{V}P(V′,EV′,ai′∣g,Ne,μ). (11)

The exact sum-product formulation of (7) is specific to the observed Y and A.

4. Bayesian Model and MCMC inference

To complete our Bayesian model we now need to specify a prior distribution on logNe (the logarithm is used to ensure that Ne(t)>0 for t≥0). We follow Palacios and Minin (2013), and place a Brownian motion process as prior on logNe. We thus have:

Y∣g,μ,Ne,n,s~Poissonprocessg∣Ne,s,n~Tajimaheterochronousn-coalescent (12)
logNe∣τ∼BM(0,C(τ))
τ∼Gamma(α,β)

where C(τ) is the covariance function of a Brownian process with mean 0 and precision τ. The novelty in (4) is to model the genealogy with the Tajima heterochronous n-coalescent. In terms of modeling Ne, our framework allows for any prior on a piece-wise constant trajectory logNe. For example, if one expects sudden changes in Ne, the recently proposed prior of Faulkner et al. (2020) could be a good alternative that has shown good empirical results. The posterior distribution

πlogNe,τ,g∣Y,μ∝PY∣g,logNe,μπg∣logNeπlogNe∣τπ(τ), (13)

is approximated via MCMC with Metropolis-within-Gibbs updates. At each MCMC iteration, we jointly update (logNe,τ) via a Split Hamiltonian Monte Carlo (HMC) (Shahbaba et al., 2014) suitably adapted to phylodynamics inference by Lan et al. (2015); then we update the topology g and t. We propose two Metropolis steps to update g and t. The latter may also be combined in a single step. The transitions for g and t are tailored to the Tajima n-coalescent genealogies. To update g, we employ the scheme in Palacios et al. (2019) suitably adjusted for the heterochronous case, with two local proposals that either swap two consecutive coalescent events or swap two offspring, each descending from two different and consecutive coalescent events (Palacios et al., 2019, Figure 4). To update t, we propose a new sampler (SM, Section S5.2) that accounts for the observed sampling times constraints, an issue specific to heterochronous samples under the ISM assumption (SM, Section S5.1).

Model (4) can be generalized in various ways. We can infer model parameters from data observed at multiple independent loci (without recombination); see SM S11 for details and a simulation study. When the mutation rate is unknown but sequences sampled at different times have accumulated mutations, the model parameters Ne and μ become jointly identifiable (Drummond et al., 2002). In this case, we can add an additional prior distribution to model (4) and an extra MCMC step; see SM S12. Lastly, to incorporate the case of unknown ancestral state, one needs to sum over all possible ancestral states compatible with the data (Griffiths and Tavaré, 1995). Other extensions will be mentioned in the discussion.

5. Increased efficiency with no loss of information

We have assumed that the observed data Y can be summarized as a haplotype incidence matrix Y1 and a frequency matrix Y2, that is, the individual samples are labeled by their haplotype and sampling information (see for example Figure 4). Under Kingman’s coalescent, every sequence is uniquely labeled, and every tip in the Kingman’s genealogy corresponds to a labeled sequence. Let Ylab denote the fully labeled data (i.e., the augmented data where each sequence in Y receives a unique identifying label in {1,…,n}) and gK a labeled ranked tree shape, then the marginal likelihood is PYlab∣Ne, where we do not condition on μ because, for simplicity, we assume that the mutation rate μ is fixed. If we further assume that all sequences are sampled at the same time point and all observed haplotypes have different frequencies ni≠nj for i≠j,i,j=1,…,k, then we have

PY∣Ne=nn1,…,nkPYlab∣Ne.

The same combinatorial factor above would result even if ni=nj as long as the two haplotypes have different numbers of mutations and become distinguishable. If different haplotypes become indistiguishable in terms of number of mutations and frequency, then the combinatorial factor would change by another constant which is independent of Ne. This shows that there is no loss of information when using the partially labeled data Y. We will use c(Y) to denote the combinatorial factor that counts the number of labeled data sets corresponding to the unlabeled data set by dropping the sample labels.

The motivation for estimating the posterior of log Ne by sampling over Tajima’s genealogies instead of sampling over Kingman’s genealogies is a variance reduction. With labeled data, we are interested in

PNe∣Ylab=PYlab∣NePNePYlab=PNeEgkPYlab∣gKPYlab

where EgkPYlab∣gK is computed with respect to Pgk∣Ne. Similarly, with unlabeled data, we are interested in

PNe∣Y=PY∣NePNeP(Y)=PNeEg[P(Y∣g)]P(Y)

where Eg[P(Y∣g)] is computed with respect to Pg∣Ne.

Both EgkPYlab∣gK and Eg[P(Y∣g)] are approximated via Monte Carlo. Making the two variances comparable, we wish to show that for any given Y and Ylab

VargKPYlab∣gKPYlab2≥Varg[P(Y∣g)]P(Y)2. (14)

Since the distribution of t is shared in both models, we will assume fixed t and replace g,gK notation by g,gK to denote topologies only. Since P(Y)=c(Y)PYlab, we wish to show

c(Y)2VargKPYlab∣gK≥Varg[P(Y∣g)] (15)

The simplest cases occur when n∈(1,2,3). In these cases there is only one g tree topology and so Varg[P(Y∣g)]=0, while VargKPYlab∣gK≥0 and (15) holds. The next two minimum non-trivial cases are the following.

Example 1 (n=4, two haplotypes).

Consider two haplotypes with frequencies n1=n2=2 with m1 and m2 mutations in each haplotype, and m1≠m2. We can also fix μ=1 as it is will account for a proportionality constant. The only tree topology with non-zero likelihood is the tree subtending two cherries. Let l1=t2-t3 and l2=t2-t4, the lengths of the two branches subtending the two cherries. In this case

Varg[P(Y∣g)]=c29l1m1l2m2+l1m2I2m12,
VargKPYlab∣gK=c[118(l12m1l22m2+l12m2l22m1)-1324l1m1l2m2+l1m2l2m12].

where c=e-2𝒯/[m1!2m2!2] and 𝒯 denotes the tree length. Using the two variances, along with c(Y)=4!/(2!2!)=6, we can check that that the inequality (15) holds on in this example. In this case, we see that the inequality is strict. Details of the calculations of the variances are given in the SM Section 1.1.

How much bigger VargκPYlab∣gK is than VargPYlab∣g will depend on t,m1 and m2

To provide a more general sense of the difference in the variances for this specific example, we sampled 100 time vectors t assuming Ne=1, and fixed m1=2 and m3=4. The ratio

r=VargKPYlab∣gKVarg[P(Y∣g)]/c(Y)2.

is on average 7.18, with a maximum value of 8.49, and a minimum value of 4.

Example 2 (n=4, three haplotypes).

Consider three haplotypes with frequencies n1=2,n2=1, and n3=1 with m1=1,m2=1, and m3=0 mutations in each haplotype. The two variances are available in closed form in the SM Section 1.2, however the two analytical expressions are not insightful. The average ratio r based on 100 simulations is 60, taking values from 2 to 320.

While we currently do not have a proof of (14), the previous two examples show the variance reduction in two non-trivial cases. Revisiting the example discussed in introduction (Figure 2), we showed that the likelihood under Tajima is “more concentrated”, in the sense that, for a fixed data set, the range of possible likelihood values is drastically smaller. We conjecture that this property, along with the cardinality reduction, contributes to a more efficient exploration of the tree space. The Tajima n-coalescent partitions the space of Kingman’s trees into equivalence classes, where each Tajima’s topology corresponds to a set of Kingman’s topologies. That is,

P(Y|g)=c(Y)∑gK:unlabeled(gK)=gP(Ylab∣gK)P(gK∣g).

To compute the likelihood under Tajima, we effectively sum over many topologies with small likelihood. More details on this example are given in the SM section 1.

6. Simulations

In Section 6.1 we compare average runtimes of our likelihood algorithm vis-a-vis the backtracking-based one in Palacios et al. (2019). In Section 6.2, we infer Ne using the Tajima heterochronous n-coalescent, and compare results with our own implementation of the Kingman heterochronous n-coalescent. Both sections rely on simulated data obtained as follows: given n, s, and Ne, we simulate genealogies under the Tajima heterochronous n-coalescent. Given a realized g and fixed μ, we draw M mutations from a Poisson distribution with parameter μL(L is the length of the tree g: the sum of all branch lengths of g) and place them independently uniformly at random along the branches of the timed genealogy. Y1,Y2 and T are constructed as in Section 3.1.

6.1. Average runtime

We consider varying sample sizes n∈5,10,15,20,25,30, 10 simulated data sets per each n, and 100 genealogies per data set. All data sets are simulated under constant population size, and μ is set to have an expected number of mutations of n/2. Since the method of Palacios et al. (2019) does not support heterochronous data, we assumed s=0. We compute PY∣g,Ne,μ with the two algorithms for all simulations. Figure 6 plots the average runtimes in seconds, showing that our proposal substantially reduces the average runtime in this specific setup.

Figure 6: Average runtime (in seconds).

Figure 6:

The likelihood PY∣g,Ne,μ is computed using two algorithms, the one in Palacios et al. (2019) (dashed line) and our proposal. The average is based on 100 genealogies sampled for 10 simulated datasets for each sample size n∈(5,10,15,20,25,30).

6.2. Inference of Ne

We simulate genealogies with three population scenarios: a bottleneck (“bottle”), an instantaneous drop (“drop”), and two periods of constant population size with exponential growth in between (“exp”). For each scenario, we generated genealogies with three numbers of leaves (n=14,35,70) and different n,s, as summarized in Table S1 in the SM Section 7. The mutation parameter is varied to analyze the effect of the number of segregating sites on the quality of the estimation, but in this section it is assumed to be known. A simulation study dealing with unknown μ (i.e., joint estimation of Ne and μ) is given in SM S12. Details of the trajectories and of n,s, employed are given in SM Section 7. All functions required to simulate genealogies, sequence data and estimate Ne are implemented in the R package <monospace>phylodyn</monospace>. Likelihood calculation is implemented in Python and called via the R package <monospace>reticulate</monospace> (Ushey et al., 2022). MCMC tuning parameters are discussed in SM Section S7 and the validity of the algorithms’ implementation is discussed in SM Section 8.

Comparison to other methods.

To our knowledge, there is no publicly available software implementing Bayesian nonparametric inference for Ne under the ISM and variable population size. To test the performance of our model, we implemented a function for computing the likelihood of Kingman’s genealogies for labeled data (we compare the runtimes of this implementation to Tajima in the SM, see Figure S7). For posterior approximation via MCMC, we used the Markovian proposal on the space of ranked labeled topologies of Markovtsova et al. (2000) (the Tajima proposal has the same rationale but acts on the space of ranked unlabeled topologies). The kernels used to update t and log(Ne) are shared between the two implementations. Similarly, we employ the same initialization, removing the labels for Tajima’s chain. We also compare our results to an oracle estimator that infers Ne from the true g. The oracle estimation is obtained using the method of Palacios and Minin (2012), which is equivalent to model (4) removing the randomness on g and t. Estimation of Ne in the oracle does not use MCMC but INLA (Rue et al., 2009). A comparison with two other methodologies implemented in BEAST (Drummond et al., 2012) is in SM section 9. We do not include the results in the main manuscript because these methodologies assume a different mutation model, a different prior on Ne, and a different MCMC scheme. The comparisons with BEAST should be interpreted as validity checks of our implementations and a baseline attainable by state-of-the-art implementations.

Criteria measured.

We approximated the posterior distributions under Kingman and Tajima models via MCMC past convergence for a fixed time budget (72 hours). We evaluated trace plots and effective sample sizes (ESS) of t and of log(Ne) as empirical assessments of convergence (SM Section S8). In a second study described in SM section 10, we run MCMC past convergence for one million iterations with a larger burn-in, given there are no time constraints. See SM Section S7 for details. There are several limitations that hinder a thorough comparison of empirical mixing among different modeling resolutions. These limitations arise from targeting different posterior distributions, with different initializations and the absence of precise criteria for assessing the achievement of stationarity.

To assess the accuracy in Ne estimate, we employ three criteria. As a measure of bias, we use the sum of relative errors SRE=∑i=1k|N^e(vi)−Ne(vi)|Ne(vi), where v1,…,vk is a regular grid of k time points, Nˆevi is the posterior median of Ne at time vi and Nevi is the value of the true trajectory at time vi. To quantify the uncertainty in the estimate, the second criterion is the mean relative width, defined by MRW=1k∑i=1k|N^97.5(vi)−N^2.5(vi)|N(vi), where Nˆ97.5vi and Nˆ2.5vi are respectively the 97.5% and 2.5% quantiles of the posterior distribution of Nvi. Lastly, we consider the envelope measure defined by ENV=1k∑i=1k1{N^2.5(vi)≤Ne(vi)≤N^97.5(vi)}, which measures the proportion of the curve that is covered by the 95% credible region; i.e., it is a proxy for coverage. We stress that the three metrics are relevant measures of performance as long as they are considered jointly. For example, one can obtain very high coverage (ENV) with wide credible regions (high MRW) but have wildly inaccurate point estimates (SRE). Similarly, narrow credible regions benefit an estimator only if the estimates remain accurate. In this simulation study we fix k=100,v1=0 and vk=0.6t2.

Another common parameter estimated in coalescent inference is the time to most common ancestor (TMRCA), which corresponds to the largest coalescent time. We compare inferred TMRCAs via Tajima and Kingman in the SM Section S13.

Results.

Table S2 in SM section S8 summarizes the mean ESS for the 9 simulated data sets achieved with Tajima and Kingman. The high ESSs suggest convergence of the MCs. This is confirmed by the visual inspections of the trace plots (SM Section S8). Tajima has the highest ESS for logNe in 5 out of 9 instances, Kingman in 3, and there is one tie. In 6 out of 9 instances, Tajima has the highest ESS for t, Kingman in 2, and there is one tie. According to this metric, the Tajima chain appears to be more efficient, at least in the sense of achieving stationarity quicker. The results obtained for a fixed number of iterations suggest a more even performance (Tables S4 and S5 in SM section 10). A possible explanation for this result is offered by the larger burn-in used for the second study, suggesting that, in the stationary regime, the two chains have a comparable performance. However, we invite caution given the limitations already discussed and the fact that ESS is only a proxy for convergence.

With regards to Ne estimation, the results of the nine curves estimated with our method are plotted in Figure 7. The SM section 9 includes the plots for Kingman (Figure S9) and the BEAST-based methodologies (Figure S8). True trajectories are depicted as dashed lines, posterior medians as black lines, and 95% credible regions as gray shaded areas. Note that the y axis is logarithmic. Table 1 summarizes SRE, MRW, ENV, and the mean ESS for the 9 simulated data sets achieved with Tajima, Kingman, and “Oracle” for the fixed computational budget runs in all three scenarios.

Figure 7: Simulation: effective population size posterior medians from different trajectories and sample sizes for the Tajima-based model.

Figure 7:

Ne posterior distribution from simulated data with three population size trajectories (rows) - bottleneck (Bottle), exponential growth (Exp) and instantaneous fall (Drop) - different sample sizes (columns) - n=14,n=35 and n=70. Posterior medians are depicted as solid black lines and 95% Bayesian credible intervals are depicted by shaded areas. Dotted lines depict the ground truth. n and s are depicted by the heat maps at the bottom of each panel: the squares along the time axis indicate the sampling time, while the intensity of the black color depicts the number of samples. The y-axis is in logarithmic scale.

Table 1: Simulation: performance comparison between Tajima, Kingman and Oracle models.

Envelope (ENV), sum of relative errors (SRE), and mean relative width (MRW) for three population trajectories (Bottle, Exp, Drop) and three sample sizes (n = 14,35,70). Tajima (our model), Kingman (Kingman n-coalescent), Oracle (Palacios and Minin, 2012) (known g). Bold depicts the method with the best performance (excluding the “oracle”) or within 10% of the best performance. The MCMC was run until convergence.

% ENV SRE MRW
Label n Oracle Tajima Kingman Oracle Tajima Kingman Oracle Tajima Kingman
Bottle 14 100 100 100 408.11 175.66 123 20164.85 2298.28 6241.1
35 99 96 96 155.81 148.33 78.81 203.52 1385.86 148.73
70 98 88 82 121.34 124.55 98.84 23.33 22.8 17.12
Drop 14 100 100 100 28.78 36.47 38.21 10.54 8.8 6.24
35 99 96 93 21.27 31.73 67.69 2.96 6.02 24.78
70 99 92 98 17.1 29.09 34.41 2.13 3.66 4.86
Exp 14 100 100 100 35.94 50.91 53.48 16.56 19.33 1163.38
35 100 100 100 35.58 112.5 114.42 11.41 116.97 148.147
70 100 100 100 30.71 43.16 37.31 3.64 3.97 2.75

The patterns are as predicted. As n increases, posterior medians track the true trajectories more closely. It is well known in the literature that abrupt population size changes are the most difficult to recover. The “drop” and “bottleneck” scenarios are less accurate for n=14, as exhibited by the wider credible region. We recover the bottleneck (panel first row and first column), but we do not recover the instantaneous drop (panel first row and third column).

Table 1 quantifies the analysis of Figure 7. First, no method unequivocally outperforms the others. All methods have identical performance for the ENV metric, with the ENV metric decreasing as n increases in some cases and with both models. This is due to the fact that credible regions become much narrower, as indicated by MRW. With respect to SRE and MRW, our method has a superior performance in the “drop” and “exp” scenarios, while Kingman-based inference is superior in the “Bottle” scenario. We note that the Tajima methodology is the one that more closely tracks the “Oracle” results (in eight out of nine cases, Tajima has the closest SRE and MRW to the Oracle). We consider this a positive feature given that “Oracle” posterior does not account for the uncertainty in g and could be interpreted as a benchmark performance. Surprisingly, both Tajima and Kingman outperform the “Oracle” methodology in certain examples. Finally, in general as pointed out in Palacios et al. (2019), Cappello and Palacios (2020), and SM Section 6, we would expect Tajima to outperform Kingman in regimes with low mutation rate. In our simulations, Tajima outperforms Kingman in the scenarios with the smallest number of observed mutations (Drop and Exp).

7. North American Bison data

In this section, we study the long-standing question of whether the population decline of steppe Berigian bison was instigated by human intervention (the overkill hypothesis; Martin (1973)) or by environmental changes. Using ancient DNA bison sequences, Shapiro et al. (2004) estimated the start of the population decline to be between 32 to 43 thousand year ago (kya). At the time of the study, the prevailing consensus was that human entered the Americas about 13 kya (“Clovis-first” model, Meltzer (2015)). Based on the “Clovis-first” model, Shapiro et al. (2004) suggested that their estimate supported the environmental hypothesis, given that there was not a sufficiently large human population that could have caused the decline. In particular, they hypothesize that the decline may be due to abnormal environmental events preceding the last glacial maxima (LGM), which happened between 25 and 19 kya (Clark et al., 2009). There has been mounting evidence supporting a migration to the Americas preceding that leading to the Clovis population. Latest data show that humans were probably present already before and during the LGM, even if the major expansion happened after the LGM (Becerra-Valdivia and Higham, 2020). The authors suggest that studies confuting the human-driven extinction hypothesis should be thus revisited.

In light of the new discoveries, we deem relevant to reproduce Shapiro et al. (2004) analysis with new bison data recently presented by Froese et al. (2017). Our aim is to assess whether the timing of start of the decline is confirmed by this new data. To our knowledge, there is no phylodynamics analysis of this data set in the literature. The data differs from that of Shapiro et al. (2004): Shapiro et al. (2004) sequences include 602 base pairs from the mitochondrial control region, while Froese et al. (2017) provide the full mitochondrial genome (16322 base pairs after alignment). We analyzed 38 sequences (10 modern, 28 ancient). Details on the data set and models used are given in the SM S14

Figure 8 depicts the posterior medians (solid lines) of Ne along with the 95% credible bands (dashed lines) obtained from posterior samples by sampling Tajima’s trees (Tajima, blue colored lines) and Kingman’s trees (GMRF, red colored lines). Both, our method and GMRF, recover the pattern reconstructed by Shapiro et al. (2004): a population expansion followed by a decline. The population decline recovered by GMRF is somewhat sharper than that with Tajima. The two estimates of population expansions are roughly identical, and the credible bands practically overlap. The two methods’ estimates of the population decline are essentially identical: GMRF median time estimate is 29.6 kya, while the median time estimate for our method is 29.7 kya. The estimates obtained analyzing the 2017 data differ substantially from those obtained by analyzing the 2004 data (32 to 43 kya).

Figure 8: Bison in North America: posterior median estimates from Froese et al. (2017) data set.

Figure 8:

Solid lines display estimated posterior medians of Ne obtained from n=38 ancient and modern sequences from North America specimens in Froese et al. (2017) data. Blue depicts our method, and red GMRF. The 95% Bayesian credible region boundaries are depicted by dashed lines. Annotations refer to events of interest commented in the text. Purple shaded area annotations are in the upper part of the panel. The y-axis is in logarithmic scale.

The estimates are also closer to the LGM and recent proofs of human presence in Eastern Beringia (Bluefish Caves, 24 kya, Bourgeon et al. (2017)), and the whole Northern and Central America (Ardelean et al., 2020; Bennett et al., 2021). Our results support the Becerra-Valdivia and Higham (2020) call to revisit the question of whether humans have contributed to the extinction of certain animal species, like the steppe Beringian bison. We note that Shapiro et al. (2004) discussed the possibility of human presence before the LGM. At the time of their work, there was an active debate on the date of molecular specimens in the Bluefish Caves. What remains an open question is understanding the number of humans living in the Americas before the LGM.

8. Discussion

We have studied an alternative to the Kingman n-coalescent to infer the population size trajectory from serially sampled sequences collected at non-recombining loci. We develop a new efficient algorithm to compute the likelihood of partially labeled ranked trees, and discuss the advantages of using the proposed lower-resolution coalescent process.

Despite the evidence presented, our simulations did not produce irrefutable proof of the advantages of employing such coarsening in terms of faster MCMC convergence. One of the challenges is the fairly comparison of the chains with two different target distributions, πg,Ne∣Y,μ and πgK,Ne∣Ylab,μ. Nevertheless, our goal is not to show the superiority due to faster mixing MC (we tried to design the two proposals as similar as possible), but rather due to some intrinsic properties of the coarsened state space. We showed that in regimes of low mutation rate and large sample size, we tend to perform better. We expect evidence of further gains in simulations with larger sample sizes. Our current implementation in R does not handle sample sizes larger than a couple of hundred sequences and further work needs to be done to optimize current implementation. Further, we impose some limiting assumptions. Accommodating departure from the ISM model and modeling recombination are priority for future work.

Supplementary Material

Supp 1

Acknowledgments

The authors gratefully acknowledge partial funding from the France-Stanford Center for Interdisciplinary Studies. JAP acknowledges support from NSF Career award 2143242 and the Alfred P. Sloan Foundation. AV acknowledges partial funding from the chaire program Mathematical Modeling and Biodiversity (Ecole polytechnique, Museum National d’Histoire Naturelle, Veolia Environment, Foundation X).

References

  1. Ardelean CF, Becerra-Valdivia L, Pedersen MW, Schwenninger J-L, Oviatt CG, Macías-Quintero JI, Arroyo-Cabrales J, Sikora M, Ocampo-Díaz YZE, Rubio-Cisneros II et al. (2020), ‘Evidence of human occupation in Mexico around the last glacial maximum’, Nature 584(7819), 87–92. [DOI] [PubMed] [Google Scholar]
  2. Becerra-Valdivia L and Higham T (2020), ‘The timing and effect of the earliest human arrivals in North America’, Nature 584(7819), 93–97. [DOI] [PubMed] [Google Scholar]
  3. Bennett MR, Bustos D, Pigati JS, Springer KB, Urban TM, Holliday VT, Reynolds SC, Budka M, Honke JS, Hudson AM et al. (2021), ‘Evidence of humans in North America during the last glacial maximum’, Science 373(6562), 1528–1531. [DOI] [PubMed] [Google Scholar]
  4. Bouchard-Côté A, Sankararaman S and Jordan MI (2012), ‘Phylogenetic inference via sequential Monte Carlo’, Systematic Biology 61(4), 579–593. [DOI] [PMC free article] [PubMed] [Google Scholar]
  5. Bourgeon L, Burke A and Higham T (2017), ‘Earliest human presence in North America dated to the last glacial maximum: new radiocarbon dates from Bluefish Caves, Canada’, Plos one 12(1), e0169486. [DOI] [PMC free article] [PubMed] [Google Scholar]
  6. Cappello L, Kim J, Liu S and Palacios JA (2022), ‘Statistical challenges in tracking the evolution of SARS-CoV-2’, Statistical Science 37(2), 162–182. [DOI] [PMC free article] [PubMed] [Google Scholar]
  7. Cappello L and Palacios JA (2020), ‘Sequential importance sampling for multi-resolution Kingman-Tajima coalescent counting’, Annals of Applied Statistics 14(2). [DOI] [PMC free article] [PubMed] [Google Scholar]
  8. Clark PU, Dyke AS, Shakun JD, Carlson AE, Clark J, Wohlfarth B, Mitrovica JX, Hostetler SW and McCabe AM (2009), ‘The last glacial maximum’, Science 325(5941), 710–714. [DOI] [PubMed] [Google Scholar]
  9. Dinh V, Bilge A, Zhang C and Matsen IV FA (2017), ‘Probabilistic path Hamiltonian Monte Carlo’, International Conference on Machine Learning pp. 1009–1018. [Google Scholar]
  10. Dinh V, Darling AE and Matsen IV FA (2017), ‘Online Bayesian phylogenetic inference: theoretical foundations via sequential Monte Carlo’, Systematic Biology 67(3), 503–517. [DOI] [PMC free article] [PubMed] [Google Scholar]
  11. Disanto F and Wiehe T (2013), ‘Exact enumeration of cherries and pitchforks in ranked trees under the coalescent model’, Mathematical biosciences 242(2), 195–200. [DOI] [PubMed] [Google Scholar]
  12. Drummond AJ, Nicholls GK, Rodrigo AG and Solomon W (2002), ‘Estimating mutation parameters, population history and genealogy simultaneously from temporally spaced sequence data’, Genetics 161(3), 1307–1320. [DOI] [PMC free article] [PubMed] [Google Scholar]
  13. Drummond A, Suchard M, Xie D and Rambaut A (2012), ‘Bayesian phylogenetics with BEAUti and the BEAST 1.7’, Molecular Biology and Evolution 29(8), 1969–1973. [DOI] [PMC free article] [PubMed] [Google Scholar]
  14. Faulkner JR, Magee AF, Shapiro B and Minin VN (2020), ‘Horseshoe-based Bayesian nonparametric estimation of effective population size trajectories’, Biometrics 76(3), 677–690. [DOI] [PubMed] [Google Scholar]
  15. Fourment M, Claywell BC, Dinh V, McCoy C, Matsen IV FA and Darling AE (2017), ‘Effective online Bayesian phylogenetics via sequential Monte Carlo with guided proposals’, Systematic Biology 67(3), 490–502. [DOI] [PMC free article] [PubMed] [Google Scholar]
  16. Froese D, Stiller M, Heintzman PD, Reyes AV, Zazula GD, Soares AE, Meyer M, Hall E, Jensen BJ, Arnold LJ et al. (2017), ‘Fossil and genomic evidence constrains the timing of bison arrival in North America’, Proceedings of the National Academy of Sciences 114(13), 3457–3462. [DOI] [PMC free article] [PubMed] [Google Scholar]
  17. Griffiths RC and Tavare S (1994), ‘Sampling theory for neutral alleles in a varying environment’, Philosophical Transactions of the Royal Society of London. Series B: Biological Sciences 344(1310), 403–410. [DOI] [PubMed] [Google Scholar]
  18. Griffiths R and Tavaré S (1995), ‘Unrooted genealogical tree probabilities in the infinitely-many-sites model’, Mathematical Biosciences 127(1), 77–98. [DOI] [PubMed] [Google Scholar]
  19. Gusfield D (1991), ‘Efficient algorithms for inferring evolutionary trees’, Networks 21(1), 19–28. [Google Scholar]
  20. Ho SY and Shapiro B (2011), ‘Skyline-plot methods for estimating demographic history from nucleotide sequences’, Molecular ecology resources 11(3), 423–434. [DOI] [PubMed] [Google Scholar]
  21. Kimura M (1969), ‘The number of heterozygous nucleotide sites maintained in a finite population due to steady flux of mutations’, Genetics 61(4), 893. [DOI] [PMC free article] [PubMed] [Google Scholar]
  22. Kingman JF (1982a), ‘On the genealogy of large populations’, Journal of Applied Probability 19(A), 27–43. [Google Scholar]
  23. Kingman JFC (1982b), ‘The coalescent’, Stochastic Processes and their Applications 13(3), 235–248. [Google Scholar]
  24. Lan S, Palacios JA, Karcher M, Minin VN and Shahbaba B (2015), ‘An efficient Bayesian inference framework for coalescent-based nonparametric phylodynamics’, Bioinformatics 31(20), 3282–3289. [DOI] [PMC free article] [PubMed] [Google Scholar]
  25. Markovtsova L, Marjoram P and Tavaré S (2000), ‘The age of a unique event polymorphism’, Genetics 156(1), 401–409. [DOI] [PMC free article] [PubMed] [Google Scholar]
  26. Martin PS (1973), ‘The discovery of America: The first Americans may have swept the western hemisphere and decimated its fauna within 1000 years.’, Science 179(4077), 969–974. [DOI] [PubMed] [Google Scholar]
  27. Meltzer DJ (2015), The great paleolithic war, in ‘The Great Paleolithic War’, University of Chicago Press. [Google Scholar]
  28. Palacios JA and Minin VN (2012), Integrated nested Laplace approximation for Bayesian nonparametric phylodynamics, in ‘Proceedings of the Twenty-Eighth Conference on Uncertainty in Artificial Intelligence’, UAI’12, AUAI Press, Arlington, Virginia, United States, pp. 726–735. [Google Scholar]
  29. Palacios JA and Minin VN (2013), ‘Gaussian process-based Bayesian nonparametric inference of population size trajectories from gene genealogies’, Biometrics 69(1), 8–18. [DOI] [PubMed] [Google Scholar]
  30. Palacios JA, Véber A, Cappello L, Wang Z, Wakeley J and Ramachandran S (2019), ‘Bayesian estimation of population size changes by sampling Tajima’s trees’, Genetics 213(2), 967–986. [DOI] [PMC free article] [PubMed] [Google Scholar]
  31. Parag KV and Pybus OG (2019), ‘Robust design for coalescent model inference’, Systematic biology 68(5), 730–743. [DOI] [PubMed] [Google Scholar]
  32. Rodrigo AG, Ewing G and Drummond A (2007), The evolutionary analysis of measurably evolving population using serially sampled gene sequences, in Gascuel O and Steel M, eds, ‘Reconstructing evolution: new mathematical and computational advances’, Oxford University Press, pp. 233–272. [Google Scholar]
  33. Rodrigo AG and Felsenstein J (1999), Coalescent approaches to HIV population genetics, in ‘The Evolution of HIV’, Johns Hopkins University Press, pp. 233–272. [Google Scholar]
  34. Rue H, Martino S and Chopin N (2009), ‘Approximate Bayesian inference for latent Gaussian models by using integrated nested Laplace approximations’, Journal of the royal statistical society: Series b (statistical methodology) 71(2), 319–392. [Google Scholar]
  35. Sainudiin R, Stadler T and Véber A (2015), ‘Finding the best resolution for the Kingman–Tajima coalescent: theory and applications’, Journal of Mathematical Biology 70(6), 1207–1247. [DOI] [PubMed] [Google Scholar]
  36. Sanderson MJ, McMahon MM, Stamatakis A, Zwickl DJ and Steel M (2015), ‘Impacts of terraces on phylogenetic inference’, Systematic biology 64(5), 709–726. [DOI] [PubMed] [Google Scholar]
  37. Shahbaba B, Lan S, Johnson WO and Neal RM (2014), ‘Split Hamiltonian Monte Carlo’, Statistics and Computing 24(3), 339–349. [Google Scholar]
  38. Shapiro B, Drummond AJ, Rambaut A, Wilson MC, Matheus PE, Sher AV, Pybus OG, Gilbert MTP, Barnes I, Binladen J et al. (2004), ‘Rise and fall of the Beringian steppe bison’, Science 306(5701), 1561–1565. [DOI] [PubMed] [Google Scholar]
  39. Simper M and Palacios JA (2022), ‘An adjacent-swap markov chain on coalescent trees’, Journal of Applied Probability 59(4), 1243–1260. [Google Scholar]
  40. Speidel L, Forest M, Shi S and Myers SR (2019), ‘A method for genome-wide genealogy estimation for thousands of samples’, Nature Genetics 51(9), 1321–1329. [DOI] [PMC free article] [PubMed] [Google Scholar]
  41. Tajima F. (1983), ‘Evolutionary relationship of dna sequences in finite populations’, Genetics 105(2), 437–460. [DOI] [PMC free article] [PubMed] [Google Scholar]
  42. Ushey K, Allaire J and Tang Y (2022), reticulate: Interface to ‘Python’. https://rstudio.github.io/reticulate/, https://github.com/rstudio/reticulate.
  43. Volz EM, Koelle K and Bedford T (2013), ‘Viral phylodynamics’, PLoS computational biology 9(3), e1002947. [DOI] [PMC free article] [PubMed] [Google Scholar]
  44. Wang L, Bouchard-Côté A and Doucet A (2015), ‘Bayesian phylogenetic inference using a combinatorial sequential Monte Carlo method’, Journal of the American Statistical Association 110(512), 1362–1374. [Google Scholar]
  45. 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]
  46. Zhang C and Matsen IV FA (2018), Variational Bayesian phylogenetic inference, in ‘International Conference on Learning Representations’. [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Supp 1

RESOURCES