estimateSizeFactorsForMatrix {DESeq}R Documentation

Low-level function to estimate size factors with robust regression.

Description

Given a matrix or data frame of count data, this function estimates the size factors as follows: Each column is divided by the geometric means of the rows. The median (or, ir requested, another location estimator) of these ratios (skipping the genes with a geometric mean of zero) is used as the size factor for this column.

Typically, you will not call this function directly, but use estimateSizeFactors.

Usage

estimateSizeFactorsForMatrix( counts, locfunc=median)

Arguments

counts

a matrix or data frame of counts, i.e., non-negative integer values

locfunc

a function to compute a location for a sample. By default, the median is used. However, especially for low counts, the shorth may give better results.

Value

a vector with the estimates size factors, one element per column

Author(s)

Simon Anders, sanders@fs.tum.de

See Also

estimateSizeFactors

Examples

cds <- makeExampleCountDataSet()
estimateSizeFactorsForMatrix( counts(cds) )

[Package DESeq version 1.6.1 Index]