I am having a SingleCellExperiment
(sce) object:
sce <- SingleCellExperiment(list(counts=UMI_count))
which has two dimensions:
dim(sce)
[1] 46761 68027
When I am trying to get column sums for all rows the following does not work:
colSums(assay(sce), na.rm = FALSE, dims = 1)
Giving me an error:
Error in colSums(assay(sce)) : 'x' must be an array of at least two dimensions
Apparently the issue was already described:
https://support.bioconductor.org/p/100954/
However, I can not find the solution. Is there another way of getting sums of columns of either SingleCellExperiment
object or just dgcMatrix
?
assay(sce)
return? Which is the output ofdim(assay(sce))
? $\endgroup$