Size factor methods {SingleCellExperiment} | R Documentation |
Gets or sets the size factors for all cells.
## S4 method for signature 'SingleCellExperiment' sizeFactors(object, type=NULL) ## S4 replacement method for signature 'SingleCellExperiment' sizeFactors(object, type=NULL) <- value ## S4 method for signature 'SingleCellExperiment' clearSizeFactors(object) ## S4 method for signature 'SingleCellExperiment' sizeFactorNames(object)
object |
A SingleCellExperiment object. |
type |
A string specifying the type of size factor to get or set. |
value |
A numeric vector of size factors for all cells. |
A size factor is a scaling factor used to divide the raw counts of a particular cell to obtain normalized expression values.
The sizeFactors
methods can be used to get or set size factors for all cells.
The type
argument is deprecated, as are the sizeFactorNames
and clearSizeFactors
functions.
For sizeFactors
, a numeric vector is returned containing size factors for all cells.
For sizeFactors<-
, a SingleCellExperiment is returned with size factors stored in the internal metadata fields.
For clearSizeFactors
, a SingleCellExperiment is returned with no size factor information.
For sizeFactorNames
, a character vector is returned containing the names of all named size factor sets.
Aaron Lun
example(SingleCellExperiment, echo=FALSE) # Using the class example sizeFactors(sce) <- runif(ncol(sce)) sizeFactors(sce)