Why `FoldEnrichment`,`RichFactor`and `zScore` are not in the ReactomePA::enrichPathway result
1
0
Entering edit mode
Yifeii.Ge • 0
@73df120c
Last seen 6 weeks ago
Singapore

I found that FoldEnrichment,RichFactorand zScore are not in the ReactomePA::enrichPathway result. However, these fields are in the clusterProfiler::enrichKEGG and clusterProfiler::enrichGO. Considering that all of these three functions use DOSE::enricher_internal to perform enrichment analysis and there is an update for adding the above mentioned fields, why ReactomePA::enrichPathway result dose not have these three columns?


library(ReactomePA)
data(geneList, package="DOSE")
de <- names(geneList)[abs(geneList) > 1.5]
x <- enrichPathway(gene=de, pvalueCutoff = 0.05, readable=TRUE)
colnames(x@result)
> colnames(x@result)
[1] "ID"          "Description" "GeneRatio"   "BgRatio"     "pvalue"      "p.adjust"   
[7] "qvalue"      "geneID"      "Count"

library(clusterProfiler)
gene <- names(geneList)[abs(geneList) > 2]
kk <- enrichKEGG(gene         = gene,
                 organism     = 'hsa',
                 pvalueCutoff = 0.05)
colnames(kk@result)
> colnames(kk@result)
 [1] "category"       "subcategory"    "ID"             "Description"    "GeneRatio"     
 [6] "BgRatio"        "RichFactor"     "FoldEnrichment" "zScore"         "pvalue"        
[11] "p.adjust"       "qvalue"         "geneID"         "Count"  

