msprime_genome | R Documentation |
This function generates an msprime simulation script, and optionally executes it in python.
Unlike msprime_sim
, this function can simulate continuous sequence (not independent SNPs) and multiple chromosomes.
msprime_genome(
graph,
outpref = "msprime_sim",
neff = 1000,
ind_per_pop = 1,
mutation_rate = 1.25e-08,
time = 1000,
fix_leaf = FALSE,
nchr = 1,
recomb_rate_chr = 2e-08,
seq_length = 1000,
admix_default = 0.5,
run = FALSE,
ghost_lineages = FALSE,
shorten_admixed_leaves = FALSE
)
graph |
A graph as an |
outpref |
A prefix of output files. |
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 |
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 |
nchr |
Number of chromosomes to simulate. |
recomb_rate_chr |
A float value specifying recombination rate along the chromosomes. The default is |
seq_length |
The sequence length of the chromosomes. If it is a scalar value, the sequence length will be constant for all chromosomes.
Alternatively, it can be a vector with a length equal to the number of chromosomes (i.e., |
admix_default |
A float value specifying default admixture proportion for all admixture nodes. The default is |
run |
If |
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
results = qpgraph(example_f2_blocks, example_graph)
# Simulate 3 chromosomes whose lengths are 50, 100 and 100
msprime_genome(results$edges, nchr=3, seq_length=c(50, 100, 100))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.