Computes pooled size factors with scran::computeSumFactors() and log-normalises the counts with logNormTransf().

scranTransf(sce, assayName = "counts", clusts = NULL)

Arguments

sce

SCE object.

assayName

Assay name.

clusts

Cluster labels (optional).

Value

SCE object with the assay logcounts and the size factors, centred to mean 1, in colData(sce)$sizeFactor.

Examples

sce <- scuttle::mockSCE(ncells = 200, ngenes = 200)
# Pool cells within known groups to compute the size factors.
sce <- scranTransf(sce, clusts = sce$Cell_Cycle)
assayNames(sce)