Coala is an R package for simulating biological sequences according
to a given model of evolution. It can call a number of efficient
simulators based on
All simulators can be combined with the program seq-gen to simulate finite
site mutation models.
Coala also directly imports the simulation results into
R, and can
calculate various summary statistics from the results.
The package can be installed from CRAN using
Detailed information about coala's functions is provided via R's help system.
help(_function_) in R to view them. They usually also contain examples and further links.
Also take a look at the project wiki for additional resources.
In the following example, we create a simple panmictic model, simulate it and calculate the site frequency spectrum (SFS) of the simulation results:
model <- coal_model(sample_size = 10, loci_number = 2) + feat_mutation(5) + sumstat_sfs() result <- simulate(model) result$sfs #  15 12 1 4 0 1 0 2 0
More examples can be found in the examples vignette.
The package supports the coalescent simulators ms, scrm and msms.
All simulators can be combined with seq-gen to simulate finite sites
mutation models. The programs msms and seq-gen must be installed
The R version of scrm should be installed automatically,
and the R version ms if the package
phyclust is installed.
To follow or participate in the development of
coala, please install the
development version from GitHub using
on Linux and OS X. This requires that you have
devtools and a compiler or
Xcode installed. Bug reports and pull request on GitHub are highly appreciated.
The extending coala vignette
contains information on how to create new summary statistics and add simulators
to coala. The wiki also contains a few
resources for developers.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.