Tool:ReactomePA: an R/Bioconductor package for reactome pathway analysis and visualization
2
8
Entering edit mode
8.4 years ago
Guangchuang Yu ★ 2.6k

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

ReactomePA R Visualization Pathway Bioconductor • 8.2k views
ADD COMMENT
1
Entering edit mode

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:

files <- c('/GFP_peaks.bed', '/kd.bed')
print(files)

peak <- readPeakFile(files[[2]])
peak

covplot(peak, weightCol="V5")

peakAnno <- annotatePeak(files[[1]], tssRegion=c(-500, 500), 
                         TxDb=txdb, annoDb="org.Dm.eg.db")

til this step everything is working nicely. but the problem starts here: library(ReactomePA)

pathway1 <- enrichPathway(as.data.frame(peakAnno)$SYMBOL, organism = "fly")

I got the following:

No gene can be mapped....
--> return NULL...

which is not logic

could you please give advice to solve this problem?

Thanks Tamer

ADD REPLY
2
Entering edit mode

Instead of using SYMBOL, you should use entrez gene ID.

pathway1 <- enrichPathway(as.data.frame(peakAnno)$geneID, organism = "fly")
ADD REPLY
1
Entering edit mode

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:

> head(cp_matrix)
     35526      41092      39976      40831      36778      33636 
-0.4144379 -0.6321093 -0.3219794 -2.0373447  2.3645869  0.6998755

then I have run:

kegg_enrich <- enrichKEGG(gene = names(cp_matrix),
                          organism = "fly",
                          pvalueCutoff = 0.05, 
                          qvalueCutoff = 0.10)

and again I have the same error message:

No gene can be mapped....
--> return NULL...

any idea how to solve this

thanks much

ADD REPLY
0
Entering edit mode

gene ID not match, as indicated in the message.

> xx$dme00051
 [1] "Dmel_CG10638" "Dmel_CG10688" "Dmel_CG10863" "Dmel_CG1129"  "Dmel_CG12289"
 [6] "Dmel_CG12766" "Dmel_CG1982"  "Dmel_CG2171"  "Dmel_CG3001"  "Dmel_CG31692"
[11] "Dmel_CG32849" "Dmel_CG33102" "Dmel_CG3400"  "Dmel_CG3495"  "Dmel_CG4001"
[16] "Dmel_CG40064" "Dmel_CG4649"  "Dmel_CG5432"  "Dmel_CG6058"  "Dmel_CG6083"
[21] "Dmel_CG6084"  "Dmel_CG7328"  "Dmel_CG7335"  "Dmel_CG7551"  "Dmel_CG8094"
[26] "Dmel_CG8207"  "Dmel_CG8417"  "Dmel_CG8890"  "Dmel_CG9436"
> enrichKEGG(xx$dme00051, organism='dme') -> y
> head(y)
               ID                                 Description GeneRatio BgRatio
dme00051 dme00051             Fructose and mannose metabolism     29/29 29/3170
dme00052 dme00052                        Galactose metabolism     12/29 37/3170
dme00520 dme00520 Amino sugar and nucleotide sugar metabolism     10/29 47/3170
dme00040 dme00040    Pentose and glucuronate interconversions      9/29 50/3170
dme00010 dme00010                Glycolysis / Gluconeogenesis      9/29 54/3170
dme00561 dme00561                     Glycerolipid metabolism      7/29 50/3170
               pvalue     p.adjust       qvalue
dme00051 2.962172e-71 3.554606e-70 6.236151e-71
dme00052 4.030032e-17 2.418019e-16 4.242139e-17
dme00520 3.038972e-12 1.215589e-11 2.132612e-12
dme00040 2.251886e-10 6.755659e-10 1.185203e-10
dme00010 4.670775e-10 1.120986e-09 1.966642e-10
dme00561 1.889274e-07 3.778548e-07 6.629032e-08
ADD REPLY
0
Entering edit mode

Thanks much, one more question. how did you get these IDs????

thanks

ADD REPLY
0
Entering edit mode

From KEGG website. You should know these ID better than me as this is the species you are studying.

ADD REPLY
1
Entering edit mode
7.5 years ago
#### ▴ 220

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

ADD COMMENT
0
Entering edit mode

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.

ADD REPLY
1
Entering edit mode
7.5 years ago
#### ▴ 220

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
ADD COMMENT
0
Entering edit mode

using

rvcheck::update_all()

to update all your pkgs.

ADD REPLY

Login before adding your answer.

Traffic: 1801 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