Abstract

Summary: The program COMPASS can generate samples that have been collected at various points in time from a population that is evolving according to a Wright–Fisher model. The samples are generated using coalescence simulations permitting various demographic scenarios and the program uses an infinite sites model to generate polymorphism data for the samples. By generating serially sampled population-genetic data, COMPASS allows investigating properties of polymorphism data that has been collected at different time points, and aid in making inference from ancient polymorphism data.

Availability: The program and the manual are available at: http://www.egs.uu.se/evbiol/Research/JakobssonLab/compass.html

Contact:mattias.jakobsson@ebc.uu.se

1 INTRODUCTION

Ancient DNA (aDNA) can be useful to detect and date demographic events in the history of populations and species (see e.g. Hofreiter, 2008; Willerslev and Cooper, 2005). The number of aDNA studies have increased over the last few years and spectacular data have been generated from Neanderthals, cave bear and Mammoth (Miller et al., 2008; Noonan et al., 2005, Noonan et al., 2006).

Rodrigo and Felsenstein (1999) extend the standard coalescent model by considering serially sampled gene copies. The idea of serial samples has been exploited in the BEAST software (Drummond et al., 2002) to estimate demographic parameters of populations or species using data from multiple time points. A software that simulates data from serial samples is Serial SimCoal by Anderson et al. (2005). These two softwares have different primary aims—estimation of demographic parameters and simulating data—and both programs have different limitations and strengths (Anderson et al., 2005). However, neither of these two programs use an infinite sites model (Kimura, 1969), and in many circumstances the infinite sites model may be appropriate and/or more straightforward to use. For example, the infinite sites model is appropriate when simulating or analyzing population–genetic SNP data, and aDNA studies focusing on SNPs have increased in popularity in the last few years (Burger et al., 2007; Ludwig et al., 2009; Svensson et al., 2007). Regardless of model details, simulations of serially sampled data can provide means for exploring properties of population–genetic data sampled at multiple time points. Simulations may also be used as part of analysis frameworks, such as an approximate Bayesian computation approach (see e.g. Beaumont et al., 2002).

2 METHODS

The program COMPASS generates samples and polymorphism data assuming an infinite sites model, under a coalescent model allowing serially sampled gene copies and permitting various demographic scenarios. COMPASS can generate many independent replicate samples under various assumptions about sample times, population sizes and population size changes. The samples are generated using standard coalescent approaches where the random genealogy of the sample is first generated, followed by randomly ‘dropping’ mutations to the genealogy (Hudson, 1990; Kingman, 1982; Nordborg, 2001). An infinite sites model (Kimura, 1969) is assumed so that every mutation gives rise to a new variable site. To allow serial samples, the basic genealogy-generating algorithm has been modified to allow lineages sampled in the past to be incorporated when the sample times are passed (backwards in time). To simulate five replicate samples from two time points (six chromosomes from the present and four chromosomes 4N generations in the past) and for one SNP, we would type:

COMPASS 10 5 −s 1 −h 0.0 6 −h 1.0 4.

The output from COMPASS is very similar to the output from the program ms by Hudson (2002), which will minimize the need to transform output from COMPASS to fit programs and scripts written to handle output from ms, such as the program seq-gen (Rambaut and Grassly, 1997) that can generate sequence data under different mutation models. Briefly, the output of COMPASS consists of the command-line arguments, the random number generator's seed and the simulated data (one chromosome per line and one site per column) for each replicate sample. COMPASS is a command-line program, easily run using batch scripts, and parameter values can be specified for each replicate run using the ‘tbs’ option. Other demographic scenarios and output options are available, for which additional command-line arguments are needed. The COMPASS manual describes these options. The program is written in C++, and precompiled executables for UNIX/Linux, Windows and Mac are available for download.

3 AN EXAMPLE OF THREE SAMPLING TIMES

