| equalizeLibSizes {edgeR} | R Documentation |
Adjusts counts so that the effective library sizes are equal, preserving fold-changes between groups and preserving biological variability within each group.
equalizeLibSizes(object, dispersion=0, common.lib.size)
object |
|
dispersion |
numeric scalar or vector of |
common.lib.size |
numeric scalar, the library size to normalize to; default is the geometric mean of the original effective library sizes |
Thus function implements the quantile-quantile normalization method of Robinson and Smyth (2008).
It computes normalized counts, or pseudo-counts, used by exactTest and estimateCommonDisp.
Note that the output common library size is a theoretical quantity. The column sums of the normalized counts, while to be exactly equal, nor are they intended to be. However, the expected counts for each tag are equal under the null hypothesis of no differential expression.
A list with components
pseudo.counts |
numeric matrix of normalized pseudo-counts |
common.lib.size |
normalized library size |
Mark Robinson, Davis McCarthy, Gordon Smyth
Robinson MD and Smyth GK (2008). Small-sample estimation of negative binomial dispersion, with applications to SAGE data. Biostatistics, 9, 321-332.
ngenes <- 1000
nlibs <- 2
counts <- matrix(0,ngenes,nlibs)
colnames(counts) <- c("Sample1","Sample2")
counts[,1] <- rpois(ngenes,lambda=10)
counts[,2] <- rpois(ngenes,lambda=20)
summary(counts)
y <- DGEList(counts=counts)
out <- equalizeLibSizes(y)
summary(out$pseudo.counts)