calcNormFactors {edgeR}R Documentation

Calculates Normalization Factors for a Matrix of Count Data

Description

Using a reference sample, calculate the normalization factors, over and above accounting for library size.

Usage

calcNormFactors(object, method=c("TMM","RLE","upperquartile"), refColumn = NULL, logratioTrim = .3, sumTrim = 0.05, doWeighting=TRUE, Acutoff=-1e10, p=0.75)

Arguments

object

either a matrix of raw (read) counts or a DGEList object

method

method to use to calculate the scale factors

refColumn

column to use as reference, only used when method="TMM"

logratioTrim

amount of trim to use on log-ratios ("M" values), only used when method="TMM"

sumTrim

amount of trim to use on the combined absolute levels ("A" values), only used when method="TMM"

doWeighting

logical, whether to compute (asymptotic binomial precision) weights, only used when method="TMM"

Acutoff

cutoff on "A" values to use before trimming, only used when method="TMM"

p

percentile (between 0 and 1) used to compute scale factors from, only used when method="upperquartile"

Details

method="TMM" is the weighted trimmed mean of M-values (to the reference) proposed by Robinson and Oshlack (2010), where the weights are from the delta method on Binomial data. If refColumn is unspecified, the library whose upper quartile is closest to the mean upper quartile is used.

method="RLE" is the scaling factor method proposed by Anders and Huber (2010). We call it "relative log expression", as median library is calculated from the geometric mean of all columns and the median ratio of each sample to the median library is taken as the scale factor.

method="upperquartile" is the upper-quartile normalization method of Bullard et al (2010), in which the scale factors are calculated from the 75% quantile of the counts for each library, after removing transcripts which are zero in all libraries. We generalize it to allow scaling by any quantile of the distributions.

For symmetry, normalization factors are adjusted to multiply to 1.

Value

If a matrix is given for object, the output is a vector with length ncol(object) giving the relative normalization factors. If a DGEList object is given for object, the output is a DGEList object containing the normalization factors in the samples$norm.factors element.

Author(s)

Mark Robinson

References

Anders, S, Huber, W (2010). Differential expression analysis for sequence count data Genome Biology 11, R106.

Bullard JH, Purdom E, Hansen KD, Dudoit S. (2010) Evaluation of statistical methods for normalization and differential expression in mRNA-Seq experiments. BMC Bioinformatics 11, 94. A scaling normalization method for differential expression analysis of RNA-seq data.

Robinson MD, Oshlack A (2010). Genome Biology 11, R25.

Examples

  d <- matrix( rpois(1000, lambda=5), nrow=200 )
  f <- calcNormFactors(d)

[Package edgeR version 2.4.3 Index]