Description Usage Arguments Details Value References Examples
View source: R/lun2-simulate.R
Simulate single-cell RNA-seq count data using the method described in Lun and Marioni "Overcoming confounding plate effects in differential expression analyses of single-cell RNA-seq data".
1 2 3 4 5 6 7 | lun2Simulate(
params = newLun2Params(),
zinb = FALSE,
sparsify = TRUE,
verbose = TRUE,
...
)
|
params |
Lun2Params object containing simulation parameters. |
zinb |
logical. Whether to use a zero-inflated model. |
sparsify |
logical. Whether to automatically convert assays to sparse matrices if there will be a size reduction. |
verbose |
logical. Whether to print progress messages. |
... |
any additional parameter settings to override what is provided in
|
The Lun2 simulation uses a negative-binomial distribution where the means and
dispersions have been sampled from a real dataset
(using lun2Estimate
). The other core feature of the Lun2
simulation is the addition of plate effects. Differential expression can be
added between two groups of plates (an "ingroup" and all other plates).
Library size factors are also applied and optionally a zero-inflated
negative-binomial can be used.
If the number of genes to simulate differs from the number of provided gene parameters or the number of cells to simulate differs from the number of library sizes the relevant parameters will be sampled with a warning. This allows any number of genes or cells to be simulated regardless of the number in the dataset used in the estimation step but has the downside that some genes or cells may be simulated multiple times.
SingleCellExperiment containing simulated counts.
Lun ATL, Marioni JC. Overcoming confounding plate effects in differential expression analyses of single-cell RNA-seq data. Biostatistics (2017).
Paper: dx.doi.org/10.1093/biostatistics/kxw055
Code: https://github.com/MarioniLab/PlateEffects2016
1 | sim <- lun2Simulate()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.