normalizationFactors: Accessor functions for the normalization factors in an...

Description Usage Arguments Value See Also Examples

Description

To normalize raw count data normalization factors can be provided as a matrix. When running controlForConfounders the normalization factors are stored within the OutriderDataset object. This normalization factors are then used to compute the normalized counts.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## S4 method for signature 'OutriderDataSet'
normalizationFactors(object, ...)

## S4 replacement method for signature 'OutriderDataSet,matrix'
normalizationFactors(object, minE = 0.5, ...) <- value

## S4 replacement method for signature 'OutriderDataSet,DataFrame'
normalizationFactors(object, minE = 0.5, ...) <- value

## S4 replacement method for signature 'OutriderDataSet,data.frame'
normalizationFactors(object, minE = 0.5, ...) <- value

## S4 replacement method for signature 'OutriderDataSet,'NULL''
normalizationFactors(object) <- value

Arguments

object

An OutriderDataSet object

...

Further arguments are passed on to the underlying assay function

minE

The minimal expected count, defaults to 0.5, to be used in computing the expected log geom mean.

value

The matrix of normalization factors

Value

A numeric matrix containing the normalization factors or the OutriderDataSet object with an updated normalizationFactors assay.

See Also

sizeFactors normalizationFactors

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
ods <- makeExampleOutriderDataSet()

normFactors <- matrix(runif(nrow(ods)*ncol(ods),0.5,1.5),
    ncol=ncol(ods),nrow=nrow(ods))

# the normalization factors matrix should not have 0's in it
# it should have geometric mean near 1 for each row
normFactorsRM <- normFactors / exp(rowMeans(log(normFactors)))
normalizationFactors(ods) <- normFactorsRM
normalizationFactors(ods)[1:10,1:10]

normalizationFactors(ods) <- NULL
ods <- estimateSizeFactors(ods)
normalizationFactors(ods) <- normFactors
all(normalizationFactors(ods) == t(sizeFactors(ods) * t(normFactors)))

gagneurlab/OUTRIDER documentation built on Oct. 24, 2020, 6:49 p.m.