Question: DAVID functional Analysis and its visualization of GO terms using Bar plot
1
gravatar for lawarde.ankita1
7 months ago by
lawarde.ankita120 wrote:

Hello, I have used DAVID tool for the Functional annotation of my data (microarray data) and now i wan to visualize the results of GO term in the form of Bar plots (i have seen the such results from the research paper)reference image from the paper the link contains the image of box plot in the research paper. My question is, 1. Which tools can be used to create such plots or any online tool I have used Revigo tool but it doesn,t give such kind of plots. Any suggestions would be helpful.

Thank you.

visualization david go term • 788 views
ADD COMMENTlink modified 7 months ago by Kevin Blighe28k • written 7 months ago by lawarde.ankita120
1
gravatar for Kevin Blighe
7 months ago by
Kevin Blighe28k
USA / Europe / Brazil
Kevin Blighe28k wrote:

Hi, it is just a simple barchart or bar-plot. First, create a data-frame that has your GO enrichment terms as rows and count values in a single column, like this:

     input
GO1                    128
GO2                      1
GO3                     70
GO4                      6
GO5                     17
GO6                     14
GO7                     18
GO8                      4
GO9                     13
GO10                     0
GO11                     0
GO12                     5
GO13                    16
GO14                     5
GO15                     2
GO16                     0
GO17                     0
GO18                    20
GO19                     6
GO20                     0
GO21                     0
GO22                     0
GO23                     2
GO24                     0
GO25                     6
GO26                     1
GO27                     5
GO28                     1
GO29                     0
GO30                     0
GO31                     0
GO32                     0
GO33                     1

Then, generate separate barcharts with lattice and piece them together on the same panel using grid / gridExtra:

require(lattice)
require(RColorBrewer)
require(rasterVis)
require(gridExtra)
require(grid)

A <- barchart(data.matrix(input[1:15,]), col="black", xlab="Total count", ylab="", pretty=TRUE, scales=list(x=list(cex=1.0, col="black", fontface="bold"), y=list(cex=0.8, labels=rownames(input), col="black", fontface="bold"), xlab=list(cex=2.0), ylab=list(cex=2.0), tck=c(1,0)), aspect="fill")

B <- barchart(data.matrix(input2[1:15,]), col="black", xlab="Total count", ylab="", pretty=TRUE, scales=list(x=list(cex=1.0, col="black", fontface="bold"), y=list(cex=0.8, labels=rownames(input2), col="black", fontface="bold"), xlab=list(cex=2.0), ylab=list(cex=2.0), tck=c(1,0)), aspect="fill")

layout <- cbind(c(1,2))

grid.arrange(layout_matrix=layout, arrangeGrob(A, top=textGrob("A", x=unit(0.05,"npc"), y=unit(0.9,"npc"), just=c("left","top"), gp=gpar(fontsize=32))), arrangeGrob(B, top=textGrob("B", x=unit(0.05,"npc"), y=unit(0.9,"npc"), just=c("left","top"), gp=gpar(fontsize=32))), ncol=1)

tem

------------------------------------------------------------

For side to side, alter the layout and use ncol=2 to grid.arrange

A <- barchart(data.matrix(input), col="black", xlab="Total count", ylab="", pretty=TRUE, scales=list(x=list(cex=1.0, col="black", fontface="bold"), y=list(cex=0.8, labels=rownames(input), col="black", fontface="bold"), xlab=list(cex=2.0), ylab=list(cex=2.0), tck=c(1,0)), aspect="fill")

B <- barchart(data.matrix(input2), col="black", xlab="Total count", ylab="", pretty=TRUE, scales=list(x=list(cex=1.0, col="black", fontface="bold"), y=list(cex=0.8, labels=rownames(input2), col="black", fontface="bold"), xlab=list(cex=2.0), ylab=list(cex=2.0), tck=c(1,0)), aspect="fill")

layout <- cbind(c(1),c(2))
grid.arrange(layout_matrix=layout, arrangeGrob(A, top=textGrob("A", x=unit(0.05,"npc"), y=unit(0.9,"npc"), just=c("left","top"), gp=gpar(fontsize=32))), arrangeGrob(B, top=textGrob("B", x=unit(0.05,"npc"), y=unit(0.9,"npc"), just=c("left","top"), gp=gpar(fontsize=32))), ncol=2)

tempo

ADD COMMENTlink written 7 months ago by Kevin Blighe28k

Hello Kevin Blighe,

Thank you sir for the solution. and I'm so sorry that i didn't check your reply. Your answer is very helpful thank so much.

ADD REPLYlink written 7 months ago by lawarde.ankita120

No problem my dear Sir / Madam

ADD REPLYlink written 7 months ago by Kevin Blighe28k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2115 users visited in the last hour