This function creates a minimal initialize block, allowing you to set some basic parameters, but generally only allowing for one type of mutation, which is distributed across the whole genome.

slim_block_init_minimal(
  mutation_rate = 1e-07,
  dominance = 0.5,
  selection = 0,
  dist_type = "f",
  genome_size = 1e+05,
  recombination_rate = 1e-08,
  seed = NULL
)

Arguments

mutation_rate

The overall mutation rate.

dominance

The overall dominance value.

selection

Mean selection strength for mutations

dist_type

Distribution from which to draw mutation selection values (see initializeMutationType for possible values).

genome_size

Genome size of the population, in number of loci.

recombination_rate

Overall recombination rate.

seed

An optional integer used to set a random seed for the SLiM simulation.

Value

A slimr_block object

Examples

slim_script(
  slim_block_init_minimal(),
  slim_block_finish(100)
)
#> <slimr_script[2]>
#> block_init:initialize() {
#>     initializeMutationRate(1e-07);
#>     initializeMutationType("m1", 0.5, "f", 0);
#>     initializeGenomicElementType("g1", m1, 1);
#>     initializeGenomicElement(g1, 0, 1e+05 - 1);
#>     initializeRecombinationRate(1e-08);
#> }
#> 
#> block_2:100 early() {
#>     sim.simulationFinished();
#> }