Introduction

The two main reasons for wanting to simulate genetic data are, first, to gain insight into the effects that underlying demographic and mutational parameters may have on the genetic data one sees, and, secondly, to create test datasets for assessing the power of alternative genetic analysis methods. Ways of tackling the first goal range from informal approaches, which aim at getting a 'feel' for how altering different parameters affects the output data, to more formal methods based on matching many simulated datasets to an observed dataset (eg approximate Bayesian computation [1]). To tackle the second goal (and particularly for genetic epidemiology methods), an additional 'ascertainment' modelling element is often required to allow the simulation of disease-affecting loci within the context of a given study design (such as a case-control study).

The key challenges that all simulation algorithms face are: (1) speed -- typically one wants to do lots of simulations, so they need to be fast; (2) scalability -- with the advent of genome-wide genotyping and large-scale sequencing, there is a need for simulation programs to match; and (3) flexibility -- can the program cope with different demographic histories, population structure, recombination, selection, mutation models and disease models?

There are three main approaches to dealing with these challenges, here termed 'backwards', 'forwards' and 'sideways'. 'Backwards' (or coalescent) simulations start with the sample of individuals that will form your simulated dataset, then work backwards in time to construct the ancestral tree or graph of genealogical relationships that connects them all. Neutral mutations can subsequently be placed on this structure to create the simulated dataset. The simulation algorithm does not actually have to work backwards in time to achieve this, but this is a technical detail. The important point is that by restricting attention just to the genealogical structure relevant to the sample in question, a large computational saving is generally achieved relative to the 'forwards-in-time' approach. Still greater efficiency is afforded by the classic coalescent approach, which employs a continuous-time approximation to effectively skip over the intermediate generations between important tree-generating events. 'Forwards' simulations start with the entire population of individuals -- typically, many thousands -- and then follow how all the genetic data in question are passed on from one generation to the next. One usually needs to simulate over many thousands of generations in order to arrive at an equilibrium in which the genetic characteristics of the population are independent of the original starting conditions. Finally, 'sideways' simulations start with a collection of real present-day genetic data, and use these as a template for generating new simulated data with similar properties. 'Sideways' algorithms can also be coalescent-based (and thus fit into both 'backwards' and 'sideways' categories) but some adopt simpler resampling strategies that do not explicitly consider changes over generational time in either direction.

Backwards simulators

Table 1 lists all programs that the authors were able to source via PubMed and other internet-based searches. A list maintained by Heng Li [35] was also helpful. Backwards (coalescent) approaches formthe largest part of Table 1, reflecting the inherent attractiveness and computational efficiency of simulating just that part of the genealogy needed to produce the data in the simulated sample. Richard Hudson's ms program [8]remains one of the most popular for straightforward problems. msHOT, [9] SNPsim [17] and COSI [3] extend the algorithm to allow variable recombination rates along the DNA sequence, and msHOT, COSI, CoaSim [2] and newgenecoal [10] also allow (allelic) gene conversion in addition to crossovers as recombination events. SIMCOAL [15] introduces complex demographic models, SIMCOAL2 extends this to variable recombination, Serial SIMCOAL [14] allows sampling at multiple time points and MODELER4SIMCOAL [36, 37] provides a handy graphical user interface. SelSim [13] implements a single-locus selection model. Flexible, but not necessarily easy to implement, coalescent simulators are provided by CoaSim, [2]mlcoalsim, [7]SARG [12] and GeneArtisan [5].

For neutral loci, the tree or graph-generating step can be conveniently decoupled from the mutation-generating step, and the latter can be run via a separate program such as Andy Rambaut's SeqGen program [38] to produce a wide range of different types of genetic data from a range of different mutational models. It is also possible to decouple the sampling ascertainment process (eg to get case-control data) by applying this as an additional step to unascertained simulated data. Currently, however, there are no easy ways of doing this, as additional user coding would be needed to adapt the sampling algorithms available in, for example, CoaSim,[2]SimuPOP[2830] or FREGENE[23]. Furthermore, there are as yet no completely flexible ascertainment options that would allow, for example, simulation of cases from models with more than one partially linked disease locus, or from more general causal models that have incorporated additional covariates.

Conventional coalescent algorithms break down for very large DNA regions such as whole chromosomes. This is because recombination gives rise to complex ancestral recombination graphs (ARGs) rather than simple binary genealogical trees, and more recombination leads to ever larger and more complex ARGs. The FastCoal[4] and GENOME[6] simulators employ approximations to the real coalescent-with-recombination that lead to simpler ARGs and thence to feasible genome-wide simulations. MaCs, a recent update to FastCoal which uses an improved approximation to the coalescent-with-recombination, is available on request from Jeff Wall (wallj@humgen.ucsf.edu). FastCoal is reported to be able to generate 2,000 50-megabase (Mb) diploid samples in two minutes on a standard workstation, and GENOME to generate 600 150 Mb diploid samples in 66 minutes.

Forwards simulators

Forwards-in-time simulators are more naturally capable of coping with complex modelling scenarios, at the expense of decreased computational efficiency. Of these, the FREGENE [23] and GenomePop [24] programs make the biggest effort at maintaining speed, and, of these, only FREGENE allows for ascertained disease-gene sampling. A useful scaling option in both programs allows one to simulate a smaller population over a smaller number of generations and then use these results to approximate a larger population over more generations. Unfortunately, only diallelic SNP data can be simulated fast enough to cover large genomic regions. At smaller genomic scales, more complex nucleotide and codon models can be simulated by GenomePop, while copy number variation (CNV) and microsatellite data can be simulated by simuPOP [2830] and Nemo [27]. GenomeSIM [25] claims to be able to generate genome-wide SNP data by forwards simulation, but only achieves this by simulating over a very limited ten or so generations, far fewer than that needed to achieve proper genetic equilibrium. Indeed, FREGENE and GenomePop could also generate genome-wide datasets in this way, and presumably could do so with greater computational efficiency.

Table 1 List of population genetic simulation software

Sideways simulators

Sideways simulators can, to some extent, side-step the whole issue of model complexity by relying on real data 'as is' to guide the simulation process. Simple bootstrap resampling breaks down for longer regions because the genetic diversity seen in the reference sample (usually the 270 individuals in HapMap) is not adequate to capture the full diversity among all humans. The situation will improve with the '1,000 genomes' project,[39] and also with the steady increase in publically available genome-wide SNP data, but it still seems sensible to apply an additional method to perturb the simulated data away from the narrow range seen in the real data. Dudbridge [40] proposed forming random diploid chromosomes from phased HapMap data followed by a single round of artificial meiosis, governed by empirical recombination rates also estimated from HapMap. This idea has been put to use in the HAP-SAMPLE software,[34] with an additional option to boost the baseline recombination rate (x100 recommended) to reduce long-range linkage disequilibrium. Durrant et al. [41] proposed an alternative idea based on sliding windows for introducing new variations into simulated data. This method has been implemented in the GWA simulator software,[32] and an improved extension to this idea, which allows a variable sliding window size, has been implemented in the gs software [31]. Jonathan Marchini's hapgen software,[33] based on the same underlying principles as his genotype imputation software impute, applies an approximation to the coalescent-with-recombination to generate new simulated data from existing phased HapMap data, but is slower than the other two sideways simulators. HAP-SAMPLE is reported to be able to generate 2,000 samples of a 100,000 genome-wide SNP chip in a few minutes on a standard workstation, and gs to generate 2,000 samples of chromosome 6 (36,000 SNPs) in 140 minutes.

Conclusions

In summary, no one program is capable of doing everything, but there exist some useful applications from all three main simulation approaches. For genome-wide SNP data, the main contenders are FastCoal,[4]GENOME,[6]HAP-SAMPLE [34] and gs [31]. For high model flexibility and sampling ascertainment at the 10 Mb scale or less (not whole-genome but still enough for many purposes), FREGENE [23] is recommended. Simulation of copy number variation and/or microsatellite data at larger genomic scales, and of more complex disease models allowing covariates and linked loci, remain areas for future program development.