# how to get normcounts for singlecellexperiment object?

I need to perform differential expression analysis using the scDD package from R, but I am not able to since I miss the normcounts assay in my SCE object (of course in the example they show, the assay is already there).

As I found out in the preprocessing steps, one can use this function to generate the missing assay, except that it does not work:

# this is the SCE object
> cTSubSet
class: SingleCellExperiment
dim: 19767 149
assays(2): counts logcounts
rownames(19767): Xkr4 Gm19938 ... CAAA01147332.1 AC149090.1
rowData names(4): ID Symbol Type chrLoc
colnames(149): AAAGGATGTTCACGAT-1 AACCATGTCTTTCGAT-1 ...
TGTGGCGTCTCTTAAC-1 TTTGGTTAGACGCTCC-1
colData names(17): Sample Barcode ... slm_1 slm_1.5
reducedDimNames(0):
mainExpName: NULL
altExpNames(0):

# setting parameters as suggested in the vignette linked above
> paR <- list(alpha=0.01, mu0=0, s0=0.01, a0=0.01, b0=0.01)
# setting zero.thresh to zero since I already removed unwanted genes
> cTSubSet <- preprocess(cTSubSet, zero.thresh=0, scran_norm=TRUE)

# the not so useful error:
Performing scran Normalization
Error in t.default(Data) : argument is not a matrix


I was also looking for other possible ways of obtaining such normcounts assay and I found this description:

normcounts: Normalized values on the same scale as the original counts. For example, counts divided by cell-specific size factors that are centred at unity.

Still, I can't figure out what this may mean. Is there a way of obtaining such normcounts?

• You might as well try monocle3::normalized_count. It takes SingleCellExperiment object. Jun 17, 2021 at 10:31
• yep that is a possibility. I actually found another one using edgeR, i.e. y <- DGEList(counts=(counts(cTSubSet)), group=cTSubSet\$condition) y <- calcNormFactors(y) however, I am still working on this
– gabt
Jun 18, 2021 at 12:01

I do not know this package but it seems to call scran so why bothering and not call scran directly, see for an extended discussion + code:
• yes, I am familiar with the OSCA pipeline. At this point I am just wondering if the values that are returned by computeSumFactors() can be considered as normcounts.