egeulgen / pathfindR

pathfindR: Enrichment Analysis Utilizing Active Subnetworks
https://egeulgen.github.io/pathfindR/
Other
178 stars 25 forks source link

failed to extract KEGG image path from response. Cannot download PNG file: NA #131

Closed Vinalti closed 2 years ago

Vinalti commented 2 years ago

Describe the bug When running the command run_pathfindR(RA_processed, pin_name_path='STRING', search_method = 'SA') on my data, I get results, but the diagrams don't get downloaded. It seem that the Image URL is empty : 'url' must be a length-one character vector

Final number of genes in input: 312
## Performing Active Subnetwork Search and Enrichment
## Processing the enrichment results over all iterations
## Annotating involved genes and visualizing enriched terms
Downloading pathway diagrams of 10 KEGG pathways
  |                                                                      |   0%
Cannot retrieve PNG url: hsa00565
Here's the original error message:
'color.pathway.by.objects()' failed to extract KEGG image path from response.
Cannot download PNG file: NA
Here's the original error message:
'url' must be a length-one character vector

When looking at tcpdump I can notice traffic leaving my computer for rest.kegg.jp and www.kegg.jp and some response coming.

To Reproduce Steps to reproduce the behavior:

  1. Prepare input with :
    RA_processed = input_processing(input = RA_input,  # the input: in this case, differential expression results
                                 p_val_threshold = 0.05, # p value threshold to filter significant genes
                                 pin_name_path  = "STRING", # the name of the PIN to use for active subnetwork search
                                 convert2alias = TRUE) # boolean indicating whether or not to convert missing symbols to alias symbols in the PIN
  2. Run the following function:
    run_pathfindR(RA_processed, pin_name_path='STRING', search_method = 'SA')
  3. See error

Expected behavior The images should be downloaded. As they actually exist on the KEGG website.

Screenshots If applicable, add screenshots to help explain your problem. image

Desktop (please complete the following information):

R Session Information: Please provide the R session information (by running sessionInfo())

R version 4.0.4 (2021-02-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 21.04

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
 [1] grid      parallel  stats4    stats     graphics  grDevices utils    
 [8] datasets  methods   base     

other attached packages:
 [1] pathfindR_1.6.3      pathfindR.data_1.1.2 biomaRt_2.46.3      
 [4] stringr_1.4.0        tidyr_1.1.3          ggdendro_0.1.23     
 [7] ggplot2_3.3.5        org.Hs.eg.db_3.12.0  AnnotationDbi_1.52.0
[10] IRanges_2.24.1       S4Vectors_0.28.1     Biobase_2.50.0      
[13] BiocGenerics_0.36.1  dplyr_1.0.7          edgeR_3.32.1        
[16] limma_3.46.0        

loaded via a namespace (and not attached):
 [1] bitops_1.0-7         bit64_4.0.5          doParallel_1.0.16   
 [4] progress_1.2.2       httr_1.4.2           repr_1.1.4          
 [7] bslib_0.3.0          tools_4.0.4          utf8_1.2.2          
[10] R6_2.5.1             DBI_1.1.2            colorspace_2.0-3    
[13] withr_2.5.0          tidyselect_1.1.1     gridExtra_2.3       
[16] prettyunits_1.1.1    bit_4.0.4            curl_4.3.2          
[19] compiler_4.0.4       graph_1.68.0         cli_3.2.0           
[22] xml2_1.3.2           labeling_0.4.2       sass_0.4.0          
[25] KEGGgraph_1.50.0     scales_1.1.1         askpass_1.1         
[28] rappdirs_0.3.3       pbdZMQ_0.3-7         digest_0.6.29       
[31] rmarkdown_2.11       XVector_0.30.0       base64enc_0.1-3     
[34] pkgconfig_2.0.3      htmltools_0.5.2      highr_0.9           
[37] dbplyr_2.1.1         fastmap_1.1.0        rlang_1.0.2         
[40] RSQLite_2.2.10       jquerylib_0.1.4      generics_0.1.0      
[43] farver_2.1.0         jsonlite_1.8.0       RCurl_1.98-1.5      
[46] magrittr_2.0.2       Rcpp_1.0.8.2         IRkernel_1.3.0.9000 
[49] munsell_0.5.0        fansi_1.0.2          viridis_0.6.1       
[52] lifecycle_1.0.1      yaml_2.2.1           stringi_1.7.4       
[55] ggraph_2.0.5         zlibbioc_1.36.0      MASS_7.3-55         
[58] BiocFileCache_1.14.0 blob_1.2.2           ggrepel_0.9.1       
[61] crayon_1.5.0         lattice_0.20-45      Biostrings_2.58.0   
[64] IRdisplay_1.1        graphlayouts_0.7.1   splines_4.0.4       
[67] KEGGREST_1.30.1      hms_1.1.1            magick_2.6.0 
[70] locfit_1.5-9.4       knitr_1.34           pillar_1.7.0        
[73] igraph_1.2.6         uuid_1.0-3           codetools_0.2-18    
[76] XML_3.99-0.8         glue_1.6.2           evaluate_0.15       
[79] png_0.1-7            vctrs_0.3.8          tweenr_1.0.2        
[82] foreach_1.5.2        gtable_0.3.0         openssl_2.0.0       
[85] purrr_0.3.4          polyclip_1.10-0      assertthat_0.2.1    
[88] cachem_1.0.6         xfun_0.26            ggforce_0.3.3       
[91] tidygraph_1.2.0      viridisLite_0.4.0    tibble_3.1.6        
[94] iterators_1.0.14     memoise_2.0.1        statmod_1.4.36      
[97] ellipsis_0.3.2  

Additional context Add any other context about the problem here. While pathfindR is an R package, the active subnetwork search functionality is written in Java. If you suspect any issue regarding java please provide your Java version (by running java --version)

egeulgen commented 2 years ago

We've been experiencing some issues due to KEGGREST. Can you check your version of KEGGREST?

If it's out-of-date, please update via:

devtools::install_github("Bioconductor/KEGGREST")
Vinalti commented 2 years ago

Indeed, my KEGGREST version was:

KEGGREST_1.30.1  

The command devtools::install_github("Bioconductor/KEGGREST") installed the version 1.37.3 Then I had to reload the module with library('KEGGREST')

And now it works, Thanks for the help ! ✅