Description Usage Arguments Details Value Author(s) See Also Examples
This function simulates RNA-seq count matrices considering differential expression specifications (number of samples per group, effect size, number of differential expressed genes etc.). The return object contains DE test results from all simulations as well as descriptive statistics.
1 2 3 4 5 6 | simulateDE(n1=c(20,50,100),
n2=c(30,60,120),
sim.settings,
ncores=NULL,
DEmethod,
verbose=TRUE)
|
n1, n2 |
Integer vectors specifying the number of biological replicates in each group. Default values are n1=c(20,50,100) and n2=c(30,60,120). |
sim.settings |
This object specifies the simulation setup. This must be the return object from |
ncores |
integer positive number of cores for parallel processing, default is NULL, ie 1 core. |
DEmethod |
String to specify the DE detection method to be used. Available options are: limma, edgeR, DESeq2, ROTS, baySeq, NOISeq, EBSeq, DSS, MAST, scde, BPSC, scDD. |
verbose |
Logical value to indicate whether to show progress report of simulations. Default is TRUE. |
simulateDE is the main function to simulate differential expression for RNA-seq experiments. The simulation parameters are specified with SimSetup
. The user needs to specify the number of samples per group and the differential expression analysis method.
It only stores and returns the DE test results (i.e. p-values). The error matrix calculations will be conducted with evaluateSim
.
A list with the following fields. The dimensions for the 3D arrays are ngenes * N * nsims:
pvalue, fdr |
3D array for p-values and FDR from each simulation. Note that FDR values will be empty and the calculation will be done by |
mu,disp,dropout |
3D array for mean, dispersion and dropout of library size factor normalized read counts |
n1,n2 |
The input number of biological replicates in each group. The vectors must have the same length. |
time.taken |
The time taken for each simulation, given for read count simulation, DEA and moment estimation. |
Beate Vieth
estimateNBParam
, insilicoNBParam
for negative binomial parameter specifications;
DESetup
, SimSetup
for simulation setup
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## Not run:
# download count table
githubURL <- "https://github.com/bvieth/powsimRData/raw/master/data-raw/kolodziejczk_cnts.rda"
download.file(url = githubURL, destfile= "kolodziejczk_cnts.rda", method = "wget")
load('kolodziejczk_cnts.rda')
kolodziejczk_cnts <- kolodziejczk_cnts[, grep('standard', colnames(kolodziejczk_cnts))]
## estimate NB parameters:
TwoiLIF.params = estimateNBParam(countData = kolodziejczk_cnts,
cData = NULL, design = NULL,
RNAseq = 'singlecell', estFramework = 'MatchMoments',
sigma= 1.96)
## define DE settings:
desettings <- DESetup(ngenes=10000,
nsims=25, p.DE=0.2,
LFC=function(x) sample(c(-1,1), size=x,replace=TRUE)*rgamma(x, 3, 3))
## define simulation settings for Kolodziejczk:
simsettings <- SimSetup(desetup=desettings, params=TwoiLIF.params, size.factors='given')
## run simulations:
simres <- simulateDE(n1=c(24,48,96,192,384,800),
n2=c(24,48,96,192,384,800),
sim.settings=simsettings,
ncores=10, DEmethod="MAST", verbose=TRUE)
## if parallel computation unavailable, consider ROTS as DEmethod
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.