YuLab-SMU / clusterProfiler

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

change in name of wikipathway file and enrichWP function do not work anymore #674

Closed boutrys closed 3 months ago

boutrys commented 3 months ago

Hello,

My code is not working anymore,

ego <- clusterProfiler::enrichWP(gene = base::unique(ids_geneList[,2]), organism = "Homo sapiens", universe = background_gene, pAdjustMethod = "BH", qvalueCutoff = cutoff)

and the error is as follow

Error in file(con, "r") : cannot open the connection to 'https://wikipathways-data.wmcloud.org/current/gmt/wikipathways-20240311-gmt-Homo_sapiens.gmt' In addition: Warning message: In file(con, "r") : cannot open URL 'https://data.wikipathways.org/current/gmt/wikipathways-20240311-gmt-Homo_sapiens.gmt': HTTP status was '404 Not Found'

Indeed I've checked

https://data.wikipathways.org/current/gmt/

and now I guess it should be wikipathways-20240310-gmt-Homo_sapiens.gmt (https://data.wikipathways.org/current/gmt/wikipathways-20240310-gmt-Homo_sapiens.gmt)

All files in wikipathways have been updated 3 das ago,

Can someone fix this please ?

Thanks in advance and wonderfull package by the way :)

Best,

Simon

guidohooiveld commented 3 months ago

FYI: when using the latest version of clusterProfiler, the function enrichWP works as expected....: There has been an issue with WikiPathways few months ago, but that has been resolved.

> library(clusterProfiler)
> data(geneList, package='DOSE')
> de <- names(geneList)[1:100]
> 
> 
> yy <- enrichWP(de, organism= c("Homo sapiens"), pvalueCutoff=0.05, pAdjustMethod = "BH")
> 
> yy
#
# over-representation test
#
#...@organism    Homo sapiens 
#...@ontology    WikiPathways 
#...@keytype     ENTREZID 
#...@gene        chr [1:100] "4312" "8318" "10874" "55143" "55388" "991" "6280" "2305" ...
#...pvalues adjusted by 'BH' with cutoff <0.05 
#...15 enriched terms found
'data.frame':   15 obs. of  9 variables:
 $ ID         : chr  "WP2446" "WP2361" "WP179" "WP5039" ...
 $ Description: chr  "Retinoblastoma gene in cancer" "Gastric cancer network 1" "Cell cycle" "SARS CoV 2 innate immunity evasion and cell specific immune response" ...
 $ GeneRatio  : chr  "9/60" "6/60" "7/60" "5/60" ...
 $ BgRatio    : chr  "89/8421" "28/8421" "120/8421" "66/8421" ...
 $ pvalue     : num  1.04e-08 3.38e-08 2.07e-05 9.93e-05 1.18e-04 ...
 $ p.adjust   : num  1.78e-06 2.91e-06 1.19e-03 4.07e-03 4.07e-03 ...
 $ qvalue     : num  1.45e-06 2.37e-06 9.66e-04 3.31e-03 3.31e-03 ...
 $ geneID     : chr  "8318/9133/7153/6241/890/983/81620/7272/1111" "4605/7153/11065/22974/6286/6790" "8318/991/9133/890/983/7272/1111" "3627/10563/6373/4283/3902" ...
 $ Count      : int  9 6 7 5 3 8 6 3 3 3 ...
#...Citation
 T Wu, E Hu, S Xu, M Chen, P Guo, Z Dai, T Feng, L Zhou, W Tang, L Zhan, X Fu, S Liu, X Bo, and G Yu.
 clusterProfiler 4.0: A universal enrichment tool for interpreting omics data.
 The Innovation. 2021, 2(3):100141 

> 
> as.data.frame(yy)[1:5,]
           ID
WP2446 WP2446
WP2361 WP2361
WP179   WP179
WP5039 WP5039
WP4240 WP4240
                                                                          Description
WP2446                                                  Retinoblastoma gene in cancer
WP2361                                                       Gastric cancer network 1
WP179                                                                      Cell cycle
WP5039           SARS CoV 2 innate immunity evasion and cell specific immune response
WP4240 Regulation of sister chromatid separation at the metaphase anaphase transition
       GeneRatio  BgRatio       pvalue     p.adjust       qvalue
WP2446      9/60  89/8421 1.037133e-08 1.783869e-06 1.451987e-06
WP2361      6/60  28/8421 3.379083e-08 2.906011e-06 2.365358e-06
WP179       7/60 120/8421 2.069085e-05 1.186275e-03 9.655731e-04
WP5039      5/60  66/8421 9.930464e-05 4.072512e-03 3.314835e-03
WP4240      3/60  14/8421 1.183870e-04 4.072512e-03 3.314835e-03
                                            geneID Count
WP2446 8318/9133/7153/6241/890/983/81620/7272/1111     9
WP2361             4605/7153/11065/22974/6286/6790     6
WP179              8318/991/9133/890/983/7272/1111     7
WP5039                   3627/10563/6373/4283/3902     5
WP4240                               991/1062/4085     3
> 
> packageVersion("clusterProfiler")
[1] ‘4.10.1’
> 
> 
boutrys commented 3 months ago

Problem has been fixed,

I was also using latest version of clusterProfiler, but last week it wasn't working,

Thanks a lot for letting me know @guidohooiveld

I'll close the issue