YuLab-SMU / ReactomePA

Reactome Pathway Analysis
https://yulab-smu.top/biomedical-knowledge-mining-book/
37 stars 10 forks source link

Cannot extract results from enrichPathway #21

Open ibichind opened 5 years ago

ibichind commented 5 years ago

I have some code to analyze a dataset that I used in 2016 and that produced great results..

genes <- geneNames[bss$ix[1:100],1] genes <- as.character(genes) hugoNames <- lapply(genes, function(t) substr(t, 1, regexpr("\|", t) - 1)) # extract HUGO names entrezNames <- lapply(genes, function(t) substr(t, regexpr("\|", t) + 1, nchar(t))) # extract Entrez names paths = enrichPathway(gene=unlist(entrezNames), pvalueCutoff=.9, readable=T)

With the latest version of ReactomePA (1.26.0) and DOSE (1.38) for R 3.5.1 under Windows x64, I see that I am getting results in the 'paths' variable, but cannot extract them or visualize them - all figures are blank. See below.

image

head(as.data.frame(paths))

image

enrichMap(paths, layout=igraph::layout.kamada.kawai, vertex.label.cex = 1)

image

image

Please help. Thank you. Isabelle

GuangchuangYu commented 5 years ago

any reproducible example?

ibichind commented 5 years ago

Yes, please find the sample file in attachment. Thank you for your help. Isabelle

test.txt

GuangchuangYu commented 5 years ago
> paths2 = enrichPathway(gene=unlist(entrezNames2), pvalueCutoff=.9, qvalueCutoff=1, readable=T)
> head(paths2)                                                                                  
                         ID                                Description
R-HSA-203615   R-HSA-203615                            eNOS activation
R-HSA-202131   R-HSA-202131                 Metabolism of nitric oxide
R-HSA-203765   R-HSA-203765             eNOS activation and regulation
R-HSA-1369062 R-HSA-1369062      ABC transporters in lipid homeostasis
R-HSA-202427   R-HSA-202427 Phosphorylation of CD3 and TCR zeta chains
R-HSA-3299685 R-HSA-3299685  Detoxification of Reactive Oxygen Species
              GeneRatio  BgRatio      pvalue  p.adjust    qvalue        geneID
R-HSA-203615       2/57 13/10554 0.002151621 0.2042897 0.2041259   CAV1/LYPLA1
R-HSA-202131       2/57 17/10554 0.003699909 0.2042897 0.2041259   CAV1/LYPLA1
R-HSA-203765       2/57 17/10554 0.003699909 0.2042897 0.2041259   CAV1/LYPLA1
R-HSA-1369062      2/57 18/10554 0.004148013 0.2042897 0.2041259   ABCA5/ABCA7
R-HSA-202427       2/57 22/10554 0.006176648 0.2433599 0.2431649 PAG1/HLA-DPB1
R-HSA-3299685      2/57 37/10554 0.016910887 0.5041342 0.5037301      CAT/SOD1
              Count
R-HSA-203615      2
R-HSA-202131      2
R-HSA-203765      2
R-HSA-1369062     2
R-HSA-202427      2
R-HSA-3299685     2
ibichind commented 5 years ago

Dear GuangchuangYu, Thank you very much, so adding the qvalueCutoff parameter has resolved the issue. Thank you very much for your help, it is greatly appreciated !