Skip to content

Unnamed arguments in blockApply breaks in BatchtoolsParam #72

@LTLA

Description

@LTLA
library(TENxBrainData)
sce <- TENxBrainData()

library(BiocParallel)
BPPARAM <- BatchtoolsParam(5, resources = list(walltime = 3600, memory = 8000, ncpus = 1), cluster = "slurm")
blockApply(counts(sce), FUN=function(x) { write(1, file=tempfile(tmpdir="dumpster")) }, BPPARAM=BPPARAM)

The value of FUN doesn't really matter, but anyway, this is what I get:

## Error in batchtools::batchMap(fun = FUN, X, more.args = list(...), reg = registry) :
##  Assertion on 'more.args' failed: Must have names.

It seems that the calls to viewportApply and bplapply2 need to name their non-... arguments. I'm looking at it now and this is a bit of a headache because FUN and verbose are re-used so many times. Maybe we need .FUN and ..FUN, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions