Transition Densities and Sample Frequency Spectra of Diffusion Processes with Selection and Variable Population Size

Daniel Živković, Matthias Steinrücken, Yun S. Song, Wolfgang Stephan

Abstract

Advances in empirical population genetics have made apparent the need for models that simultaneously account for selection and demography. To address this need, we here study the Wright-Fisher diffusion under selection and variable effective population size. In the case of genic selection and piecewise-constant effective population sizes, we obtain the transition density function by extending a recently developed method for computing an accurate spectral representation for a constant population size. Utilizing this extension, we show how to compute the sample frequency spectrum (SFS) in the presence of genic selection and an arbitrary number of instantaneous changes in the effective population size. We also develop an alternate, efficient algorithm for computing the SFS using a method of moments. We apply these methods to answer the following questions: If neutrality is incorrectly assumed when there is selection, what effects does it have on demographic parameter estimation? Can the impact of negative selection be observed in populations that undergo strong exponential growth?

Introduction

A central objective in population genetics is to distinguish between the signatures of natural selection and the historical fluctuations in population size, known as demography. Both forces significantly shape the genetic diversity of a population, often in ways that are difficult to disentangle. For instance, both purifying selection (the elimination of deleterious mutations) and recent population expansions result in an excess of rare alleles. Traditionally, researchers have treated these processes separately to maintain mathematical tractability. However, failing to account for selection when inferring demographic history can lead to significant biases. This paper introduces a computationally efficient framework to model both selection and complex demographic histories simultaneously using the Wright-Fisher diffusion.

Methodology

The authors utilize the Wright-Fisher (WF) diffusion process, a continuous-time stochastic model that tracks allele frequency trajectories. To handle variable population sizes, they introduce two primary mathematical advancements:

1. Spectral Representation for Piecewise-Constant Demography

The researchers extended a non-perturbative spectral method to calculate transition densities across multiple "epochs" of different population sizes. By determining the eigenvalues and eigenfunctions of the diffusion generator for a single epoch, they developed a method to "fold" the density from one time period into the next. This allows for the analysis of complex histories involving multiple bottlenecks and expansions. For continuous changes, such as exponential growth, the authors demonstrate that a discretized approximation—treating the growth as a series of small, constant steps—provides high accuracy.

2. Method of Moments for the Sample Frequency Spectrum (SFS)

While transition densities provide a complete description, they are computationally intensive. To facilitate faster inference, the authors developed a method of moments. This approach solves a system of ordinary differential equations (ODEs) to compute the moments of the allele frequency distribution directly. This method is particularly efficient for calculating the Sample Frequency Spectrum (SFS), which represents the distribution of mutant allele counts in a sample and is a standard tool for genomic inference.

Applications and Key Insights

The framework was validated using simulated data, a Drosophila melanogaster dataset from Zimbabwe, and a model of human demographic history.

Selection Mimicry and Demographic Bias

A critical finding is the "selection mimicry" effect. When selection is present but ignored during demographic inference, the model compensates by producing biased estimates. Specifically, researchers are likely to underestimate the ancestral population size and the duration of past bottlenecks. Interestingly, the timing of demographic events (e.g., when a bottleneck ended) remains relatively robust to this bias, whereas the magnitude of size changes is heavily distorted.

Selection in Growing Populations

The study also explores how rapid exponential growth, characteristic of recent human history, alters the signature of selection. In stationary or slowly changing populations, negative selection primarily impacts rare variants. However, in rapidly expanding populations, the signature of selection shifts toward intermediate- and high-frequency variants. This occurs because rapid growth "saturates" the low-frequency classes with new mutations, making the relative impact of selection more visible in higher frequency tiers.

Empirical Validation: Drosophila and Humans

In an analysis of 197 non-coding loci from a Zimbabwe Drosophila population, the authors found little evidence of negative selection. This supports the common practice of using such regions as neutral markers for demographic inference in this species. In the human context, the authors applied their method to the Tennessen et al. (2012) model of African human evolution. They concluded that while recent massive growth creates significant "noise," their method can detect strong negative selection if sample sizes are sufficiently large.

Discussion and Limitations

The methods presented offer a significant speed-up for joint inference, making multi-epoch models feasible for maximum-likelihood estimation. However, several limitations remain. The current implementation is optimized for genic selection (additive fitness effects); while general diploid selection is theoretically possible within the framework, it is more complex to implement. Furthermore, the model assumes sites are unlinked (independent). In reality, linkage disequilibrium and "hitchhiking" effects—where neutral variants are influenced by nearby selected sites—complicate the genetic landscape. Finally, while the spectral method is efficient, very large sample sizes or highly complex histories still pose computational challenges requiring series truncation.

Conclusion

By providing a robust mathematical link between selection and variable population size, this work enables more accurate genomic inferences. The ability to simultaneously estimate selection coefficients and demographic parameters is essential for understanding the evolutionary forces shaping modern biodiversity.

Summary updated

BibTeX
@inproceedings{zivkovic2015transition,
  author = {Daniel Živković and Matthias Steinrücken and Yun S. Song and Wolfgang Stephan},
  title = {{Transition Densities and Sample Frequency Spectra of Diffusion Processes with Selection and Variable Population Size}},
  booktitle = {Genetics},
  year = {2015},
  doi = {10.1534/genetics.115.175265},
}
Figure