msprime_sim | R Documentation |
This function generates an msprime simulation script, and optionally executes it in python. Unlike the msprime_genome
function, this function simulates independent SNP sites.
msprime_sim(
graph,
outpref = "msprime_sim",
nsnps = 1000,
neff = 1000,
ind_per_pop = 1,
mutation_rate = 0.001,
time = 1000,
fix_leaf = FALSE,
admix_default = 0.5,
run = FALSE,
numcores = NULL,
ghost_lineages = FALSE,
shorten_admixed_leaves = FALSE
)
graph |
A graph as an |
outpref |
A prefix of output files. |
nsnps |
The number of SNPs to simulate. All SNPs will be simulated independently of each other. |
neff |
Effective population size (in diploid individuals). If a scalar value, it will be constant across all populations. Alternatively, it can be a named vector with a different value for each population (e.g., |
ind_per_pop |
The number of diploid individuals to simulate for each population. If a scalar value, it will be constant across all populations.
Alternatively, it can be a named vector with a different value for each population (e.g., |
mutation_rate |
Mutation rate per site per generation. The default is set to a high value (0.001 per site per generation) to obtain more polymorphic SNPs in order to speed up the simulation. |
time |
Either a scalar value (1000 generations by default) with the dates generated by |
fix_leaf |
A boolean value specifying if the dates of the leaf nodes will be fixed at time 0. If |
admix_default |
A float value specifying default admixture proportion for all admixture nodes. The default is |
run |
If |
numcores |
The number of cores to use when simulating data. |
ghost_lineages |
A boolean value specifying whether ghost lineages will be allowed.
If |
shorten_admixed_leaves |
If |
The file name and path of the simulation script
## Not run:
results = qpgraph(example_f2_blocks, example_graph)
msprime_sim(results$edges, nsnps=100)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.