MarioniLab / scran

Clone of the Bioconductor repository for the scran package.
https://bioconductor.org/packages/devel/bioc/html/scran.html
39 stars 23 forks source link

Integer Overflow #115

Closed DarioS closed 6 months ago

DarioS commented 6 months ago

I have a typical-sized data set and would not expect any numerical issues. But it happens. Latest release versions of R and packages.

library(SingleCellExperiment)
library(scuttle)
library(scran)
SCE <- SingleCellExperiment(assays = list(counts = matrix(rpois(21711 * 111671, 10), ncol = 111671)))
SCE <- logNormCounts(SCE)
SCE$cellType <- rep(c("Fibroblasts", "Other", "Tumor cells"), c(40967, 7374, 63330))
scoreMarkers(SCE, SCE$cellType, lfc = 3)
Warning messages:
1: In left.ncells * right.ncells : NAs produced by integer overflow
2: In left.ncells * right.ncells : NAs produced by integer overflow

The dimensions of the matrix and number of samples per class are identical to a biological data set.

LTLA commented 6 months ago

Oops. Fixed by f180b0fe767731aaa53f501a8431356cb599684c in 1.31.2. Check if it works and I'll push it to release.

DarioS commented 6 months ago

It was tried with biological data and the problem is gone.