makeExampleDESeqDataSet_multifac: Make a simulated DESeqDataSet for two or more experimental...

View source: R/makeds.R

makeExampleDESeqDataSet_multifacR Documentation

Make a simulated DESeqDataSet for two or more experimental factors

Description

Constructs a simulated dataset of Negative Binomial data from different conditions. The fold changes between the conditions can be adjusted with the betaSD_condition and the betaSD_tissue arguments.

Usage

makeExampleDESeqDataSet_multifac(
  n = 1000,
  m = 12,
  betaSD_condition = 1,
  betaSD_tissue = 3,
  interceptMean = 4,
  interceptSD = 2,
  dispMeanRel = function(x) 4/x + 0.1,
  sizeFactors = rep(1, m)
)

Arguments

n

number of rows (genes)

m

number of columns (samples)

betaSD_condition

the standard deviation for condition betas, i.e. beta ~ N(0,betaSD)

betaSD_tissue

the standard deviation for tissue betas, i.e. beta ~ N(0,betaSD)

interceptMean

the mean of the intercept betas (log2 scale)

interceptSD

the standard deviation of the intercept betas (log2 scale)

dispMeanRel

a function specifying the relationship of the dispersions on 2^trueIntercept

sizeFactors

multiplicative factors for each sample

Details

This function is designed and inspired following the proposal of DESeq2::makeExampleDESeqDataSet() from the DESeq2 package. Credits are given to Mike Love for the nice initial implementation

Value

a DESeq2::DESeqDataSet() with true dispersion, intercept for two factors (condition and tissue) and beta values in the metadata columns. Note that the true betas are provided on the log2 scale.

Examples

dds <- makeExampleDESeqDataSet_multifac(betaSD_condition = 3, betaSD_tissue = 1)
dds
dds2 <- makeExampleDESeqDataSet_multifac(betaSD_condition = 1, betaSD_tissue = 4)
dds2


federicomarini/pcaExplorer documentation built on Dec. 21, 2024, 8:47 p.m.