Description Usage Arguments Details Value Author(s) See Also Examples
Define per-cell size factors from the geometric mean of counts per cell.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | geometricSizeFactors(x, ...)
## S4 method for signature 'ANY'
geometricSizeFactors(
x,
subset.row = NULL,
pseudo.count = 1,
BPPARAM = SerialParam()
)
## S4 method for signature 'SummarizedExperiment'
geometricSizeFactors(x, ..., assay.type = "counts")
computeGeometricFactors(x, ...)
|
x |
For For |
... |
For the For |
subset.row |
A vector specifying whether the size factors should be computed from a subset of rows of |
pseudo.count |
Numeric scalar specifying the pseudo-count to add during log-transformation. |
BPPARAM |
A BiocParallelParam object indicating how calculations are to be parallelized.
Only relevant when |
assay.type |
String or integer scalar indicating the assay of |
The geometric mean provides an alternative measure of the average coverage per cell,
in contrast to the library size factors (i.e., the arithmetic mean) computed by librarySizeFactors
.
The main advantage of the geometric mean is that it is more robust to composition biases from a few strongly upregulated genes.
On the other hand, the geometric mean is a poor estimator of the relative bias at low or zero counts. This is because the scaling of the coverage applies to the expectation of the raw counts, so the geometric mean only becomes an accurate estimator if the mean of the logs approaches the log of the mean (usually at high counts). The arbitrary pseudo-count also has a bigger influence at low counts.
As such, the geometric mean is only well-suited for deeply sequenced features, e.g., antibody-derived tags.
For geometricSizeFactors
, a numeric vector of size factors is returned for all methods.
For computeGeometricFactors
, x
is returned containing the size factors in sizeFactors(x)
.
Aaron Lun
normalizeCounts
and logNormCounts
, where these size factors are used by default.
geometricSizeFactors
and medianSizeFactors
,
for two other simple methods of computing size factors.
1 2 | example_sce <- mockSCE()
summary(geometricSizeFactors(example_sce))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.