Generate a matrix of RNA-seq counts from a theoretical negative-binomial model. This is in the special case of the two-group model.
seqgen_2group(ngene, nsamp, dispvec = rep(0.1, times = ngene),
prop_null = 1, signal_fun = stats::rnorm, signal_params = list(mean
= 0, sd = 1), intercept_fun = stats::rnorm,
intercept_params = list(mean = 4, sd = 2), libvec = rep(1, times =
nsamp), group_prop = 0.5, design_sv = NULL, coef_sv = NULL)The number of genes.
The number of samples.
A numeric vector of dispersions.
The proportion of genes that are null.
The signal function for the non-null genes.
A function that takes at least the argument n
and returns n draws. Additional parameters may be passed
through signal_params.
Additional arguments to be passed to signal_fun.
The function for the intercept coefficients. A function
that takes at least the argument n and returns n draws.
Additional parameters may be passed through intercept_params.
Additional arguments to be passed to
intercept_fun.
A vector of library size multiplicative factors (not on the log2 scale).
The proportion of samples to be placed in group 1.
Optional numeric design matrix of surrogate variables. The rows index the samples and the columns index the surrogate variables.
Optional numeric matrix of coefficients of the surrogate variables. The rows index the genes and the columns index the surrogate variables.
A list object with some or all of the following elements:
matA matrix of RNA-seq counts. The rows index the genes and the columns index the samples.
designmatThe user-provided designmat.
coefmatThe user-provided coefmat.
svThe user-provided design_sv.
coef_svThe user-provided coef_sv.
You should be using thin_2group instead of this. If you must
simulate from the theoretical model, I would recommend trying out
the powsimR package (https://github.com/bvieth/powsimR) from
Vieth et al. (2017).
Vieth, Beate, Christoph Ziegenhain, Swati Parekh, Wolfgang Enard, and Ines Hellmann. "powsimR: power analysis for bulk and single cell RNA-seq experiments." Bioinformatics 33, no. 21 (2017): 3486-3488.
makeExampleDESeqDataSetFor a very similar function from the DESeq2 package.
seqgen_diffFor the underlying sequence simulation function.