bzhanglab / WebGestaltR

R package for WebGestalt
https://bzhanglab.github.io/WebGestaltR/
34 stars 14 forks source link

R session arborts when running WebGestaltR #6

Open janstrauss1 opened 4 years ago

janstrauss1 commented 4 years ago

Hi,

I'd like to use WebGestaltR for GSEA analysis but unfortunately my R 4.0.0 session keeps terminating when I run the following example code. Note that I run my code from RStudio 1.2.5042 and included a workaround to avoid an Error in makePSOCKcluster(names = spec, ...) that gets thrown otherwise.

> library(WebGestaltR)

## WORKAROUND: https://github.com/rstudio/rstudio/issues/6692
## Revert to 'sequential' setup of PSOCK cluster in RStudio Console on macOS and R 4.0.0
if (Sys.getenv("RSTUDIO") == "1" && !nzchar(Sys.getenv("RSTUDIO_TERM")) && 
    Sys.info()["sysname"] == "Darwin" && getRversion() == "4.0.0") {
  parallel:::setDefaultClusterOptions(setup_strategy = "sequential")
}

####### GSEA example #########
rankFile <- system.file("extdata", "GeneRankList.rnk", package="WebGestaltR")
outputDirectory <- getwd()
enrichResult <- WebGestaltR(enrichMethod="GSEA", 
                           organism="hsapiens", 
                           enrichDatabase="pathway_KEGG", 
                           interestGeneFile=rankFile, 
                           interestGeneType="genesymbol", 
                           sigMethod="top", 
                           topThr=10, 
                           minNum=5, 
                           outputDirectory=outputDirectory)

The progress runs until the permutations of score are complete before the sessions terminates:

Loading the functional categories...
Loading the ID list...
Summarizing the uploaded ID list by GO Slim data...
Performing the enrichment analysis...
1000 permutations of score complete...

I'd appreciate any help how to solve the issue. Many thanks in advance!

Jan

My sessionInfo()

R version 4.0.0 (2020-04-24)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Mojave 10.14.6

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] WebGestaltR_0.4.3

loaded via a namespace (and not attached):
 [1] igraph_1.2.5      Rcpp_1.0.4.6      whisker_0.4       magrittr_1.5      hms_0.5.3         tidyselect_1.0.0 
 [7] doParallel_1.0.15 lattice_0.20-41   R6_2.4.1          doRNG_1.8.2       rlang_0.4.6       foreach_1.5.0    
[13] httr_1.4.1        dplyr_0.8.5       rngtools_1.5      tools_4.0.0       parallel_4.0.0    grid_4.0.0       
[19] systemfonts_0.2.1 iterators_1.0.12  ellipsis_0.3.0    digest_0.6.25     assertthat_0.2.1  tibble_3.0.1     
[25] lifecycle_0.2.0   crayon_1.3.4      Matrix_1.2-18     readr_1.3.1       purrr_0.3.4       apcluster_1.4.8  
[31] vctrs_0.2.4       codetools_0.2-16  glue_1.4.0        compiler_4.0.0    pillar_1.4.4      gdtools_0.2.2    
[37] svglite_1.2.3     jsonlite_1.6.1    pkgconfig_2.0.3  
seifudd commented 4 years ago

Hi, I also tried to running WebGestaltR for GSEA analysis on R version 3.4.4 but I encounter the error below. It mainly points to the fact that the file or table hsapiens_GOSlim_CellularComponent.table is not available on the host http://www.webgestalt.org/.

trying URL 'http://www.webgestalt.org//data/goslim/hsapiens_GOSlim_CellularComponent.table' Error in download.file(input, tmpFile, method = method, mode = "wb", quiet = !showProgress) : cannot open URL 'http://www.webgestalt.org//data/goslim/hsapiens_GOSlim_CellularComponent.table' In addition: Warning messages: 1: In dir.create(projectDir) : '/data/NHLBI_BCB/Larochelle_Andre/05_Notch_Hypoxia_RNAseq/07-limma-DGE/04-runWebGesstaltR-v2/Project_hypoxia_Vs_notch_hypoxia_GSEA_custom_pathways' already exists 2: In download.file(input, tmpFile, method = method, mode = "wb", quiet = !showProgress) : cannot open URL 'http://www.webgestalt.org//data/goslim/hsapiens_GOSlim_CellularComponent.table': HTTP status was '404 Not Found'

Any help will be appreciated.

yxngl commented 4 years ago

Sorry guys. I am not sure why Github did not send me email notifications.

@seifudd This is due to a old version, so package update is recommended.

@janstrauss1 I just tested on R 4.0.2 on Windows and it seems fine. I guess the problem is not here and have to wait for RStudio to solve it. Do you have problems without RStudio? Unfortunately I cannot test on Mac when working from home and no one knows how long it will last.