sva: Parallel execution of sva()-function fails.
1
1
Entering edit mode
maltethodberg ▴ 170
@maltethodberg-9690
Last seen 11 days ago
Denmark

I have been trying to calculate SVs using the sva-package in parallel, but no matter what backend I use, it always fails. Consider for examples this example code based on the vignette:

library(parallel)
library(BiocParallel)
library(sva)
library(bladderbatch)
data(bladderdata)

# Data from the vignette
pheno <- pData(bladderEset)
edata <- exprs(bladderEset)
mod <- model.matrix(~as.factor(cancer), data=pheno)

# Serial execution (Works)
svaSerial <- lapply(1:3, function(x) sva(dat=edata, mod=mod, n.sv=x))

# Parallel execution using parallel (Fails)
svaSerial <- mclapply(1:3, function(x) sva(dat=edata, mod=mod, n.sv=x), mc.cores=3)

# Parallel execution using BioC (Fails)
svaSerial <- bplapply(1:5, function(x) sva(dat=edata, mod=mod, n.sv=x), BPPARAM=MulticoreParam(workers=3))

 The code executes just fine under lapply, but mclapply, bpapply, etc. fails, without any informative error messages.

Any ideas why this is?

sva parallel • 1.5k views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 7 days ago
United States

A simpler example might be

bplapply(1:2, sqrt, BPPARAM=MulticoreParam(2))

In BiocParallel version 1.8.1 or later you might try

options(bphost="localhost")
bplapply(1:2, sqrt, BPPARAM=MulticoreParam(2))

There might also be an issue with blocked ports. BiocParallel chooses a random port between 11000 and 12000. If these are blocked, specify an open port with

options(port=12345)
ADD COMMENT

Login before adding your answer.

Traffic: 521 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