MyNixOS website logo
Description

A Framework for Coalescent Simulation.

Coalescent simulators can rapidly simulate biological sequences evolving according to a given model of evolution. You can use this package to specify such models, to conduct the simulations and to calculate additional statistics from the results (Staab, Metzler, 2016 <doi:10.1093/bioinformatics/btw098>). It relies on existing simulators for doing the simulation, and currently supports the programs 'ms', 'msms' and 'scrm'. It also supports finite-sites mutation models by combining the simulators with the program 'seq-gen'. Coala provides functions for calculating certain summary statistics, which can also be applied to actual biological data. One possibility to import data is through the 'PopGenome' package (<https://github.com/pievos101/PopGenome>).

coala

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 coalescent theory. 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.

Installation

The package can be installed from CRAN using

install.packages("coala")

If you want to use the simulation programs ms, msms or seqgen, they need to be installed separately. This is described in the "Using External Simulators" vignette and in the wiki.

Usage & Help

Coala comes with a vignette that explains the packages concepts and is a good place to start. It also has a vignette containing a few example applications.

Detailed information about coala's functions is provided via R's help system. Call help(_function_) in R to view them. They usually also contain examples and further links.

The ABC vignette gives an example on how coala can be used to conduct the simulations for Approximate Bayesian Computation.

Also take a look at the project wiki for additional resources.

Example

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
# [1] 15 12  1  4  0  1  0  2  0

More examples can be found in the examples vignette.

Problems

If you encounter problems when using coala, please file a bug report or mail to coala-pkg (at) googlegroups.com.

Supported Simulators

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 manually. The R version of scrm should be installed automatically, and the R version ms if the package phyclust is installed.

Development

To follow or participate in the development of coala, please install the development version from GitHub using

devtools::install_github('statgenlmu/coala')

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.

Metadata

Version

0.7.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows