YuLab-SMU / clusterProfiler

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

Error in download.KEGG.Path(species) #305

Open shenshenwu5 opened 3 years ago

shenshenwu5 commented 3 years ago

Hi, Prof. Yu, Thanks for your software to make it convenient for me to do analysis. But i meet some unsloved probblems and need your help. I can use R/clusterProfiler until two days ago, but it suddenly unable to use normally when do enrichKEGG.

image i use the right organism name for maize, but it said can't search. And i trid 'hsa', but it work well. I google the same problem, some sad the problem is the network. And my browser showed i can open the KEGG website. So I don't known how to solve this problem, and hope you can help me to solve it.

Thanks; image image image

shenshenwu5 commented 3 years ago

I just used the same script as three days ago, and this problem occurred.

shenshenwu5 commented 3 years ago

what's more, it works well with enrichGO.

huerqiang commented 3 years ago

@shenshen-wu This is indeed a network problem, you can close R and run again. In addition, the versions of your R and R packages (such as clusterProfiler, GO.db) are too old, I suggest you update them.

shenshenwu5 commented 3 years ago

Thanks, it works well after three days. It seems that this problem turely because of the network. But i still hope this can be improved in the next version.

Thanks for your replay~

gaospecial commented 3 years ago

Thanks, it works well after three days. It seems that this problem turely because of the network. But i still hope this can be improved in the next version.

Thanks for your replay~

I have encounter such issues many times. But for the first time, I found the REST api raised a HTTP 400 error this week, and this error is only found for some of the request.

I have to say the KEGG database is unstable sometimes.

GuangchuangYu commented 3 years ago

should works in newest version, see https://github.com/YuLab-SMU/clusterProfiler/issues/256#issuecomment-773907348.

mdtorohernando commented 2 years ago

thank you for your comments, today, after reinstalling all the packages I have found a new error, it seems to be Kegg database

kk_up = enrichKEGG(gene = gene_up, organism = 'mmu', pvalueCutoff = 0.05, qvalueCutoff = 0.05, use_internal_data = F)
Reading KEGG annotation online:

fail to download KEGG data... Error in download.KEGG.Path(species) : 'species' should be one of organisms listed in 'http://www.genome.jp/kegg/catalog/org_list.html'... Además: Warning message: In utils::download.file(url, quiet = TRUE, method = method, ...) : URL 'http://rest.kegg.jp/link/mmu/pathway': status was 'Couldn't connect to server'

I attach my sessionInfo.

I don't know how to solve that.

Thanks

sessionInfo.annot.txt

minglu-xie commented 2 years ago

If you run library(clusterProfiler) getOption("clusterProfiler.download.method") You may get the answer "libcurl". Actually this may be the reason why you cannot download KEGG data. You can try this install.packages("R.utils")

library(R.utils)

R.utils::setOption("clusterProfiler.download.method","auto") Then it should work to download KEGG data. ----From teacher Jimmy

Leandromvelez commented 2 years ago

If you run library(clusterProfiler) getOption("clusterProfiler.download.method") You may get the answer "libcurl". Actually this may be the reason why you cannot download KEGG data. You can try this install.packages("R.utils")

library(R.utils)

R.utils::setOption("clusterProfiler.download.method","auto") Then it should work to download KEGG data. ----From teacher Jimmy

It worked for me! Thank you @ml-john and teacher Jimmy

Guerande29 commented 2 years ago

Oh thank you. I was having this problem and I can solve reading this issue.

And I take this opportunity to ask: How can I make the graphic visualization of the KEGG for clustercompare using fun=enrichKEGG? Could you show me some command lines, especially I would like to visualize the pathway with the genes

Thanks,

rimorob commented 1 year ago

I'm having the same problem. I've reinstalled clusterProfiler, installed R.utils, tried setting the download method to auto, etc. No luck. R version 4.1.2. Session info output: other attached packages: [1] R.utils_2.12.2 R.oo_1.25.0 R.methodsS3_1.8.2 clusterProfiler_4.0.5

