Coala can call the coalescent simulators ms [1], msms [2] and scrm [3] and can use seq-gen [4] for finite sites simulations.

Installation

The R version of scrm should get installed automatically as a dependeny of coala. For the other programs, you need to have an executable binary available on your system. Short instructions on obtaining and compiling the programs are given in the help pages of activate_ms, activate_msms and activate_seqgen.

Activation

Additionally to having the binary for a simulator, you need to inform coala where the binary is. We refere to this process as activation of a binary. Afterwards, coala will use the simulator automatically where appropriate.

There are three different ways to activate a binary:

  1. Use the activate_ms, activate_msms and activate_seqgen functions to activate the simulators from within R. You should use the functions before creating a model.
  2. Alternatively, you can place the programs binaries in your working directory or in a folder listed in your PATH environment variable using one of the names listed under “Expected Binary Names” below. If there is a match file, coala will automatically activate the simulator.
  3. You can start the R session with an environment variable that hold the path to the binaries. In this case, the simulators should also be automatically be activated when the coala package is loaded.
Simulator Priority Expected Binary Names Environment Var Function
seq-gen 100 seqgen, seq-gen, seqgen.exe, seq-gen.exe SEQGEN activate_seqgen
msms 200 msms.jar / java, java.exe MSMS / JAVA activate_msms
ms 300 ms, ms.exe MS activate_ms
scrm 400

In case multiple simulators can simulate a model, the one with the highest priority is be used. The priority values can be adapted using the activate_ms, activate_msms and activate_seqgen commands.

Finally, you can use the list_simulators() command to view which simulators are currently available.

References