An example will illustrate the generation of population–genetic data from a demographic model where samples have been taken at three different time points. We simulate data (using COMPASS) from a scenario of a population that instantaneously decreased to 1/2 of the ancestral population size (N2) 100 000 years ago, and that started growing 60 000 years ago to reach four times the ancestral population size at present (Fig. 1). Assuming that the population size at present is N0=40 000 and that the generation time is 25 years, the population size at the start of the growth is N1=1/8 × N0 and the ancestral population size is N2=1/4 × N0. The sampling times T0, T1 and T2 corresponds to T0=0 (the present), T1=0.015 × 4N0 and T2=0.025 × 4N0 generations ago. The growth parameter α is given by solving the following equality for α; N=N0e−αT, where N is the population size after T time units of growth, and T is time scaled in units of 4N0. We have α≈138.6. We replicate the simulation 1000 times, where each simulation contains 100 unlinked biallelic markers (e.g. SNPs) for 3 × 20 haploid gene-copies (corresponding to 10 diploid individuals sampled at each time point).

Fig. 1.

A demographic model of a population that at time T2 decreased in size to a half of its ancestral population size (from N2 to N1), and at time T1 started growing exponentially reaching a size at present four times as large as the ancestral size (N0). Three samples were taken from the population, one sample (S0) of 20 gene copies at present (T0), one sample (S1) of 20 gene copies at time T1 and one sample (S2) of 20 gene copies at time T2.

Fig. 1.

A demographic model of a population that at time T2 decreased in size to a half of its ancestral population size (from N2 to N1), and at time T1 started growing exponentially reaching a size at present four times as large as the ancestral size (N0). Three samples were taken from the population, one sample (S0) of 20 gene copies at present (T0), one sample (S1) of 20 gene copies at time T1 and one sample (S2) of 20 gene copies at time T2.

The mean (standard error of the mean, s.e.) heterozygosities in the samples S0, S1 and S2 across 1000 replicates were 0.1692 (0.00059), 0.1631 (0.00060) and 0.1745 (0.00057), respectively, and the mean (s.e.) heterozygosity across all individuals (and across the replicates) was 0.1788 (0.00054). Note that we could have simulated these three scenarios without using a program that generates serial samples, but we would not have been able to compute a meaningful mean heterozygosity for all 60 gene copies (or the FST-values in the next paragraph). The diversities of the samples appear reasonable with respect to the past population sizes, i.e. we expect that the ‘effective population size’ would be largest for sample S2 followed by sample S0 and sample S1.

The level of differentiation for pairs of samples, measured as mean (s.e.) FST across replicates [computed using Equation (5.3) in Weir (1996)], were 0.0469 (0.00056), 0.0736 (0.00071) and 0.1120 (0.00086) for the sample pairs S0S1, S1S2, and S0S2, respectively. Mean (s.e.) FST among all three samples was 0.0788 (0.00054). The level of differentiation among time samples is comparable with moderate spacial differentiation generated by, e.g. an island model. Intuitively, it makes sense that time samples show differentiation—the more scaled time that passes between two sample points, the more lineages from the younger sample will coalesce before joining the older sample—and the sharing of variation between samples decrease with increasing scaled time between the samples.

4 CONCLUSIONS

Several studies point to the importance of using time-serial samples to answer biological questions, including studies focusing on viruses (Reid et al., 2000; Rodrigo and Felsenstein, 1999) and studies of aDNA (Hofreiter, 2008; Miller et al., 2008; Noonan et al., 2006; Willerslev and Cooper, 2005). Using simulations, Depaulis et al. (2009) explored how commonly used population–genetic metrics were affected by serially sampled non-recombining sequence data (mimicking mitochondrial DNA). Depaulis et al. (2009) concluded that serially sampled data can have significant effect on commonly used metrics, potentially leading to erroneous conclusions if one ignores the time dimension of the data.

COMPASS is a flexible simulation tool that can be used to understand properties of time-serial data. The program can also be used for making inferences from time-serial data, for example, approaches that rely on simulations can use COMPASS to generate simulated time-serial population–genetic data. As the technical procedures for extracting and genotyping aDNA are steadily improving (Burger et al., 2007; Ludwig et al., 2009; Miller et al., 2008; Svensson et al., 2007), the challenges, and potential rewards, for analyzing these data will only increase, and COMPASS can be a helpful tool for analyzing these serially sampled data.

ACKNOWLEDGEMENTS

I thank A. Götherström for comments on the manuscript, and E. Svensson and P. Båtelsson for testing the program.

Funding: Swedish Research Council Formas and the Magn Bergvall foundation.

