BiocParallel icon indicating copy to clipboard operation
BiocParallel copied to clipboard

DoparParam: Disable capturing of stdout?

Open HenrikBengtsson opened this issue 7 months ago • 0 comments

Is it possible to disable capturing of stdout? Specifically, is there an option/argument I can pass such that the following output does not appear:

> library(BiocParallel)
> y <- bplapply(1:2, print, BPPARAM = BiocParallel::DoparParam())
[1] 1
[1] 2

?

I'm aware of capture.output() etc, but I want to prevent it from being captured in the first place.

I understand that .bpworker_EXEC() takes argument sink.sout;

https://github.com/Bioconductor/BiocParallel/blob/9e2db5de5f145509e494dd7668aefb2b82e6b21f/R/worker.R#L297-L298

but it looks like DoparParam does not allow me to pass that argument:

https://github.com/Bioconductor/BiocParallel/blob/9e2db5de5f145509e494dd7668aefb2b82e6b21f/R/DoparParam-class.R#L99

In contrast, it looks like SerialParam supports it:

https://github.com/Bioconductor/BiocParallel/blob/9e2db5de5f145509e494dd7668aefb2b82e6b21f/R/SerialParam-class.R#L150

If not supported right now, would you consider to add way to disable it?

HenrikBengtsson avatar May 19 '25 04:05 HenrikBengtsson