ggplot low pvalues not detected
2
0
Entering edit mode
4.5 years ago
kra277 • 0

Hi,

I want to use GAGE GO results and GGplot to output a dot plot. I tried it using the following code.

graph_ke_test <- 
      gage_ke_test %>% 
      subset(p.val < 0.05) %>% 
      head(5) %>% 
      ggplot(aes(x= set.size, y= Kegg_pathway)) + 
      geom_point(aes(color = p.val), size = 5) +
      theme_bw()+ labs(title = "GAGE KEGG 2 Directional Top 5 Genesets", 
      x = "Number of Differentially Expressed Genes", y = NULL, color = "p value")

The p-value scale is not representative of the values of GAGE GO. In the GAGE GO Table, the pvalue is 2.595794e-14. The scale in ggplot ranges from 0.005 to 0.02.

Below is the short version of the table

1 hsa03010 Ribosome 2.595794e-14

2 hsa03008 Ribosome biogenesis in eukaryotes 1.435528e-02

3 hsa03018 RNA degradation 1.457412e-02

4 hsa00190 Oxidative phosphorylation 1.887497e-02

5 hsa03013 RNA transport 2.044700e-02

Graph Generated using GGplot

I checked the structure of the data to make sure the value column is numeric, and it is. Did anyone come across this issue and know how to solve this? It would be very helpful to resolve this issue.

Thank you in advance

ggplot gage • 875 views
ADD COMMENT
1
Entering edit mode
4.5 years ago
Sam ★ 4.8k

You used head(5)

which only show the first 5 pathway. You might want to remove that if you want to plot all pathways. Or you might want to sort the results by p-value before you plot so that you are plotting the 5 most significant pathways

ADD COMMENT
0
Entering edit mode
4.5 years ago
Alex Nesmelov ▴ 200

It may be just a problem with p.val visualization via color. You can see the real plotted value of p.val, plotting it as factor:

    geom_point(aes(color = factor(p.val)), size = 5) +
ADD COMMENT

Login before adding your answer.

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