computeNormConst: Compute a normalisation constant for each sample

Description Usage Arguments Value Author(s) See Also Examples

View source: R/srcImpulseDE2_computeNormConst.R

Description

The normalisation constant is the median of the ratio of gene counts versus the geomtric gene count mean. There is one normalisation constant per replicate. An intuitive alternative would be the sequencing depth, the median ratio is however less sensitive to highly differentially expressed genes with high counts (ref. DESeq). The normalisation constants are used to scale the mean of the negative binomial model inferred during fitting to the sequencing depth of the given sample. The normalisation constants therefore replace normalisation at the count data level, which is not supposed to be done in the framework of ImpulseDE2. There is the option to supply size factors to this function to override its size factor choice.

Usage

1
computeNormConst(matCountDataProc, vecSizeFactorsExternal = NULL)

Arguments

matCountDataProc

(matrix genes x samples) Read count data.

vecSizeFactorsExternal

(vector length number of cells in matCountData) [Default NULL] Externally generated list of size factors which override size factor computation in ImpulseDE2.

Value

vecSizeFactors (numeric vector number of samples) Model scaling factors for each sample which take sequencing depth into account (size factors).

Author(s)

David Sebastian Fischer

See Also

Called by runImpulseDE2. Calls computeSizeFactors.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
lsSimulatedData <- simulateDataSetImpulseDE2(
vecTimePointsA   = rep(seq(1,8),3),
vecTimePointsB   = NULL,
vecBatchesA      = NULL,
vecBatchesB      = NULL,
scaNConst        = 100,
scaNImp          = 200,
scaNLin          = 100,
scaNSig          = 200)
vecSizeFactors <- computeNormConst(
matCountData = lsSimulatedData$matObservedCounts)

ImpulseDE2 documentation built on April 28, 2020, 9:19 p.m.