plotting GO enrichment pvalue
1
0
Entering edit mode
7.7 years ago
ersgupta • 0

I want to plot horizontal barplot for -log(pvalue) from goseq output. Till now I have been able to plot this(http://e18i.imgup.net/testc1e0.jpeg ), using barplot() in R.

barplot(values, horiz=T, names.arg=names, las=1, cex.names=0.6)

but it cuts out the labels on the y-axis, is there any way in barplot or some other way to plot this? I am looking for something like this: http://www.nature.com/article-assets/npg/srep/2016/160704/srep29311/images_hires/w926/srep29311-f6.jpg

Saurabh

RNA-Seq GO goseq histogram • 4.2k views
ADD COMMENT
1
Entering edit mode

The plot you generated still have complete information. Sometime you need a tweak.

1) Save the barplot from R as PDF (SVG will be better)

2) Open with some vector editing tools like Inkscape (I prefer this since it is easy to use for newbie, free for windows and linux as well) or Illustrator.

3) Yo can see your labels out of plot area, just fix it within plot area (I don't know how much you understand, but when you open with the tool you will definitely get what I am saying).

4) Save as PNG or whatever format you want.

JFI: I can see too many labels in the plot, in that case you can try visualizing in different ways.

Example1: GeneSCF generates bubble plot as shown below for top 20 enriched terms based on p-values

enter image description here

Example2:

C: Gene ontology comparsion between up- and down-regulated genes

ADD REPLY
0
Entering edit mode

Thank you so much for the reply. Will try out using Inkspace and maybe gimp as well, didn't really want to go manual, was wondering if this "trivial" thing can be achieved with just the script, like moving the yaxis to the middle or something. GeneSCF looks pretty good, haven't tried it before, but I like the visualisation. Will let you know once I am able to get this done.

ADD REPLY
0
Entering edit mode

For me, your link to imgup results in 'Sorry, not found.'

ADD REPLY
0
Entering edit mode

Link has been fixed.

ADD REPLY
0
Entering edit mode

Ah, I have uploaded the image for the first time in biostars, so might not have done it right. Thanks genomax2 for fixing it. :)

ADD REPLY
0
Entering edit mode
7.7 years ago

I don't have an out of the box solution, but I'm fairly certain that ggplot2 will have what you need, and the documentation is excellent. In addition, learning how to produce graphs with ggplot2 will be hugely beneficial for all your future needs :-)

ADD COMMENT
0
Entering edit mode

I agree, ggplot2 is quite flexible, will give it a try. Thanks. (y)

ADD REPLY

Login before adding your answer.

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