A wrapper function for runMacs
. This wrapper is designed
to provide a more intuitive interface for writing custom commands
in MaCS (Chen et al. 2009)
. It effectively automates the creation
of an appropriate line for the manualCommand argument in runMacs
using user supplied variables, but only allows for a subset of the functionality
offered by this argument. The default arguments of this function were chosen to match
species="GENERIC" in runMacs
.
Arguments
- nInd
number of individuals to simulate
- nChr
number of chromosomes to simulate
- segSites
number of segregating sites to keep per chromosome
- Ne
effective population size
- bp
base pair length of chromosome
- genLen
genetic length of chromosome in Morgans
- mutRate
per base pair mutation rate
- histNe
effective population size in previous generations
- histGen
number of generations ago for effective population sizes given in histNe
- inbred
should founder individuals be inbred
- split
an optional historic population split in terms of generations ago
- ploidy
ploidy level of organism
- returnCommand
should the command passed to manualCommand in
runMacs
be returned. If TRUE, MaCS will not be called and the command is returned instead.- nThreads
if OpenMP is available, this will allow for simulating chromosomes in parallel. If the value is NULL, the number of threads is automatically detected.
Value
an object of MapPop-class
or if
returnCommand is true a string giving the MaCS command passed to
the manualCommand argument of runMacs
.
References
Chen GK, Marjoram P, Wall JD (2009). “Fast and Flexible Simulation of DNA Sequence Data.” Genome Research, 19, 136-142. https://genome.cshlp.org/content/19/1/136.