scrm is uses a syntax compatible with the popular program ms. There are, however, a few differences to ms:
-c
in ms) and-s
),-L
produces a slightly different output and-l
(approximation), -sr
(changing recombination rate), -st
(changing mutation rate),-eI
(sampling at past time points) and-oSFS
(generates frequency spectra). For all other options, you can also refer to ms' manual to get a detailed description of what the commands are doing. scrm should happily execute any ms command that does not contain -c
and -s
. Also scrm has somewhat stricter requirements regarding the order of arguments if population admixture (-es
) is involved.
The command line options for scrm look like
scrm <nsamp> <rep> [...]
where nsamp is the total number of samples taken (in all populations and at all times), rep is the number of independent loci/chromosomes to generate and the [...]
is an optional placeholder for an arbitrary number of command flags described below.
-r <R> <L>
: Set the recombination rate to R = 4*N0*r and the length of all loci to L base pairs. r is the recombination rate per locus.-l <l>
: Use approximation rather than simulating the exact ARG. Within a sliding window of length l base pairs all linkage information is considered when building the genealogy. To positions outside of this window, some linkage is ignored. Setting l=0 produces the SMC' and l=-1 or l>L deactivates the approximation. In all commands, migrations rates M = 4*N0*m, where m is the fraction of a population that is replaced with migrants from other populations each generation (looking forwards in time).
-I <npop> <s1> ... <sn> [<M>]
: Use an island model with npop populations, where s1 to sn individuals are sampled from population 1 to n, respectively. Optionally assume a symmetric migration rate of M.-M <M>
: Assume a symmetric migration rate of M/(npop-1). -m <i> <j> <M>
: Set the migration rate from population j to population i to M (looking forward in time).-ma <M11> <M21> ... <M21> ...
: Set the migration matrix (Dimension is npop x npop). Diagonals elements are ignored but required.-n <i> <n>
: Set the present day size of population i to n*N0.-G <a>
: Set the exponential growth rate of all populations to a.-g <i> <a>
: Set the exponential growth rate of population i to a.-t < $\theta$ >
: Set the mutation rate to \(\theta = 4N_0u\), where u is the neutral mutation rate per locus. If this options is given, scrm generates the segregating sites output.-T
: Print the local genealogies in newick format.-O
: Print the local genealogies in the oriented forest
format as described in Kelleher et al. (2014) [since v1.2].-L
: Print the TMRCA and the local tree length for each segment (behaves different to ms).-oSFS
: Print the site frequency spectrum. Requires that the mutation rate \(\theta\) is given with the '-t' option.-SC [ms|rel|abs]
: Scaling of sequence positions. Either relative to the locus length between 0 and 1 (rel
), absolute in base pairs (abs
) or ms
's scaling (default) where the positions in the segregating sites output are relative, and the positions in the trees output are absolute (ms
)[since v1.3]. -seed <SEED> [<SEED2> <SEED3>]
: Specifies a seed for the simulation. You can input up to three non-negative numbers. If no seed is given, scrm randomly samples one using entropy provided by the operating system. To reproduce a previous simulation, use the single number in the second line of the output.The command this section all have a time t as first parameter. Changes made by the commands affect the time from t further back into the past. All times in units of 4*N0 generations.
-eI <t> <s1> ... <sn>
: Sample s1 to sn individuals are from population 1 to n, respectively, at time t. -eM <t> <M>
: Assume a symmetric migration rate of M/(npop-1) at time t.-em <t> <i> <j> <M>
: Set the migration rate from population j to population i to M (looking forward in time) at time t.-ema <npop> <M11> <M12> ... <M21> ...
: Set the migration matrix (Dimension is npop x npop). Diagonals elements are ignored but required.-eN <t> <n>
: Set the size of all populations to n*N0 at time t.-en <t> <i> <n>
: Set the size of population i to n*N0 at time t. -eg <t> <i> <a>
: Set the exponential growth rate of population i to a at time t.-eG <t> <a>
: Set the exponential growth rate of all populations to a at time t.-es <t> <i> <p>
: Population admixture, replaces a fraction of 1-p of population i with individuals a from population npop + 1 which is ignored afterwards (viewed forward in time). Technically (and looking backwards in time), a new population n+1 with size N0 is created. Migration (to & from) and growth rates for this population are initially 0. Each lines in population i is moved to the new population with probability 1-p. Please sort multiple -es
arguments by their time to avoid confusion about the numbering of populations. Please give the arguments that affect the whole population (-M
, -N
, -G
& -ma
) before giving the first -es
. Also, their timed equivalents (-eM
, -eN
, -eG
, -eI
& -ema
) position on the command line events must be the same as in time (only relative to -es
).
scrm
throws an error if any of these conditions is not met. In doubt, just sort all command line arguments by time.-ej <t> <i> <j>
: Adds a specialization event in population i that creates population j (forwards in time). Technically (and looking backwards in time), it merges population j into population i at time t. Migration rates into population j are set to 0 for the time further back into the past.The following commands change the model parameters from at a sequence position s.
-sr <s> <R>
: Set the recombination rate to R starting at position s.-st <s> <$\theta$>
: Set the mutation rate to \(\theta\) starting at position s.