escoSimulate: ESCO simulation

Description Usage Arguments Details Value References See Also Examples

View source: R/esco-simulate.R

Description

Simulate count data for a fictional single-cell RNA-seq experiment using a hierarchical copula model.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
escoSimulate(params = newescoParams(), type = c("single", "group",
  "tree", "traj"), verbose = TRUE, numCores = 2, ...)

escoSimulateSingle(params = newescoParams(), verbose = TRUE, ...)

escoSimulateGroups(params = newescoParams(), verbose = TRUE, ...)

escoSimulateTree(params = newescoParams(), verbose = TRUE, ...)

escoSimulateTraj(params = newescoParams(), verbose = TRUE, ...)

Arguments

params

escoParams object to store simulation configurations in.

type

which type of heterogenounity to use. Options are : "single" which produces a single population; "group" which produces distinct groups; "tree" which produces distinct groups but admits a tree structure; "traj" which produces distinct groups but admits a smooth trajectory structure.

verbose

logical. Whether to print progress messages.

numCores

the number of cores used for parallelization, default is 2. If set as NULL, then all the detected cores are used.

...

any additional parameter settings to override what is provided in escoParams.

Details

Parameters can be set in a variety of ways. If no parameters are provided the default parameters are used. We adopts the way in splatter to set up parameters, particularly, any parameters in escoParams can be overridden by supplying additional arguments through a call to setParams. This design allows the user flexibility in how they supply parameters and allows small adjustments without creating a new escoParams object. See examples for a demonstration of how this can be used.

The simulation involves the following steps:

  1. Set up simulation object

  2. Simulate library sizes

  3. Simulate base mean for genes

  4. Simulate cell structure (group / tree / trajectory) related differential factors

  5. Simulate mean variance relationship adjusted mean for genes in different cells

  6. Simulate true counts (with / without correlation)

  7. Simulate techinical noise (zeroinflation / downsampling)

  8. Create final dataset

The final output is a SingleCellExperiment object that contains the simulated counts but also the values for various intermediate steps, and the paramters used to generate the simulation. These are stored in the colData (for cell specific information), rowData (for gene specific information), assays (for gene by cell matrices), or metadata (for parameters configurations) slots.

Value

SingleCellExperiment object containing the simulated counts and intermediate values.

References

Tian J, Wang J, Roeder K. ESCO: single cell expression simulation incorporating gene co-expression. bioRxiv. 2020.

Paper: https://www.biorxiv.org/content/10.1101/2020.10.20.347211v1

Code: https://github.com/JINJINT/ESCO

See Also

escoSimLib, escoSimGeneMeans, escoSimGroupDE, escoSimTreeDE, escoSimTrajDE, escoSimSingleCellMeans, escoSimGroupCellMeans, escoSimTreeCellMeans, escoSimTrajCellMeans, escoSimTrueCounts, escoSimZeroInflate, escoSimDownSample

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Simulation with default parameters
sim <- escoSimulate()

# Simulation with different number of genes
# sim <- escoSimulate(nGenes = 1000)
# Simulation with custom parameters
params <- newescoParams(nGenes = 100, mean.rate = 0.5)
# sim <- escoSimulate(params)
# Simulation with adjusted custom parameters
# sim <- escoSimulate(params, mean.rate = 0.6, out.prob = 0.2)
# Simulate group
# sim <- escoSimulate(type = "group")
# Simulate tree
# sim <- escoSimulate(type = "tree")
# Simulate traj
# sim <- escoSimulate(type = "traj")

JINJINT/splattermodify documentation built on May 19, 2021, 4:05 p.m.