loaded via a namespace (and not attached): [1] fgsea_1.18.0 colorspace_2.0-3 ggtree_3.0.4 qvalue_2.24.0
[5] XVector_0.32.0 GenomicRanges_1.44.0 aplot_0.1.8 rstudioapi_0.14
[9] farver_2.1.1 graphlayouts_0.8.3 ggrepel_0.9.2 bit64_4.0.5
[13] AnnotationDbi_1.54.1 fansi_1.0.3 scatterpie_0.1.8 splines_4.1.2
[17] cachem_1.0.6 GOSemSim_2.18.1 geneplotter_1.70.0 polyclip_1.10-4
[21] jsonlite_1.8.3 annotate_1.70.0 GO.db_3.13.0 png_0.1-7
[25] ggforce_0.4.1 compiler_4.1.2 httr_1.4.4 assertthat_0.2.1
[29] Matrix_1.5-3 fastmap_1.1.0 lazyeval_0.2.2 cli_3.4.1
[33] tweenr_2.0.2 tools_4.1.2 igraph_1.3.5 gtable_0.3.1
[37] glue_1.6.2 GenomeInfoDbData_1.2.6 reshape2_1.4.4 DO.db_2.9
[41] dplyr_1.0.10 fastmatch_1.1-3 Rcpp_1.0.9 enrichplot_1.12.3
[45] Biobase_2.52.0 vctrs_0.5.0 Biostrings_2.60.2 ape_5.6-2
[49] nlme_3.1-155 ggraph_2.1.0 stringr_1.4.1 lifecycle_1.0.3
[53] XML_3.99-0.12 DOSE_3.18.3 zlibbioc_1.38.0 MASS_7.3-55
[57] scales_1.2.1 tidygraph_1.2.2 MatrixGenerics_1.4.3 parallel_4.1.2
[61] SummarizedExperiment_1.22.0 RColorBrewer_1.1-3 memoise_2.0.1 gridExtra_2.3
[65] ggplot2_3.4.0 downloader_0.4 ggfun_0.0.8 yulab.utils_0.0.5
[69] stringi_1.7.8 RSQLite_2.2.18 genefilter_1.74.1 S4Vectors_0.30.2
[73] tidytree_0.4.1 BiocGenerics_0.38.0 BiocParallel_1.26.2 GenomeInfoDb_1.28.4
[77] rlang_1.0.6 pkgconfig_2.0.3 bitops_1.0-7 matrixStats_0.62.0
[81] lattice_0.20-45 purrr_0.3.5 treeio_1.16.2 patchwork_1.1.2
[85] cowplot_1.1.1 shadowtext_0.1.2 bit_4.0.4 tidyselect_1.2.0
[89] plyr_1.8.8 magrittr_2.0.3 DESeq2_1.32.0 R6_2.5.1
[93] IRanges_2.26.0 generics_0.1.3 DelayedArray_0.18.0 DBI_1.1.3
[97] pillar_1.8.1 withr_2.5.0 survival_3.2-13 KEGGREST_1.32.0
[101] RCurl_1.98-1.9 tibble_3.1.8 crayon_1.5.2 utf8_1.2.2
[105] viridis_0.6.2 locfit_1.5-9.6 grid_4.1.2 data.table_1.14.4
[109] blob_1.2.3 digest_0.6.30 xtable_1.8-4 tidyr_1.2.1
[113] gridGraphics_0.5-1 stats4_4.1.2 munsell_0.5.0 viridisLite_0.4.1
[117] ggplotify_0.1.0

rimorob commented 1 year ago

Actually, this fixed it: R.utils::setOption("clusterProfiler.download.method","wget")

rintukutum commented 1 year ago

For Mac M1 users, R.utils::setOption("clusterProfiler.download.method","curl")

lucygarner commented 1 year ago

What is the appropriate option for CentOS Linux 7? I haven't had any success with the options above, but it was working fine two days ago, so I'm wondering if the server is actually down?