Setup a SLiMR script. Each argument should be a call to slim_block
.
See details for more information.
slim_script(...)
A list of slim_block
objects comprising a SLiM script
(written in slimr code)
A slim_script
object that can be used with
slim_run
or converted into a text file for use with
SLiM directly using as_slim_text
.
slim_script(
slim_block(initialize(),
{
initializeMutationRate(1e-7);
initializeMutationType("m1", 0.5, "f", 0.0);
initializeGenomicElementType("g1", m1, 1.0);
initializeGenomicElement(g1, 0, 99999);
initializeRecombinationRate(1e-8);
}),
slim_block(1,
{
sim.addSubpop("p1", 500);
}),
slim_block(10000,
{
sim.simulationFinished();
})
)
#> <slimr_script[3]>
#> block_init:initialize() {
#> initializeMutationRate(1e-07);
#> initializeMutationType("m1", 0.5, "f", 0);
#> initializeGenomicElementType("g1", m1, 1);
#> initializeGenomicElement(g1, 0, 99999);
#> initializeRecombinationRate(1e-08);
#> }
#>
#> block_2:1 early() {
#> sim.addSubpop("p1", 500);
#> }
#>
#> block_3:10000 early() {
#> sim.simulationFinished();
#> }