Description Usage Arguments Value Author(s) See Also Examples
This function is a wrapper function including estimation, simulation and evaluation necessary for power analysis.
1 2 3 4 5 6 7 8 |
input |
This can be one of the following: 1) NULL (Default): The parameters are defined by the function |
RNAseq |
is a character value: "bulk" or "singlecell". |
ngenes |
Number of genes to be simulated. Default is 10000. |
nsims |
Number of simulations to run. Default is 25. |
p.DE |
Percentage of genes being differentially expressed (DE). Default is 10%. |
LFC |
The log2 fold change for DE genes. This can be: (1) a constant, e.g. 2; (2) a vector of values with length being number of DE genes. If the input is a vector and the length is not the number of DE genes, it will be sampled with replacement to generate log-fold change; (3) a function that takes an integer n, and generates a vector of length n, e.g. function(x) rnorm(x, mean=0, sd=1.5). The default is NULL, i.e. the log2 fold changes are defined by a gamma distribution: function(x) sample(c(-1,1), size=x,replace=T)*rgamma(x, 4, 2). |
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 |
n1, n2 |
Integer vectors specifying the number of biological replicates in each group. Default values are n1=n2=c(2,4,6,10,15,20) and n1=n2=c(24,48,96,192,384,800) for single cell and bulk RNAseq experiments, respectively. |
ncores |
integer positive number of cores for parallel processing. Default is NULL, i.e. 1 core. |
DEmethod |
String to specify the DE detection method to be used. Available options are: edgeRglm, edgeRQL, DESeq2, limma, ROTS, baySeq, NOISeq, DSS, MAST, scde, BPSC, scDD. Default is limma for bulk and MAST for single cell RNA-seq experiments. |
save.plots |
Logical vector indicating whether plots should be saved as pdf files in the current working directory. Default is TRUE. |
verbose |
Logical vector indicating whether progress messages and additional notifications should be printed. Default is TRUE. |
Parameters |
The parameters of the negative binomial. This will be estimated if an input is provided, a precalculated estimates (see details) or in silico parameters. For details, see the result values of |
SimulationResults |
The results of differential expression simulation. For details, see the result values of |
EvaluationResults |
The results of error matrices evaluation. For details, see the result values of |
SummaryTable |
The marginal TPR and FDR per sample sizes. For details, see |
MarginalPlot, ConditionalPLot |
The marginal and conditional TPR and FDR plots. See |
Beate Vieth
estimateNBParam
, insilicoNBParam
, DESetup
, SimSetup
, simulateDE
, evaluateSim
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Not run:
## simulating in silico single cell RNAseq data
## DE testing with MAST
## NOTE: If parallel computing is not possible, consider using DEmethod="ROTS"!
powsim <- PowSim(input=NULL,
RNAseq='singlecell',
ngenes=10000,
nsims=25,
p.DE=0.1,
LFC=function(x) sample(c(-1,1), size=x,replace=T)*rgamma(x, 3, 3),
size.factors='equal',
ncores=10,
DEmethod="MAST",
save.plots=TRUE, verbose=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.