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
metadata(2): Samples Samples
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?
y <- DGEList(counts=(counts(cTSubSet)), group=cTSubSet$condition)
y <- calcNormFactors(y)
however, I am still working on this $\endgroup$