egeulgen / pathfindR

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

Issues with KEGGgraph and retrieving KEGG pngs #121

Closed apelin20 closed 2 years ago

apelin20 commented 2 years ago

Hello,

pathfindR is failing to download KEGG pngs (sorry have to use pastebin):

https://pastebin.com/t7iv3K9j

I believe the issue is with KEGGgraph:

https://pastebin.com/d7n6syyP

Where in pathfindR can I replace the code of using KEGGgraph to download KEGG pngs with something else?

KEGGgraph_1.50.0 R ver 4.0.2 pathfindR Version: 1.6.3

Thanks, Adrian

egeulgen commented 2 years ago

Hey,

If this persists, please raise an issue with KEGGgraph.

Meanwhile, if visualization is not necessary, you may set visualize_enriched_terms=FALSE in run_pathfindR() and you could also visualize the enriched terms later via visualize_terms()

Hope this helps, -E

apelin20 commented 2 years ago

I was wondering if you could help me with this function. I first run

RA_output <- run_pathfindR(input, n_processes=8, adj_method = "fdr", p_val_threshold = 0.05, gene_sets = "KEGG", output_dir = outputdir, convert2alias = TRUE, visualize_enriched_terms = FALSE)

That completes without error. Then I run:

visualize_terms(RA_output, input_processed = TRUE, hsa_KEGG = TRUE, pin_name_path = "KEGG")

but get error:

Error in visualize_hsa_KEGG(hsa_kegg_ids = result_df$ID, input_processed = input_processed,  : 
  `input_processed` should be a data frame
Calls: visualize_terms -> visualize_hsa_KEGG
Execution halted

Since I already did run_pathfindR, I was feeding the output to visualize_terms, but somehow I am not doing it correctly.

egeulgen commented 2 years ago

as the error states you should provide the processed input data frame for input_processed. This can be achieved via input_processing ()

apelin20 commented 2 years ago

Thanks, that was an easy fix. Going back to KEGG pathways and KEGGgraph error. Is there any way I can download all the KEGG pathways from here for example (https://www.kegg.jp/kegg/download/Readme/README.pathway) and point pathfindR to them locally?

egeulgen commented 2 years ago

I'm afraid that's not possible. However, updating to the latest version of KEGGREST resolves the issue. To be clear, you don't need KEGGgraph

apelin20 commented 2 years ago

Thanks Ege, I got the same answer from KEGGREST - https://github.com/Bioconductor/KEGGREST/issues/12

installing through install_github("Bioconductor/KEGGREST") did the trick.