Description Usage Arguments Details Value
View source: R/ABC_simulation_with_conf.R
A function for doing abc simulation with a configuration table. see Readme on github for required columns in the table
1 2 3 4 5 6 7 8 9 10 11 12 | ABC_simulation_with_conf(
npod,
conf,
time.range,
buffer = 0,
concentrationscale,
concentrationShape,
prefix = "temp",
BayeSSCallocation,
do.parallel = 1,
write.reference.file = F
)
|
npod |
An integer, the number of simulation replicates |
conf |
A data frame with configurations |
time.range |
A vector containing two numeric elements specifying the minimal and maximum event time. |
buffer |
The minimal amount of time separating two events. The default is 0, when events' time are sampled randomly |
concentrationscale |
A numeric. The |
concentrationShape |
A numeric. The |
prefix |
BayeSSC will generate many intermediate files, this function will create temporary folders for storing these files. One folder for one row in the configuration table, and the folders are named as |
BayeSSCallocation |
A character string providing the location of the BayeSSC executable (including the file name) |
do.parallel |
A integer for the number of parallel threads to use. if equals |
write.reference.file |
|
For the prior on the number of co-expansion events, hBayeSSC used a flat distribution. In the paper, we adopt the [PyMsbayes-style](http://joaks1.github.io/PyMsBayes/) prior: a gamma distribution for the alpha parameter of the dirichelete process. User need to select the two parameters for gamma distribution: concentrationShape and consentrationScale. Check [prior selection in PyMsbayes](http://joaks1.github.io/PyMsBayes/tutorials/selecting-priors.html) for how to select these two parameters.
If write.reference.file
is FALSE
, this function returns a data frame containing the simulated hyperstats. The first column is 'uid' (prefix
+the replicates number), the second column is the number of events, and the third column is the total number of species. Following are columns of the "real" expansion time for each species in the simulation, and then, the columns of hyperstats.If write.reference.file
is TRUE
, this function returns a character string providing the path to the reference file.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.