Description Usage Arguments Details Value Author(s) References See Also
The population genetics simulation software BottleSim (Kuo and Janzen 2003) uses an unconventional input file format. The function inputBottleSim
creates automatically such input files. After BottleSim simulations are performed, a Genepop file containing genotypes of all replicates (each replicate is labelled as a different 'population') is produced, but alleles are coded in a different manner that makes comparison with the starting real data impossible (for instance, one may be interested in calculating Fst values between simulated populations and the real data). This function converts alleles back to their original sizes. It also allows the user to retain only a random subset of individuals for each replicate. Real and simulated data can subsequently be combined for analysis with the function combineBsim
.
1 | outputBottleSim(datafile, subsample = 0)
|
datafile |
Name of the output file generated by BottleSim (with the extension) containing multilocus genotypes for all simulation replicates. |
subsample |
Number of individuals to retain in each replicate. Individuals are chosen randomly in each replicate. Zero (default value) means all individuals will be kept. |
To use this function, the input file for BottleSim simulations first needs to be created using the function inputBottleSim
. This will also create a file called 'alleles' in which all required information about allele numbers and sizes is stored. Once BottleSim simulations are done and a genotype file is obtained, it is necessary to put the 'alleles' file in the same directory as the BottleSim genotype output file before using this function.
A new Genepop file will be saved in the working directory, with the suffix 'OKAllelesBsim'.
Sebastien Rioux Paquette
Kuo C.H., and F.J.Janzen (2003). BottleSim: a bottleneck simulation program for long-lived species with overlapping generations. Mol. Ecol. Notes 3, 669-673.
Rousset, F. (2008). Genepop'007: a complete reimplementation of the Genepop software for Windows and Linux. Mol. Ecol. Res. 8: 103-106.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.