Learn R Programming

coala (version 0.3.0)

feat_ignore_singletons: Feature: Ignore Singletons

Description

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.

Usage

feat_ignore_singletons()

Arguments

Value

  • The feature, which can be added to a model using `+`.

Details

For this function, a singleton a mutation for which the derived allele is observed exactly once in all populations.

Examples

Run this code
model <- coal_model(2, 1) +
  feat_mutation(10) +
  feat_ignore_singletons() +
  sumstat_sfs("n_mut", transformation = sum)
simulate(model)$n_mut # Is 0, because all SNPs are singletons in this model

Run the code above in your browser using DataLab