BiocParallel (and DESeq2) - wrong args for environment subassignment
2
0
Entering edit mode
Benjamin • 0
@46be5324
Last seen 23 hours ago
France

Hello,

I am encountering a fully reproducible failure when running DESeq2 in parallel using MulticoreParam on macOS (ARM). The error appears to originate inside BiocParallel and occurs even on trivial bplapply() examples.

Below is a complete minimal example, the full traceback, and my sessionInfo().


Minimal reproducible example

library(DESeq2)
library(BiocParallel)
set.seed(1)
dds <- makeExampleDESeqDataSet(n=1000, m=6)
dds <- DESeq(dds, parallel=TRUE, BPPARAM=MulticoreParam(4))

Output:

estimating size factors
estimating dispersions
gene-wise dispersion estimates: 4 workers
mean-dispersion relationship
final dispersion estimates, fitting model and testing: 4 workers
Warning in parallel::mccollect(wait = FALSE, timeout = 1) :
  1 parallel job did not deliver a result
Error in h(simpleError(msg, call)) :
  error in evaluating the argument 'args' in selecting a method for function 'do.call': wrong args for environment subassignment

Independent BiocParallel failure (no DESeq2)

library(BiocParallel)
param <- MulticoreParam(workers = 4)
x <- 1:12
res <- bplapply(X = x, FUN = \(i) i^2, BPPARAM = param)

Produces:

Warning in parallel::mccollect(wait = TRUE) :
  3 parallel jobs did not deliver results
Error in h(simpleError(msg, call)) :
  error in evaluating the argument 'args' in selecting a method for function 'do.call': wrong args for environment subassignment

FULL TRACEBACK (VERBATIM)

