| areSizeFactorsCentred {scater} | R Documentation |
Checks if each set of size factors is centred at unity, such that abundances can be reasonably compared between features normalized with different sets of size factors.
areSizeFactorsCentred(object, centre = 1, tol = 1e-06)
object |
A SingleCellExperiment object containing any number of (or zero) sets of size factors. |
centre |
a numeric scalar, the value around which all sets of size factors should be centred. |
tol |
a numeric scalar, the tolerance for testing equality of the mean of each size factor set to |
A logical scalar indicating whether all sets of size factors are centered.
If no size factors are available, TRUE is returned.
Aaron Lun
data("sc_example_counts")
data("sc_example_cell_info")
example_sce <- SingleCellExperiment(
assays = list(counts = sc_example_counts),
colData = sc_example_cell_info
)
sizeFactors(example_sce) <- runif(ncol(example_sce))
areSizeFactorsCentred(example_sce)
example_sce <- normalize(example_sce, centre = TRUE)
areSizeFactorsCentred(example_sce)