View source: R/feature_unphased.R
| feat_unphased | R Documentation |
This simulates unphased data by randomly mixing the sites within one individual. Each position is randomly taken from a phased chromosome..
feat_unphased(samples_per_ind, locus_group = "all")
samples_per_ind |
The number of pseudo-chromosomes that are created from the phased chromosomes for each individual. |
locus_group |
The loci for which this features is used. Can either be
|
For each individual, ploidy chromosomes are simulated, and
samples_per_ind pseudo-chromosomes are created of these.
The feature, which can be added to a model using +.
The feature, which can be added to a model created with
coal_model using +.
For creating a model: coal_model
Other features:
feat_growth(),
feat_ignore_singletons(),
feat_migration(),
feat_mutation(),
feat_outgroup(),
feat_pop_merge(),
feat_recombination(),
feat_selection(),
feat_size_change()
# Simulate unphased data in a diploid population
model <- coal_model(10, 1, ploidy = 2) +
feat_mutation(10) +
feat_unphased(2) +
sumstat_seg_sites()
simulate(model)
# The same as before, but return only one chromosome for
# each individual:
model <- coal_model(10, 1, ploidy = 2) +
feat_mutation(10) +
feat_unphased(1) +
sumstat_seg_sites()
simulate(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.