API Reference
Command Line Options
Basic Parameters
- sampleSize
Number of chromosomes to sample (required)
- numReplicates
Number of independent simulations to run (required)
- nSites
Number of discrete sites in the simulated region (required)
- -t theta
Population mutation rate (4N₀μ)
- -r rho
Population recombination rate (4N₀r)
- -g gamma tractLength
Gene conversion parameters:
gamma: Population gene conversion rate (4N₀g)
tractLength: Mean conversion tract length in bp
- -gr ratio tractLength
Gene conversion as ratio to crossover rate
Demographic Options
- -p numPops size1 size2 ...
Multiple populations with specified sample sizes
- -en time popID size
Population size change:
time: When change occurs (4N₀ generations)
popID: Population ID (0-indexed)
size: New size relative to N₀
- -ed time pop1 pop2
Population split (forward in time):
time: When populations merge (backward)
pop1: Source population
pop2: Destination population
- -ea time admixPop pop1 pop2 prop
Admixture event:
time: When admixture occurs
admixPop: Admixed population
pop1, pop2: Source populations
prop: Proportion from pop1
- -M migRate
Set all migration rates to same value (4N₀m)
- -m pop1 pop2 migRate
Set specific migration rate from pop1 to pop2
- -A numSamples popID time
Ancient samples:
numSamples: Number of ancient lineages
popID: Population to sample from
time: Sampling time in past
Selection Options
- -ws tau
Stochastic selective sweep:
tau: Time since fixation (4N₀ generations)
- -wd tau
Deterministic selective sweep
- -wn tau
Neutral fixation
- -a alpha
Selection coefficient (2Ns)
- -x position
Position of selected site (0-1)
- -f frequency
Initial frequency for soft sweep
- -uA rate
Recurrent adaptive mutation rate
- -c frequency
Final frequency for partial sweep
- -ls tau
Stochastic sweep to the left of locus
- -ld tau
Deterministic sweep to the left of locus
- -ln tau
Neutral fixation to the left of locus
- -R rate
Recurrent hitchhiking rate at locus
- -L rate
Recurrent hitchhiking rate to left of locus
Prior Distributions
- -Pt low high
Uniform prior on θ
- -Pr low high
Uniform prior on ρ
- -Pre mean upper
Exponential prior on ρ (truncated)
- -Pa low high
Uniform prior on α
- -Pu low high
Uniform prior on τ
- -PuA low high
Uniform prior on uA
- -Px low high
Uniform prior on sweep position
- -Pf low high
Uniform prior on f₀
- -Pc low high
Uniform prior on partial sweep frequency
- -Pe1 timeLow timeHigh sizeLow sizeHigh
Prior on first demographic event
- -Pe2 timeLow timeHigh sizeLow sizeHigh
Prior on second demographic event
Advanced Options
- -d seed1 seed2
Set random number seeds
- -N size
Effective population size during sweeps (default: 1000000)
- -i scalar
Time increment scalar for sweeps (default: 40)
- -T
Output genealogical trees in Newick format
- -C leftBound rightBound
Condition on recombination in specified region
- -U time
Only record mutations more recent than time
- -h
Hide selected SNP from output
Output Format
Standard Output
ms-compatible format:
command_line
seed1 seed2
//
segsites: n
positions: pos1 pos2 ... posn
haplotype1
haplotype2
...
Tree Output
With -T flag:
//
[nsites1]tree1;
[nsites2]tree2;
...
Where trees are in Newick format and nsites indicates how many sites have that genealogy.
Exit Codes
0: Success
1: General error
666: Parameter error or invalid configuration