This function adds user provided options for simulating RNA-seq data to RNAseq.SimSetup object. The resulting output list object is the input for simulateDE function.

SimSetup(desetup,
params,
spike=NULL,
size.factors='equal',
downsample=FALSE,
geneset=FALSE)

Arguments

desetup

The RNAseq simulation parameters created by DESetup.

params

The negative binomial parameters for simulations. This can be: (1) The output of estimateParam. (2) A string specifying the name of precalculated estimates, see details.

spike

The spike-in simulation parameters created by estimateSpike. Default is NULL. These are needed for applying spike-in-dependent normalisation methods, i.e. 'RUV' and 'BASiCS'.

size.factors

Size factors representing sample-specific differences/biases in expected mean values of the NB distribution: "equal" or "given". The default is "equal", i.e. equal size factor of 1. If the user defines it as given, the size factors are sampled from the size factors provided by the output of estimateParam.

downsample

Drawing the associated dispersions after determining effective mean expressions by size factors. Default is FALSE.

geneset

Sampling with replacement or filling count tables with low magnitude Poisson when the estimated mean expression vector is shorter than the number of genes to be simulated. Default is FALSE, i.e. random sampling of mean expression values with replacement.

Value

A list with the following entries:

desetup

The RNAseq simulation parameters.

params

The distributional parameters for simulations of genes.

spike

The distributional parameters for simulations of spike-ins.

size.factors

Size factor definition: "equal" means no difference in size factors between samples. "given" means that the size factors will be randomly drawn from the size factors provided by params. The user can also provide a list object containing sampling distributions per group (n1 and n2). Defaul is "equal".

Examples

# NOT RUN {
## Setting DE options
de.opts <- DESetup(ngenes = 10000, nsims = 25,
p.DE = 0.2, pLFC = function(x) sample(c(-1,1), size=x,replace=TRUE)*rgamma(x, 3, 3),
p.B=0.1, bLFC = function(x) rnorm(x, mean=0, sd=1.5), bPattern="uncorrelated",
sim.seed = 43856)
## Combining DE options with parameters
sim.opts <- SimSetup(desetup = de.opts,
params = kolodziejczk_param,
spike=NULL, size.factors = "equal",
downsample = FALSE, geneset = FALSE)
# }