Search
Question: FGSEA only runs with <1000 permutations
0
10 months ago by
shawn.w.foley0 wrote:

Hello,

I’ve downloaded the library from Bioconductor directly using the biocLite command and am currently running it in R version 3.3.3 “Another Canoe.”

When running the fgsea command the algorithm runs quickly (less than 1 second) for any number of permutations less than 1000, only taking 1.46 seconds to run when nperm=1000. I am examining 5,858 gene sets with 1,269 ranked genes and receiving reasonable results. However, the algorithm does not complete when running with more than 1000 permutations. I first tried to run 10,000 permutations and the command never completed, then found that even trying to run it with 1001 permutations results in the command running in an infinite loop.

How would you recommend proceeding?

modified 10 months ago by assaron140 • written 10 months ago by shawn.w.foley0
1
10 months ago by
assaron140
assaron140 wrote:

Can you check that BiocParallel package works? For example run:

library(BiocParallel)
example("bplapply")


It should finish withing seconds.

I'm having the same issue when I run example("bplapply") where the command is not completing. I've reinstalled BiocParallel with no change, the output is shown below. Do you have any advice? Thank you!

> library(BiocParallel)
> example("bplapply")

bplppl> showMethods("bplapply")
Function: bplapply (package BiocParallel)
X="ANY", BPPARAM="BatchJobsParam"
X="ANY", BPPARAM="DoparParam"
X="ANY", BPPARAM="list"
X="ANY", BPPARAM="missing"
X="ANY", BPPARAM="SerialParam"
X="ANY", BPPARAM="SnowParam"

bplppl> ## ten tasks (1:10) so ten calls to FUN default registered parallel
bplppl> ## back-end. Compare with bpvec.
bplppl> fun <- function(v) {
bplppl+     sqrt(v)
bplppl+ }
bplppl> bplapply(1:10, fun)



Not really sure how to deal with this. Can you try other parallel backend, for example running bplapply(1:10, sqrt, BPPARAM = SnowParam())? If it works, you can set BPPARAM option for fgsea.

Additionally, I would check that mclapply works by running mclapply(1:10, sqrt).

One more thing: you can try to ask a question directly about BiocParallel package. Probably its maintainers will be able to give an answer.