Got this error only when I enabled the future parallel. I'm using the latest develop version
Error in norm.function(data = if (margin == 1) { :
unused arguments (custom_function = function(x) {
return(log1p(x = x/(exp(x = sum(log1p(x = x[x > 0]), na.rm = TRUE)/length(x = x)))))
}, margin = margin)
Calls:
Hi,
Can you provide a reproducible example (or at very least the code you ran that generated the error)?
I see the same error when running NormalizeData() with future parallel turned on. Changing it back by plan("sequential") solves the problem. NormalizeData() is not parallelized anyway.
I had the same problem with NormalizeData() when using plan("multiprocess") in the development version of Seurat (Seurat_3.0.3.9029).
As @Ryan-Zhu pointed out, using plan("sequential") before NormalizeData() solved the issue.
@andrewwbutler
I tried on the PBMC data, got the error as well.
library(Seurat)
plan("multiprocess",workers=15)
options(future.globals.maxSize=5000*1024^2)
pbmc.data <- Read10X(data.dir = "filtered_gene_bc_matrices/hg19/")
pbmc <- CreateSeuratObject(counts = pbmc.data, project = "pbmc3k", min.cells = 3, min.features = 200)
pbmc[["percent.mt"]] <- PercentageFeatureSet(pbmc, pattern = "^MT-")
pbmc <- subset(pbmc, subset = nFeature_RNA > 200 & nFeature_RNA < 2500 & percent.mt < 5)
pbmc <- NormalizeData(pbmc, normalization.method = "LogNormalize", scale.factor = 10000)
Error in norm.function(data = if (margin == 1) { :
unused arguments (custom_function = function(x) {
return(log1p(x = x/(exp(x = sum(log1p(x = x[x > 0]), na.rm = TRUE)/length(x = x)))))
}, margin = margin)
Hi,
Thanks for reporting the bug. It should be fixed now in the latest development version if you try installing that.
Closing as I'm assuming this resolved this issue but feel free to reopen if not.
Most helpful comment
Hi,
Thanks for reporting the bug. It should be fixed now in the latest development version if you try installing that.