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 |
an |
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 SingleCellExperiment
object with centred size factors
data("sc_example_counts") data("sc_example_cell_info") example_sce <- SingleCellExperiment( assays = list(counts = sc_example_counts), colData = sc_example_cell_info) keep_gene <- rowSums(counts(example_sce)) > 0 example_sce <- example_sce[keep_gene,] sizeFactors(example_sce) <- runif(ncol(example_sce)) areSizeFactorsCentred(example_sce) example_sce <- normalize(example_sce, centre = TRUE) areSizeFactorsCentred(example_sce)