dviraran / SingleR

SingleR: Single-cell RNA-seq cell types Recognition (legacy version)
GNU General Public License v3.0
276 stars 98 forks source link

Error in get("mcinteractive", pkg) #55

Closed hfberg closed 5 years ago

hfberg commented 5 years ago

Hi! Now I've used SingleR for a while without problems, but this weekend I got this issue and today I haven't been able to find the root of the problem. Does anyone know what this is?

`> singler<-CreateBigSingleRObject(counts=seurat@raw.data, annot = NULL, project.name="test123", xy=seurat@dr$tsne@cell.embeddings, clusters=seurat@ident,N=max.cell) [1] 1 [1] "Dimensions of counts data: 14401x200" [1] "Annotating data with HPCA..." [1] "Variable genes method: de" [1] "Number of DE genes:2706" [1] "Number of cells: 200" [1] "Fine-tuning round on top cell types (using 16 CPU cores):" Error in get("mcinteractive", pkg) : object 'mcinteractive' not found

traceback() 8: get("mcinteractive", pkg) 7: .customized_mcparallel({ result <- mclapply(X, function(...) { res <- FUN(...) writeBin(1L, progressFifo) return(res) }, ..., mc.cores = mc.cores, mc.preschedule = mc.preschedule, mc.set.seed = mc.set.seed, mc.cleanup = mc.cleanup, mc.allow.recursive = mc.allow.recursive) if ("try-error" %in% sapply(result, class)) { writeBin(-1L, progressFifo) } close(progressFifo) result }) 6: pbmclapply(1:N, FUN = function(i) { max_score = max(scores[i, ]) topLabels = names(scores[i, scores[i, ] >= max_score - fine.tune.thres]) if (length(topLabels) == 0) { return(names(which.max(scores[i, ]))) } else { k = 1 while (length(topLabels) > 1) { topLabels = fineTuningRound(topLabels, types, ref_data, genes, mean_mat[, topLabels], sd.thres, sc_data[, i], quantile.use, fine.tune.thres) k = k + 1 } return(topLabels) } }, mc.cores = numCores) 5: SingleR.FineTune(sc_data, ref_data, types, output$scores, quantile.use, fine.tune.thres, genes = genes, sd.thres, mat, numCores = numCores) 4: SingleR("single", sc.data, ref$data, types = types, sd.thres = ref$sd.thres, genes = variable.genes, fine.tune = fine.tune, numCores = numCores) 3: SingleR.CreateObject(sc.data.gl, hpca, clusters, species, citation, technology, do.main.types = do.main.types, variable.genes = variable.genes, fine.tune = fine.tune, numCores = numCores) 2: CreateSinglerObject(counts[, A], annot = annot[A], project.name = project.name, min.genes = min.genes, technology = technology, species = species, citation = citation, do.signatures = do.signatures, clusters = NULL, numCores = numCores) 1: CreateBigSingleRObject(counts = seurat@raw.data, annot = NULL, project.name = "test123", xy = seurat@dr$tsne@cell.embeddings, clusters = seurat@ident, N = max.cell)`

dviraran commented 5 years ago

My guess is that there is some kind of memory failure. Try reducing numCores to 8 instead of 16.

I also strongly suggest using seurat@data instead of raw.data. raw.data is not filtered while the rest of the data from seurat is (clusters, xy).

hfberg commented 5 years ago

Ah, yes, ofc i should use the seurat@data, tnx:)

I reduced the numCores and also freed space on my computer, but that did not help I'm afraid.

> singler<-CreateBigSingleRObject(counts=seurat@data, annot = NULL, project.name="test123", xy=seurat@dr$tsne@cell.embeddings, clusters=seurat@ident,N=max.cell, numCores = 8)
[1] 1
[1] "Dimensions of counts data: 14401x200"
[1] "Annotating data with HPCA..."
[1] "Variable genes method: de"
[1] "Number of DE genes:2706"
[1] "Number of cells: 200"
[1] "Fine-tuning round on top cell types (using 8 CPU cores):"
Error in get("mcinteractive", pkg) : object 'mcinteractive' not found
hfberg commented 5 years ago

For future users: This problem occurred because of an update in pbmcapply making it incompatible with R 3.4.4, I solved the problem by updating to R 3.5.3