counts: Accessors for the 'counts' slot of an OutriderDataSet object.

countsR Documentation

Accessors for the 'counts' slot of an OutriderDataSet object.

Description

The counts slot holds the count data as a matrix of non-negative integer count values, one row for each observational unit (eg.: gene), and one column for each sample.

Usage

## S4 method for signature 'OutriderDataSet'
counts(object, normalized = FALSE, minE = 0.5, ...)

## S4 replacement method for signature 'OutriderDataSet,matrix'
counts(object, ...) <- value

Arguments

object

An OutriderDataSet object

normalized

TRUE/FALSE whether counts should be normalized

minE

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

...

Further arguments are passed on to the underlying assay function

value

An integer matrix containing the counts

Details

By default this function returns the raw counts. If conrol factors are computed or provided the normalized counts can be returned using normalized = TRUE. The offset parameter can be used to add a pseudocount to the count before dividing by the normalization. This can be usefull when the log(counts) are computed and in case the controll values are in the same oder of magnited as the counts.

Value

A matrix containing the counts

See Also

sizeFactors, normalizationFactors

Examples


ods <- makeExampleOutriderDataSet()
counts(ods)[1:10,1:10]

ods <- estimateSizeFactors(ods)
counts(ods, normalized=TRUE)[1:10,1:10]


gagneurlab/OUTRIDER documentation built on April 29, 2024, 2:22 a.m.