see step 1 in https://guangchuangyu.github.io/2016/07/how-to-bug-author/. Your installation are too old, in which no as.data.frame method defined for enrichResult.
This package provides functions for pathway analysis based on REACTOME pathway database. It implements enrichment analysis, gene set enrichment analysis and several functions for visualization.
Homepage: https://guangchuangyu.github.io/ReactomePA/
Documentation: https://guangchuangyu.github.io/ReactomePA/documentation/
Issue/Question: https://guangchuangyu.github.io/ReactomePA/#feedback
Citation
Yu G and He QY*. ReactomePA: an R/Bioconductor package for reactome pathway analysis and visualization. Molecular BioSystems, 2016,12(2):477-9. doi:1039/c5mb00663e.
Example
http://dx.doi.org/10.1073/pnas.1601053113

2 answers
I am using ReactomePA and my input looks like this,entrezId & p-value :
> gene
433016 16365 16891 71816 170835 71738 100034251 14058 215257 245126 108078 20558 57248 16456 56619 17474 20288 64292 14727 71519
6.48 3.99 3.68 3.42 3.37 3.15 3.13 3.12 3.12 3.03 3.01 2.94 2.91 2.89 2.89 2.81 2.75 2.71 2.69 2.69
13003 26888 26874 232078 18724 102103 213002 14129 14293 50768 27052 58860 106042 14538 12273 52614 109700 170744 52024 18792
2.66 2.65 2.63 2.59 2.56 2.56 2.56 2.54 2.54 2.54 2.51 2.50 2.50 2.47 2.46 2.45 2.45 2.40 2.39 2.38
I am getting following error after performing enrichPathway step:
> head(as.data.frame(x)) Error in as.data.frame.default(x) : cannot coerce class "structure
("enrichResult", package="DOSE")" to a > data.frame
I am not sure why is it so, can anyone explain me this? As far as I know DOSE is a separate package ,is enrichPathway dependent on DOSE?
Also I am getting only 9 enriched genes , but while using Reactome browser I am getting more enriched genes, does anyone has similar kind of experience?
Secondly I tried to do gsea , using following code:
> y <- gsePathway(gene, nPerm=1000,minGSSize = 150, pvalueCutoff = 0.2,pAdjustMethod = "BH", verbose = FALSE)
No gene set have size > 150 ...
--> return NULL...
> y <- gsePathway(gene, nPerm=1000,minGSSize = 120, pvalueCutoff = 0.2,pAdjustMethod = "BH", verbose = FALSE)
No gene set have size > 120 ...
--> return NULL...
Again I am unaware about the minGSSize,so I stripped of minGSSize and re-runned it didn’t throw any error but following was the output, says 0 enriched term:
>y <- gsePathway(gene, nPerm=1000, pvalueCutoff = 0.2,pAdjustMethod = "BH", verbose = FALSE, organism = "mouse")
>y
#
# Gene Set Enrichment Analysis
#
#...@organism mouse
#...@setType Reactome
#...@keytype ENTREZID
#...@geneList Named num [1:183] 6.48 3.99 3.68 3.42 3.37 3.15 3.13 3.12 3.12 3.03 ...
- attr(*, "names")= chr [1:183] "433016" "16365" "16891" "71816" ...
#...nPerm 1000
#...pvalues adjusted by 'BH' with cutoff <0.2
#...0 enriched terms found
'data.frame': 0 obs. of 8 variables:
$ ID : chr
$ Description : Factor w/ 6 levels "Hemostasis","Immune System",..:
$ setSize : int
$ enrichmentScore: num
$ NES : num
$ pvalue : num
$ p.adjust : num
$ qvalues : num
#...Citation
Guangchuang Yu, Qing-Yu He. ReactomePA: an R/Bioconductor package for
reactome pathway analysis and visualization. Molecular BioSystems
2016, 12(2):477-479
> res <- as.data.frame(y)
Error in as.data.frame.default(y) : cannot coerce class "structure("gseaResult", package = "DOSE")" to a data.frame
so I guess minGSSize is significant , if this is so how can I solve this ?
Look forward for inputs
Hi thanks for your reply, clusterProfiler is not getting updated I have updated my R version to 3.4 and then installed ReactomePA & Clusterprofiler but I am getting the same old version of both the packages. Can anyone you now tell me what could be the solution for this? Here is the output of my command history:
R version 3.4.0 (2017-04-21) -- "You Stupid Darkness"
Copyright (C) 2017 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(ReactomePA)
Loading required package: DOSE
'BiocParallel' did not register default BiocParallelParams:
invalid class “MulticoreParam” object: 1: ‘cluster’, ‘.clusterargs’, ‘.uid’, ‘RNGseed’ must be length 1
invalid class “MulticoreParam” object: 2: ‘.clusterargs’, ‘.controlled’, ‘logdir’, ‘resultdir’ must be length 1
DOSE v3.0.10 For help: https://guangchuangyu.github.io/DOSE
If you use DOSE in published research, please cite:
Guangchuang Yu, Li-Gen Wang, Guang-Rong Yan, Qing-Yu He. DOSE: an R/Bioconductor package for Disease Ontology Semantic and Enrichment analysis. Bioinformatics 2015, 31(4):608-609
ReactomePA v1.18.1 For help: https://guangchuangyu.github.io/ReactomePA
If you use ReactomePA in published research, please cite:
Guangchuang Yu, Qing-Yu He. ReactomePA: an R/Bioconductor package for reactome pathway analysis and visualization. Molecular BioSystems 2016, 12(2):477-479
Warning message:
In is.na(x[[i]]) :
is.na() applied to non-(list or vector) of type 'environment'
> library(clusterProfiler)
clusterProfiler v3.2.14 For help: https://guangchuangyu.github.io/clusterProfiler
If you use clusterProfiler in published research, please cite:
Guangchuang Yu., Li-Gen Wang, Yanyan Han, Qing-Yu He. clusterProfiler: an R package for comparing biological themes among gene clusters. OMICS: A Journal of Integrative Biology. 2012, 16(5):284-287.
> rvcheck::check_bioc("ReactomePA")
## ReactomePA is out of date...
## try http:// if https:// URLs are not supported
source("https://www.bioconductor.org/biocLite.R")
biocLite("ReactomePA")
$package
[1] "ReactomePA"
$installed_version
[1] "1.18.1"
$latest_version
[1] "1.20.1"
$up_to_date
[1] FALSE
> rvcheck::check_bioc("clusterProfiler")
## clusterProfiler is out of date...
## try http:// if https:// URLs are not supported
source("https://www.bioconductor.org/biocLite.R")
biocLite("clusterProfiler")
$package
[1] "clusterProfiler"
$installed_version
[1] "3.2.14"
$latest_version
[1] "3.4.2"
$up_to_date
[1] FALSE
using
rvcheck::update_all()
to update all your pkgs.
Log in to answer this question.
Hi Guangchuang, I tried your ChIPseeker package to annotate some peaks. actually this worked pretty cool however when I tried to carry out Functional enrichment analysis on those peaks using ReactomePA I got some errors. here is the code I used:
til this step everything is working nicely. but the problem starts here: library(ReactomePA)
I got the following:
which is not logic
could you please give advice to solve this problem?
Thanks Tamer
Instead of using
SYMBOL, you should useentrez gene ID.Hi Guangchuang, I am currently running RNA_seq pipeline and it was absolutely fine until I reached the KEGG step. first, I have 400 DE genes . I created matrix of ENTREZID and fold change. here is the head of my matrix:
then I have run:
and again I have the same error message:
any idea how to solve this
thanks much
gene ID not match, as indicated in the message.
Thanks much, one more question. how did you get these IDs????
thanks
From KEGG website. You should know these ID better than me as this is the species you are studying.