Forward and backward simulations play an increasing role in population genetics, in particular when inferring the relative importance of evolutionary forces. It is therefore important to develop fast and accurate simulation methods for general population genetics models. Here we present an exact simulation method that generates trajectories of an allele׳s frequency in a finite population, as described by a general Wright-Fisher model. The method generates conditioned trajectories that start from a known frequency at a known time, and which achieve a specific final frequency at a known final time. The simulation method applies irrespective of the smallness of the probability of the transition between the initial and final states, because it is not based on rejection of trajectories. We illustrate the method on several different populations where a Wright-Fisher model (or related) applies, namely (i) a locus with 2 alleles, that is subject to selection and mutation; (ii) a locus with 3 alleles, that is subject to selection; (iii) a locus in a metapopulation consisting of two subpopulations of finite size, that are subject to selection and migration. The simulation method allows the generation of conditioned trajectories that can be used for the purposes of visualisation, the estimation of summary statistics, and the development/testing of new inferential methods. The simulated trajectories provide a very simple approach to estimating quantities that cannot easily be expressed in terms of the transition matrix, and can be applied to finite Markov chains other than the Wright-Fisher model.
Keywords: Conditioned trajectories; Markov chain; Random genetic drift; Stochastic process; Visualisation.
Copyright © 2014 Elsevier Ltd. All rights reserved.