getBaseMeansAndVariances {DESeq} | R Documentation |
This function is called internally by a number of other functions. You will need to call it directly only in very special cases.
getBaseMeansAndVariances(counts, sizeFactors)
counts |
a matrix of data frame of count data. All the columns of this matrix will be considered as replicates of the same condition. |
sizeFactors |
the size factors of the columns, as estimated e.g. with |
This function is kept for backwards compatibility. See the example below for an alternative and more self-explanatory way to get the same data.
A data frame with one row for each row in 'counts' and two columns:
baseMean |
The base mean for each row. This is the mean of the counts after they have been divided by the size factors |
comp2 |
The base variance for each row. This is the variance of the counts after they have been divided by the size factors |
Simon Anders, sanders@fs.tum.de
cds <- makeExampleCountDataSet() cds <- estimateSizeFactors( cds ) head( getBaseMeansAndVariances( counts(cds), sizeFactors(cds) ) ) # You can get the same as follows head( rowMeans( counts( cds, normalized=TRUE ) ) ) head( genefilter::rowVars( counts( cds, normalized=TRUE ) ) )