Conflict of Interest: none declared.

REFERENCES

Anderson
C.NK
, et al.  . 
Serial SimCoal: a population genetics model for data from multiple populations and points in time
Bioinformatics
 , 
2005
, vol. 
21
 (pg. 
1733
-
1734
)
Beaumont
MA
, et al.  . 
Approximate Bayesian computation in population genetics
Genetics
 , 
2002
, vol. 
162
 (pg. 
2025
-
2035
)
Burger
J
, et al.  . 
Absence of the lactase-persistence-associated allele in early Neolithic Europeans
Proc. Natl Acad. Sci. USA
 , 
2007
, vol. 
104
 (pg. 
3736
-
3741
)
Depaulis
F
, et al.  . 
Using classical population genetics tools with heterochroneous data: time matters!
PLoS ONE
 , 
2009
, vol. 
4
 pg. 
e5541
 
Drummond
AJ
, et al.  . 
Estimating mutation parameters, population history and genealogy simultaneously from temporally spaced sequence data
Genetics
 , 
2002
, vol. 
161
 (pg. 
1307
-
1320
)
Hofreiter
M
Long DNA sequences and large data sets: investigating the quaternary via ancient dna
Quat. Sci. Rev.
 , 
2008
, vol. 
27
 (pg. 
2586
-
2592
)
Hudson
RR
Gene genealogies and the coalescent process
Oxford Surv. Evol. Biol.
 , 
1990
, vol. 
7
 (pg. 
1
-
44
)
Hudson
RR
Generating samples under a Wright-Fisher neutral model of genetic variation
Bioinformatics
 , 
2002
, vol. 
18
 (pg. 
337
-
338
)
Kimura
M
The number of heterozygous nucleotide sites maintained in a finite population due to steady flux of mutations
Genetics
 , 
1969
, vol. 
61
 (pg. 
893
-
903
)
Kingman
JFC
On the genealogy of large populations
J. Appl. Prob.
 , 
1982
, vol. 
19A
 (pg. 
27
-
43
)
Ludwig
A
, et al.  . 
Coat color variation at the beginning of horse domestication
Science
 , 
2009
, vol. 
324
 pg. 
485
 
Miller
W
, et al.  . 
Sequencing the nuclear genome of the extinct woolly mammoth
Nature
 , 
2008
, vol. 
456
 (pg. 
387
-
390
)
Noonan
JP
, et al.  . 
Paleontology: Genomic sequencing of pleistocene cave bears
Science
 , 
2005
, vol. 
309
 (pg. 
597
-
600
)
Noonan
JP
, et al.  . 
Sequencing and analysis of Neanderthal genomic DNA
Science
 , 
2006
, vol. 
314
 (pg. 
1113
-
1118
)
Nordborg
M
Balding
DJ
, et al.  . 
Coalescent theory, Ch. 7
Handbook of Statistical Genetics
 , 
2001
Chichester
Wiley
(pg. 
179
-
212
)
Rambaut
A
Grassly
NC
Seq-gen: An application for the monte carlo simulation of dna sequence evolution along phylogenetic trees
Comput. Appli. Biosci.
 , 
1997
, vol. 
13
 (pg. 
235
-
238
)
Reid
A
, et al.  . 
Characterization of the 1918 “Spanish” influenza virus neuraminidase gene
Proc. Natl Acad. Sci. USA
 , 
2000
, vol. 
97
 (pg. 
6785
-
6790
)
Rodrigo
AG
Felsenstein
J
Crandall
KA
Coalescent approaches to HIV population genetics
The Evolution of HIV.
 , 
1999
Baltimore
Johns Hopkins University Press
(pg. 
233
-
272
)
Svensson
EM
, et al.  . 
Tracing genetic change over time using nuclear SNPs in ancient and modern cattle
Animal Genet.
 , 
2007
, vol. 
38
 (pg. 
378
-
383
)
Weir
BS
Genetic Data Analysis II.
 , 
1996
Sunderland, MA
Sinauer
Willerslev
E
Cooper
A
Ancient dna
Proc. R. Soc. B Biol. Sci.
 , 
2005
, vol. 
272
 (pg. 
3
-
16
)

Author notes

Associate Editor: Jeffrey Barrett

Comments

0 Comments