> sessionInfo()
R version 4.4.1 (2024-06-14 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 10 x64 (build 19045)

Matrix products: default


locale:
[1] LC_COLLATE=Chinese (Simplified)_China.utf8  LC_CTYPE=Chinese (Simplified)_China.utf8   
[3] LC_MONETARY=Chinese (Simplified)_China.utf8 LC_NUMERIC=C                               
[5] LC_TIME=Chinese (Simplified)_China.utf8    

time zone: Asia/Shanghai
tzcode source: internal

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

other attached packages:
[1] clusterProfiler_4.12.6 org.Hs.eg.db_3.19.1    AnnotationDbi_1.66.0   IRanges_2.38.1        
[5] S4Vectors_0.42.1       Biobase_2.64.0         BiocGenerics_0.50.0    ReactomePA_1.48.0     

loaded via a namespace (and not attached):
  [1] DBI_1.2.3               gson_0.1.0              shadowtext_0.1.4       
  [4] gridExtra_2.3           httr2_1.0.5             remotes_2.5.0          
  [7] rlang_1.1.4             magrittr_2.0.3          DOSE_3.30.5            
 [10] compiler_4.4.1          RSQLite_2.3.7           reactome.db_1.88.0     
 [13] png_0.1-8               vctrs_0.6.5             reshape2_1.4.4         
 [16] stringr_1.5.1           pkgconfig_2.0.3         crayon_1.5.3           
 [19] fastmap_1.2.0           XVector_0.44.0          ggraph_2.2.1           
 [22] utf8_1.2.4              enrichplot_1.24.4       graph_1.82.0           
 [25] UCSC.utils_1.0.0        purrr_1.0.2             bit_4.5.0              
 [28] zlibbioc_1.50.0         cachem_1.1.0            graphite_1.50.0        
 [31] aplot_0.2.3             GenomeInfoDb_1.40.1     jsonlite_1.8.8         
 [34] blob_1.2.4              BiocParallel_1.38.0     tweenr_2.0.3           
 [37] parallel_4.4.1          R6_2.5.1                stringi_1.8.4          
 [40] RColorBrewer_1.1-3      GOSemSim_2.30.2         Rcpp_1.0.13            
 [43] R.utils_2.12.3          Matrix_1.7-0            splines_4.4.1          
 [46] igraph_2.0.3            tidyselect_1.2.1        qvalue_2.36.0          
 [49] rstudioapi_0.17.1       viridis_0.6.5           codetools_0.2-20       
 [52] lattice_0.22-6          tibble_3.2.1            plyr_1.8.9             
 [55] treeio_1.28.0           withr_3.0.2             KEGGREST_1.44.1        
 [58] gridGraphics_0.5-1      scatterpie_0.2.4        polyclip_1.10-7        
 [61] Biostrings_2.72.1       BiocManager_1.30.25     pillar_1.9.0           
 [64] ggtree_3.12.0           ggfun_0.1.7             generics_0.1.3         
 [67] ggplot2_3.5.1           munsell_0.5.1           scales_1.3.0           
 [70] tidytree_0.4.6          glue_1.7.0              lazyeval_0.2.2         
 [73] tools_4.4.1             data.table_1.16.0       fgsea_1.30.0           
 [76] fs_1.6.4                graphlayouts_1.1.1      fastmatch_1.1-4        
 [79] tidygraph_1.3.1         cowplot_1.1.3           grid_4.4.1             
 [82] tidyr_1.3.1             ape_5.8                 colorspace_2.1-1       
 [85] nlme_3.1-165            GenomeInfoDbData_1.2.12 patchwork_1.3.0        
 [88] ggforce_0.4.2           cli_3.6.3               rappdirs_0.3.3         
 [91] fansi_1.0.6             viridisLite_0.4.2       dplyr_1.1.4            
 [94] gtable_0.3.6            R.methodsS3_1.8.2       yulab.utils_0.1.7      
 [97] digest_0.6.36           ggrepel_0.9.5           ggplotify_0.1.2        
[100] farver_2.1.2            memoise_2.0.1           R.oo_1.26.0            
[103] lifecycle_1.0.4         httr_1.4.7              GO.db_3.19.1           
[106] bit64_4.0.5             MASS_7.3-61
DOSE ReactomePA • 674 views
ADD COMMENT
1
Entering edit mode

Good question! It indeed would be nice if the output of all ORA-functions is aligned.

I assume Guangchuang Yu, the maintainer of ReactomePA, will chime in soon.

> library(ReactomePA)
> 
> gene <- c("11171", "8243", "112464", "2194",
+ "9318", "79026", "1654", "65003",
+ "6240", "3476", "6238", "3836",
+ "4176", "1017", "249")
> 
> res.reactome = enrichPathway(gene, pvalueCutoff=0.05)
> as.data.frame(res.reactome)[1,]
                     ID                               Description GeneRatio
R-HSA-68962 R-HSA-68962 Activation of the pre-replicative complex      2/12
             BgRatio       pvalue   p.adjust     qvalue    geneID Count
R-HSA-68962 33/11091 0.0005561733 0.02431985 0.01565458 4176/1017     2
> 
> 
> library(clusterProfiler)
> 
> res.kegg <- enrichKEGG(gene, pvalueCutoff=0.05)
> 
> as.data.frame(res.kegg)[1,]
                   category           subcategory       ID Description
hsa04110 Cellular Processes Cell growth and death hsa04110  Cell cycle
         GeneRatio  BgRatio RichFactor FoldEnrichment   zScore      pvalue
hsa04110      3/12 158/8850 0.01898734       14.00316 6.076849 0.001091161
           p.adjust     qvalue         geneID Count
hsa04110 0.04473758 0.03560629 8243/4176/1017     3
> 
> 
>
ADD REPLY
1
Entering edit mode
Guangchuang Yu ★ 1.2k
@guangchuang-yu-5419
Last seen 7 weeks ago
China/Guangzhou/Southern Medical Univer…

Re-install ReactomePA should ensure it works.

ADD COMMENT
0
Entering edit mode

It works after re-installation. Thanks! : )

ADD REPLY

Login before adding your answer.

Traffic: 1019 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6