khodosevichlab / CRMetrics

Summarization of CellRanger count metrics.
5 stars 0 forks source link

DoubletDetection introduces NA incomatible with sparse Matrices #31

Closed FFriis closed 2 years ago

FFriis commented 2 years ago

When ran, DoubletDetection introduces NA which sparse Matrices do not support, thus filtering cannot not continue.

CRMetrics call:

crm$filterCms(file = "cms_filtered.rds", 
              depth_cutoff = depth_cutoff_vec, 
              mito_cutoff = 0.05, 
              species = "human",
              doublets = "doubletdetection")

Traceback:

Error in intI(j, n = x@Dim[2], dn[[2]], give.dn = FALSE) : 'NA' indices are not (yet?) supported for sparse Matrices
13.
stop("'NA' indices are not (yet?) supported for sparse Matrices")
12.
intI(j, n = x@Dim[2], dn[[2]], give.dn = FALSE)
11.
subCsp_cols(x, j, drop = drop)
10.
x[, j = j, drop = TRUE]
9.
x[, j = j, drop = TRUE]
8.
eval(call, parent.frame())
7.
eval(call, parent.frame())
6.
callGeneric(x, , j = j, drop = TRUE)
5.
x[, y]
4.
x[, y]
3.
(function (x, y) x[, y])(x = dots[[1L]][[1L]], y = dots[[2L]][[1L]])
2.
mapply(function(x, y) x[, y], x = cms, y = log_list)
1.
crm$filterCms(file = "cms_filtered.rds", depth_cutoff = depth_cutoff_vec, mito_cutoff = 0.05, species = "human", doublets = "doubletdetection")`

@flkick

FFriis commented 2 years ago

Extra documentation: NA introduced after DoubletDetection has been run image

flkick commented 2 years ago

Should be fixed in a5c2f0cb