Skip to content

rangeexp

Yurii Kotsar edited this page Sep 16, 2025 · 1 revision

(n_gens_burnin=DEF_N_GENS_BURNIN, n_gens_exp=DEF_N_GENS_EXP, n_re=1; max_burnin=(DEF_X_MAX_BURNIN, DEF_Y_MAX), max_exp=(DEF_X_MAX_EXP, DEF_Y_MAX), max=(DEF_X_MAX, DEF_Y_MAX), migr_mode=DEF_MIGR_MODE, data_to_generate=DEF_DATA_TO_GENERATE, name=Dates.format(Dates.now(), dateformat"yyyy-mm-dd_HH-MM-SS"), bottleneck=NaN, r_max_burnin=0, r_max_exp=0, r_coords=[1, 2], startfill_range=NaN, distributed=true, wld_ms1=NaN, wld_ms2=NaN, wld_stats=NaN)

Simulates a range expansion n_re times. If no world is provided, generates a world and seeds it with DEF_N_DEMES_STARTFILL demes filled with individuals.

n_gens_burnin: duration of the burn-in phase, used to reach mutation-selection equilibrium
n_gens_exp: duration of the expansion
n_re: number of replicates
max_burnin: a tuple of maximum coordinates during burn-in
max_exp: a tuple of maximum coordinates during expansion
max: a tuple of maximum coordinates of space
migr_mode: mode of migration (possible values)
data_to_generate: string of letters representing different data to output. Possible values:
   F - deme-average fitness (fitn)
   P - deme populations (pops)
   S - deme-average number of homo- and heterozygous selected loci (AAsel, Aasel and aasel)
   N - deme-average number of homo- and heterozygous neutral loci (AAneu, Aaneu and aaneu)
name: world name
bottleneck: if not NaN, a tuple of bottleneck coordinates
r_max_burnin: radius that bounds the burn-in area
r_max_exp: radius that bounds the expansion area
r_coords: a tuple (array) of axes' ordinal numbers that the n-sphere with r_max_migr covers. For example:
   (1,3) - migration is bound within a disk at x and z axes
   (1,2,3) - migration is bound within a sphere at x, y and z axes
startfill_range: an array of Int ranges of the coordinates that define the area to fill with individuals at start
distributed: if true, distribute to threads
If starting from existing world, also provide:
wld_ms1: a spatial array of demes that contain individuals' left monosome [Bool] arrays
wld_ms2: a spatial array of demes that contain individuals' right monosome [Bool] arrays
wld_stats: world stats Dict

Output: a Dict containing data after the expansion:
   stats - statistics array containing world and range expansion information
   fitn, pops, AAsel, Aasel, aasel, AAneu, Aaneu, aaneu - data array with dimensions (space+time) that are generated if they were selected in data_to_generate

Clone this wiki locally