simulate-MethylomeParam-method: Simulate a methylome.

Description Usage Arguments Value Co-methylation Note

Description

simulate() samples the distribution of average methylation level (MethLevelDT slot) and the distributions of within-fragment co-methylation (ComethDT slot) to compute the transition probabilities under a first-order Markov process.

Usage

1
2
3
## S4 method for signature 'MethylomeParam'
simulate(object, nsim = 1, seed = NULL,
  epsilon = 0.01, seqlevels, BPPARAM = bpparam(), ...)

Arguments

object

A MethylomeParam object.

nsim

The number of methylomes to simulate using the parameters given in object.

seed

An object specifying if and how the random number generator should be initialized ('seeded'). For the MethylomeParam method, either NULL or an integer that will be used in a call to base::set.seed before simulating the samples (methylomes). If set, the value is saved as the "seed" attribute of the returned value. The default, NULL, will not change the random generator state, and return .Random.seed as the "seed" attribute, see 'Value'.

epsilon

An offset added/subtracted to a region's sampled methylation level to avoid zero/one values.

seqlevels

A character vector of GenomeInfoDb::seqlevels at which to simulate a methylome. If missing, the default is to use all available seqlevels.

BPPARAM

An optional BiocParallel::BiocParallelParam instance determining the parallel back-end to be used during evaluation.

...

Optional arguments passed to the internal function methsim:::.sampleComethDT(). Best avoided.

Value

A list of length nsim of SimulatedMethylome objects.

Co-methylation

TODO: Describe min_n, mean_fun, sd_fun, etc.

Note

Currently only supports simulation of CpG methylation and unstranded methylomes.


PeteHaitch/methsim documentation built on May 8, 2019, 1:32 a.m.