centreSizeFactors {scater} | R Documentation

## Centre size factors at unity

### Description

Scales all size factors so that the average size factor across cells is equal to 1.

### Usage

    centreSizeFactors(object, centre = 1)

### Arguments

`object` | A SingleCellExperiment object containing any number (or zero) sets of size factors.
`centre` | A numeric scalar, the value around which all sets of size factors should be centred.

### Details

This function is deprecated as support for multiple size factors in SingleCellExperiment is deprecated, and scaling one set of size factors is largely trivial.

Centering of size factors at unity ensures that division by size factors yields values on the same scale as the raw counts. This is important for the interpretation of the normalized values, as well as comaprisons between features normalized with different size factors (e.g., spike-ins).

### Value

A SingleCellExperiment with modified size factors that are centred at unity.

### Author(s)

Aaron Lun

### See Also

`normalizeSCE`

### Examples

    example_sce <- mockSCE()
    sizeFactors(example_sce) <- runif(ncol(example_sce))
    sizeFactors(example_sce, "ERCC") <- runif(ncol(example_sce))
    example_sce <- centreSizeFactors(example_sce)

    mean(sizeFactors(example_sce))
    mean(sizeFactors(example_sce, "ERCC"))

[Package scater version 1.14.0 Index]