Closed LTLA closed 4 years ago
My feeling is that I would not make this change; I don't know what the rationale of the batchtools authors is, but I presume they know best for their use case.
Sure, but the problem is that BiocParallel clients cannot use bplapply
and friends with BatchtoolsParam
without ensuring that all arguments in ...
are explicitly named. This was not, as far as I know, part of the bplapply
(or even lapply
) contract.
In my packages, most of my arguments are named, but this is not always the case, e.g., DelayedArray does not name its arguments. This has stymied a few recent attempts to parallelize some large analyses via Slurm.
Just to be sure we're on the same page, the problem is that you have not (yet) named args, not that there were technical reasons that you could not? I'm still not inclined to make a change.
All my own functions have named arguments. The actual problem is that DelayedArray's call stack for blockApply()
does not, because it re-uses the FUN
argument multiple times for different things. I raised this in the linked issue and it was punted here.
Fixed upstream (thanks @mllg !)
Migrated from Bioconductor/DelayedArray#72.
Say we have the following:
But switching over to
BatchtoolsParam
fails:For whatever reason, the batchtools authors decided that all arguments must be named, hence the assertion fail.
Short of convincing batchtools to drop this requirement, it seems like
bplapply
and related functions could protect users by checking for unnamed arguments and slapping names onto them according to their position. Probably something like: