Search
Question: FGSEA only runs with <1000 permutations
0
gravatar for shawn.w.foley
3 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?

ADD COMMENTlink modified 3 months ago by assaron130 • written 3 months ago by shawn.w.foley0
1
gravatar for assaron
3 months ago by
assaron130
assaron130 wrote:

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

library(BiocParallel)
example("bplapply")

It should finish withing seconds.

ADD COMMENTlink modified 3 months ago • written 3 months ago by assaron130

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+     message("working") ## 10 tasks
bplppl+     sqrt(v)
bplppl+ }
bplppl> bplapply(1:10, fun)

 

ADD REPLYlink modified 3 months ago • written 3 months ago by shawn.w.foley0

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).

ADD REPLYlink written 3 months ago by assaron130

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

ADD REPLYlink written 3 months ago by assaron130

Running fgsea with BPPARAM = SnowParam() works with no problem! Thank you for the help.

ADD REPLYlink written 3 months ago by shawn.w.foley0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 236 users visited in the last hour