powsimR_estimation | R Documentation |
This function is used to estimate useful parameters from a real dataset by
using estimateParam
or estimateSpike
function in powsimR package.
powsimR_estimation(ref_data, verbose = FALSE, other_prior = NULL, seed)
ref_data |
A count matrix. Each row represents a gene and each column represents a cell. |
verbose |
Logical. |
other_prior |
A list with names of certain parameters. Some methods need
extra parameters to execute the estimation step, so you must input them. In
simulation step, the number of cells, genes, groups, batches, the percent of
DEGs are usually customed, so before simulating a dataset you must point it out.
See |
seed |
An integer of a random seed. |
powsimR provides some choices for users to select suitable parameters according to different types of data, platforms, normalization methods, distributions and so on.
RNAseq. "bulk" or "singlecell" (default).
Protocol. Options are "UMI" (default) (e.g. 10X Genomics, CEL-seq2) or "Read" (e.g. Smart-seq2).
Distribution. "NB" (default) for negative binomial or "ZINB" for zero-inflated negative binomial distribution fitting.
Normalisation. "TMM" (default), "MR", "PosCounts", "UQ", "scran", "Linnorm", "SCnorm", "Census", "depth", "none".
powsimR also provides an another choice to estimate parameters (not neccessary)
via spike-ins. If users want to use this, make sure that the reference data
must contain ERCC spike-in counts. In addtion, users must set dilution.factor and
volume information by other_prior = list(dilution.factor = xxx, volume = xxx)
.
For more instructions, see Examples
.
A list contains the estimated parameters and the results of execution detection.
Vieth B, Ziegenhain C, Parekh S, et al. powsimR: power analysis for bulk and single cell RNA-seq experiments. Bioinformatics, 2017, 33(21): 3486-3488. https://doi.org/10.1093/bioinformatics/btx435
Github URL: https://github.com/bvieth/powsimR
## Not run:
ref_data <- simmethods::data
## Estimate parameters without ERCC spike-in
estimate_result <- powsimR_estimation(
ref_data = ref_data,
other_prior = list(RNAseq = "singlecell",
Protocol = "UMI",
Normalisation = "scran"),
verbose = TRUE,
seed = 111)
## Estimate parameters with ERCC spike-in
### Make sure there are ERCC names in reference data
rownames(ref_data)[grep(rownames(ref_data), pattern = "^ERCC")]
### Users must input the dilution.factor and volume (microliter) to determine the ERCC molecules
estimate_result <- powsimR_estimation(
ref_data = ref_data,
other_prior = list(RNAseq = "singlecell",
Protocol = "UMI",
Normalisation = "scran",
dilution.factor = 50000,
volume = 1),
verbose = TRUE,
seed = 111)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.