View source: R/feature_ignore_singletons.R
feat_ignore_singletons | R Documentation |
Mutations that are observed in just one haplotype ('singletons') are often regarded as likely candidates for sequencing errors. Sometimes, it can be advantageous to exclude them from an analysis. This feature removes all singletons from the simulated data before the summary statistics are calculated.
feat_ignore_singletons(locus_group = "all")
locus_group |
The loci for which this features is used. Can either be
|
This function assumes that a singleton is a mutation for which the derived allele is observed exactly once in all sequences, regardless of the population structure.
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_migration()
,
feat_mutation()
,
feat_outgroup()
,
feat_pop_merge()
,
feat_recombination()
,
feat_selection()
,
feat_size_change()
,
feat_unphased()
model <- coal_model(2, 1) +
feat_mutation(10) +
feat_ignore_singletons() +
sumstat_sfs("n_mut", transformation = sum)
# In this model, all mutations are singletons. Therefore,
# the number of mutations is 0 when removing singletons:
simulate(model)$n_mut
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.