Run a high-level genetic simulation with configurable model
run_genetic_simulation(
n_pops = 30,
n_major_groups = 4,
n_subgroups = 8,
model = "mixed",
geo_dims = NULL,
isolation_factor = NULL,
genetic_dims = NULL,
group_separation = 15,
subgroup_separation = NULL,
pop_dispersion = 0.5,
admixture_prob = 0.15,
bottleneck_prob = 0.1,
use_subgroups = TRUE,
use_genetic_dims = NULL,
use_admixture = TRUE,
use_bottlenecks = TRUE,
use_isolation_by_distance = NULL,
use_nonlinear = TRUE,
use_noise = TRUE,
seed = NULL,
output_file = NULL,
verbose = TRUE
)List with results and plots (functions to print plots)
Number of populations
Number of major groups
Number of subgroups
One of "mixed", "geography", "genetics", or "custom"
Geographic dimensions (overrides default based on model if set)
Geography-genetics balance (overrides default based on model if set)
Genetic dimensions (overrides default based on model if set)
Separation between major groups
Separation between subgroups (default: group_separation/3 when NULL)
Within-subgroup dispersion
Proportion of admixed populations
Proportion of bottlenecked populations
Whether to create subgroups
Whether to include genetic dimensions
Whether to include admixture
Whether to include bottlenecks
Whether to weight geographic distance
Whether to apply nonlinear transformation
Whether to add noise
Optional seed forwarded to simulate_genetic_distances()
Optional CSV file path to write the distance matrix
Print diagnostics