Error in h(simpleError(msg, call)) :
error in evaluating the argument 'args' in selecting a method for function 'do.call': wrong args for environment subassignment
12.
.reducer_add(reducer, njob, value)
11.
.reducer_add(reducer, njob, value)
10.
.collect_result(manager, reducer, progress, BPPARAM)
9.
.bploop_impl(ITER = ITER, FUN = FUN, ARGS = ARGS, BPPARAM = BPPARAM,
BPOPTIONS = BPOPTIONS, BPREDO = BPREDO, reducer = reducer,
progress.length = length(redo_index))
8.
bploop.lapply(manager, BPPARAM = BPPARAM, BPOPTIONS = BPOPTIONS,
...)
7.
bploop(manager, BPPARAM = BPPARAM, BPOPTIONS = BPOPTIONS, ...)
6.
.bpinit(manager = manager, X = X, FUN = FUN, ARGS = ARGS, BPPARAM = BPPARAM,
BPOPTIONS = BPOPTIONS, BPREDO = BPREDO)
5.
bplapply(levels(idx), function(l) {
objectSub <- estimateDispersionsMAP(object[idx == l, ], dispPriorVar = dispPriorVar,
quiet = TRUE, modelMatrix = modelMatrix)
nbinomWaldTest(objectSub, betaPrior = FALSE, quiet = TRUE, ...
4.
bplapply(levels(idx), function(l) {
objectSub <- estimateDispersionsMAP(object[idx == l, ], dispPriorVar = dispPriorVar,
quiet = TRUE, modelMatrix = modelMatrix)
nbinomWaldTest(objectSub, betaPrior = FALSE, quiet = TRUE, ...
3.
do.call(rbind, bplapply(levels(idx), function(l) {
objectSub <- estimateDispersionsMAP(object[idx == l, ], dispPriorVar = dispPriorVar,
quiet = TRUE, modelMatrix = modelMatrix)
nbinomWaldTest(objectSub, betaPrior = FALSE, quiet = TRUE, ...
2.
DESeqParallel(object, test = test, fitType = fitType, betaPrior = betaPrior,
full = full, reduced = reduced, quiet = quiet, modelMatrix = modelMatrix,
useT = useT, minmu = minmu, BPPARAM = BPPARAM)
1.
DESeq(dds, parallel = TRUE, BPPARAM = MulticoreParam(4))

sessionInfo()

R version 4.5.2 (2025-10-31)
Platform: aarch64-apple-darwin20
Running under: macOS Tahoe 26.1

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.1

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/Paris
tzcode source: internal

attached base packages:
[1] stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] BiocParallel_1.44.0         DESeq2_1.50.2              
 [3] SummarizedExperiment_1.40.0 Biobase_2.70.0             
 [5] MatrixGenerics_1.22.0       matrixStats_1.5.0          
 [7] GenomicRanges_1.62.0        Seqinfo_1.0.0              
 [9] IRanges_2.44.0              S4Vectors_0.48.0           
[11] BiocGenerics_0.56.0         generics_0.1.4             

loaded via a namespace (and not attached):
 [1] Matrix_1.7-4        gtable_0.3.6        BiocManager_1.30.27
 [4] dplyr_1.1.4         compiler_4.5.2      tidyselect_1.2.1   
 [7] Rcpp_1.1.0          parallel_4.5.2      scales_1.4.0       
[10] yaml_2.3.11         fastmap_1.2.0       lattice_0.22-7     
[13] ggplot2_4.0.1       R6_2.6.1            XVector_0.50.0     
[16] S4Arrays_1.10.0     knitr_1.50          tibble_3.3.0       
[19] DelayedArray_0.36.0 pillar_1.11.1       RColorBrewer_1.1-3 
[22] rlang_1.1.6         xfun_0.54           S7_0.2.1           
[25] SparseArray_1.10.2  cli_3.6.5           magrittr_2.0.4     
[28] locfit_1.5-9.12     digest_0.6.39       grid_4.5.2         
[31] rstudioapi_0.17.1   lifecycle_1.0.4     vctrs_0.6.5        
[34] evaluate_1.0.5      glue_1.8.0          farver_2.1.2       
[37] codetools_0.2-20    abind_1.4-8         rmarkdown_2.30     
[40] pkgconfig_2.0.3     tools_4.5.2         htmltools_0.5.8.1

Questions

  1. Is this a known issue with MulticoreParam on macOS ARM?

Thank you for your help.

BiocParallel DESeq2 • 491 views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 15 hours ago
United States

The DESeq2 error makes sense, as we've talked about, given that the simple bplapply isn't working in your setup.

Maybe give the traceback for the bplapply example. Debugging the simple case is always easier.

ADD COMMENT
0
Entering edit mode

BTW, I tested with no issue on MacOS ARM on our previous github issue.

ADD REPLY
0
Entering edit mode

Still happening

using pre-existing size factors
estimating dispersions
gene-wise dispersion estimates: 15 workers
mean-dispersion relationship
final dispersion estimates, fitting model and testing: 15 workers
Warning in parallel::mccollect(wait = FALSE, timeout = 1) :
  1 parallel job did not deliver a result
Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'args' in selecting a method for function 'do.call': wrong args for environment subassignment
ADD REPLY
0
Entering edit mode
Benjamin • 0
@46be5324
Last seen 23 hours ago
France

Still happening in a clean install

ADD COMMENT
0
Entering edit mode

Given that this is an issue with BiocParallel on your machine and we have a minimal reproducible example, you may want to repost the issue.

Here I changed the post title to make it more clear, but you may have missed the attention of package maintainers.

Try using the minimal example (the one I suggested on github)

ADD REPLY
0
Entering edit mode

I see rstudioapi in the sessionInfo(). RStudio does not support forked ('multicore') processes. Does the BiocParallel example work when you choose a different back-end, e.g., SerialParam() (no parallelism) or SnowParam()(sometimes called 'multi-session' parallelism) with 4 workers? Alternatively, does the BiocParallel example work when not using RStudio?

ADD REPLY

Login before adding your answer.

Traffic: 1168 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6