clusterProfiler icon indicating copy to clipboard operation
clusterProfiler copied to clipboard

enrichKEGG function error

Open wang0430 opened this issue 1 year ago • 2 comments

hello author Thank you very much for developing such an excellent analysis tool. I encountered a problem when using the enrichKEGG function today. ”--> No gene can be mapped.... --> Expected input gene ID: --> return NULL..." I performed go enrichment analysis in the previous step of kegg analysis, and there is no problem with my gene list. And I had the same problem when running the examples data.

1678277454356

wang0430 avatar Mar 08 '23 12:03 wang0430

@wang0430 After updates as mentioned #549 and restarting R (v4.2.1), clusterProfiler (v.4.7.1.002, requires updates of DOSE (v.3.25.0.002) as well), enrichKEGG() is working fine (for me, it is human data).

~$ R

R version 4.2.1 (2022-06-23) -- "Funny-Looking Kid"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(clusterProfiler)

clusterProfiler v4.7.1.002  For help: https://yulab-smu.top/biomedical-knowledge-mining-book/

If you use clusterProfiler in published research, please cite:
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

Attaching package: ‘clusterProfiler’

The following object is masked from ‘package:stats’:

    filter


> data(geneList, package="DOSE")
> gene <- names(geneList)[abs(geneList) > 2]
kk <- enrichKEGG(gene         = gene,
> 
> kk <- enrichKEGG(gene         = gene,
+                  organism     = 'hsa',
+                  pvalueCutoff = 0.05)
Reading KEGG annotation online: "https://rest.kegg.jp/link/hsa/pathway"...
Reading KEGG annotation online: "https://rest.kegg.jp/list/pathway/hsa"...
> head(kk)
               ID                                                   Description
hsa04110 hsa04110                                                    Cell cycle
hsa04114 hsa04114                                                Oocyte meiosis
hsa04218 hsa04218                                           Cellular senescence
hsa04061 hsa04061 Viral protein interaction with cytokine and cytokine receptor
hsa03320 hsa03320                                        PPAR signaling pathway
hsa04914 hsa04914                       Progesterone-mediated oocyte maturation
         GeneRatio  BgRatio       pvalue     p.adjust       qvalue
hsa04110     11/94 127/8275 1.689644e-07 3.531357e-05 3.450432e-05
hsa04114     10/94 131/8275 2.051606e-06 2.143928e-04 2.094797e-04
hsa04218     10/94 156/8275 9.875269e-06 6.879771e-04 6.722113e-04
hsa04061      8/94 100/8275 1.622516e-05 8.477647e-04 8.283372e-04
hsa03320      7/94  75/8275 2.061911e-05 8.618789e-04 8.421279e-04
hsa04914      7/94 102/8275 1.496049e-04 5.211236e-03 5.091815e-03
                                                     geneID Count
hsa04110 8318/991/9133/890/983/4085/7272/1111/891/4174/9232    11
hsa04114    991/9133/983/4085/51806/6790/891/9232/3708/5241    10
hsa04218     2305/4605/9133/890/983/51806/1111/891/776/3708    10
hsa04061           3627/10563/6373/4283/6362/6355/9547/1524     8
hsa03320                 4312/9415/9370/5105/2167/3158/5346     7
hsa04914                    9133/890/983/4085/6790/891/5241     7

> sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.5 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3

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

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] clusterProfiler_4.7.1.002

loaded via a namespace (and not attached):
  [1] nlme_3.1-159           bitops_1.0-7           ggtree_3.6.2          
  [4] enrichplot_1.18.3      bit64_4.0.5            HDO.db_0.99.1         
  [7] RColorBrewer_1.1-3     httr_1.4.5             GenomeInfoDb_1.34.9   
 [10] tools_4.2.1            utf8_1.2.3             R6_2.5.1              
 [13] lazyeval_0.2.2         DBI_1.1.3              BiocGenerics_0.44.0   
 [16] colorspace_2.1-0       withr_2.5.0            tidyselect_1.2.0      
 [19] gridExtra_2.3          bit_4.0.5              compiler_4.2.1        
 [22] cli_3.6.0              Biobase_2.58.0         scatterpie_0.1.8      
 [25] shadowtext_0.1.2       scales_1.2.1           stringr_1.5.0         
 [28] digest_0.6.31          yulab.utils_0.0.6      gson_0.1.0            
 [31] DOSE_3.25.0.002        XVector_0.38.0         pkgconfig_2.0.3       
 [34] fastmap_1.1.1          rlang_1.0.6            RSQLite_2.3.0         
 [37] gridGraphics_0.5-1     farver_2.1.1           generics_0.1.3        
 [40] jsonlite_1.8.4         BiocParallel_1.32.5    GOSemSim_2.24.0       
 [43] dplyr_1.1.0            RCurl_1.98-1.10        magrittr_2.0.3        
 [46] ggplotify_0.1.0        GO.db_3.16.0           GenomeInfoDbData_1.2.9
 [49] patchwork_1.1.2        Matrix_1.5-1           Rcpp_1.0.10           
 [52] munsell_0.5.0          S4Vectors_0.36.2       fansi_1.0.4           
 [55] ape_5.7                viridis_0.6.2          lifecycle_1.0.3       
 [58] stringi_1.7.12         ggraph_2.1.0           MASS_7.3-58.1         
 [61] zlibbioc_1.44.0        plyr_1.8.8             qvalue_2.30.0         
 [64] grid_4.2.1             blob_1.2.3             parallel_4.2.1        
 [67] ggrepel_0.9.3          crayon_1.5.2           lattice_0.20-45       
 [70] graphlayouts_0.8.4     Biostrings_2.66.0      cowplot_1.1.1         
 [73] splines_4.2.1          KEGGREST_1.38.0        pillar_1.8.1          
 [76] fgsea_1.24.0           igraph_1.4.1           reshape2_1.4.4        
 [79] codetools_0.2-18       stats4_4.2.1           fastmatch_1.1-3       
 [82] glue_1.6.2             ggfun_0.0.9            downloader_0.4        
 [85] data.table_1.14.8      treeio_1.22.0          png_0.1-8             
 [88] vctrs_0.5.2            tweenr_2.0.2           gtable_0.3.1          
 [91] purrr_1.0.1            polyclip_1.10-4        tidyr_1.3.0           
 [94] cachem_1.0.7           ggplot2_3.4.1          ggforce_0.4.1         
 [97] tidygraph_1.2.3        tidytree_0.4.2         viridisLite_0.4.1     
[100] tibble_3.1.8           aplot_0.1.9            AnnotationDbi_1.60.0  
[103] memoise_2.0.1          IRanges_2.32.0  

JD2112 avatar Mar 08 '23 13:03 JD2112

I think something has changed on KEGG's end such that older versions of clusterprofiler are not accurately pulling data from KEGG, that's my best guess any way cuz I'm re-running some code with clusterProfiler 3.18.1 and I'm now getting the same error, but it worked fine when i first put the code together back in late 2021.

jmvera255 avatar Mar 09 '23 21:03 jmvera255