Plot biological process of DAVID analysis in a barplot
1
0
Entering edit mode
4.0 years ago

Hi,

I have done a functional analysis with DAVID about the genes corresponding each module of my WGCNA.

My objective now is to plot the biologicals process of each module using a barplot, but I want all biologicals process of each module in an unique graph using diferent colors to distinguish each module with their biologicals process. I want something like in the image:

enrichment-analysis

If someone can say or show me any tutorial, I will appreciate it

Thanks,

Silvia

david biological process plot • 4.9k views
ADD COMMENT
2
Entering edit mode
4.0 years ago
ashish ▴ 680

This is a barplot and can be made easily in R using ggplot. First remove all the unnecessary columns in the DAVID output file. Just keep the GO terms and their associated pvalue. Assuming you can get the data in a three column format where first column is GO term, second is module name and third is pvalues, you can try this:

    head(data)

                                             term module      pvalue
    1                  defense response to fungus   blue 0.000207773
    2                                MAPK cascade   blue 0.000545800
    3                 chondrocyte differentiation   blue 0.001003693
    4              antibacterial humoral response   blue 0.001419371
    5          killing of cells of other organism   blue 0.002021502
    6 defense response to Gram-negative bacterium   blue 0.002072591

library(ggplot2)

ggplot(data, aes(x = term,
                 y = -log10(pvalue),
                 fill = module)) + geom_bar(stat = "identity",  position = "dodge") + coord_flip()

If you want to make your plot exactly like the one you showed you will have to add theme() in the ggplot command and specify parameters inside it. See this for an intro on making custom theme.

ADD COMMENT
0
Entering edit mode

I got it!

Thank you very much for your help!

ADD REPLY

Login before adding your answer.

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