YuLab-SMU / clusterProfiler

:bar_chart: A universal enrichment tool for interpreting omics data
https://yulab-smu.top/biomedical-knowledge-mining-book/
1.03k stars 256 forks source link

enrichWP is not working for a few organisms #729

Open prateekgv opened 1 month ago

prateekgv commented 1 month ago

R version 4.3.1

packageVersion("clusterProfiler") ‘4.10.1’

get_wp_organisms() gives: "Caenorhabditis elegans" "Bos taurus" "Arabidopsis thaliana"

guidohooiveld commented 1 month ago

Mmm, did you also try with the latest version of clusterProfiler (and R)? It is working in my hands....

> get_wp_organisms() 
 [1] "Anopheles gambiae"        "Arabidopsis thaliana"    
 [3] "Bos taurus"               "Caenorhabditis elegans"  
 [5] "Canis familiaris"         "Danio rerio"             
 [7] "Drosophila melanogaster"  "Equus caballus"          
 [9] "Gallus gallus"            "Homo sapiens"            
[11] "Mus musculus"             "Pan troglodytes"         
[13] "Populus trichocarpa"      "Rattus norvegicus"       
[15] "Saccharomyces cerevisiae" "Solanum lycopersicum"    
[17] "Sus scrofa"               "Zea mays"                
> packageVersion("clusterProfiler")
[1] ‘4.12.6’
> R.Version()$version.string
[1] "R version 4.4.0 Patched (2024-05-21 r86580 ucrt)"
>
prateekgv commented 1 month ago

Is there a way to fix the issue for the older R version (4.3.1)? I am dependent on this version of R for my analysis because several other packages in my pipeline use this version of R.

guidohooiveld commented 1 month ago

The issue is that the URL of WikiPathways has meanwhile been changed.

Yet, a quick-and-dirty hack may be to source the current WikiPathways 'module' in your R-4.3.1.

Doing this in R-4.3.0 that I still have installed:

> library(clusterProfiler)
> 
> source("https://raw.githubusercontent.com/YuLab-SMU/clusterProfiler/refs/heads/devel/R/wikiPathways.R")
> 
> get_wp_organisms() 
 [1] "Anopheles gambiae"        "Arabidopsis thaliana"    
 [3] "Bos taurus"               "Caenorhabditis elegans"  
 [5] "Canis familiaris"         "Danio rerio"             
 [7] "Drosophila melanogaster"  "Equus caballus"          
 [9] "Gallus gallus"            "Homo sapiens"            
[11] "Mus musculus"             "Pan troglodytes"         
[13] "Populus trichocarpa"      "Rattus norvegicus"       
[15] "Saccharomyces cerevisiae" "Solanum lycopersicum"    
[17] "Sus scrofa"               "Zea mays"                
> 
> packageVersion("clusterProfiler")
[1] ‘4.10.1’
> 
> R.Version()$version.string
[1] "R version 4.3.0 (2023-04-21 ucrt)"
> 
>