Boxplot/bargraph for expression data using ggplot2
My data frame
gene WT ATRA VD3
INO80 -1.522663774 0 -0.7068400406
CHD2 1.5314010666 -1.9582412148 -0.1891538235
CHD7 1.1916322634 0 2.0417385999
HELLS 4.804731294 0 -0.0810994075
. I would like to put std.deviation and std.error of mean in my final bar graph
/figure/unnamed-chunk-6-1.png)
Any help or suggestion would be highly appreciated
• 3,950 views
•
link
0 answers
No answers yet.
Log in to answer this question.
It's difficult to interpret what your actual problem is. If you need to add error bars in ggplot2, then it's the
geom_errorbar()function.okay now i have edited my question since I had issues with CHD2 gene .
My issues is I would like to plot the expression of 4 gene in WT ,in ATRA and VD3. So basically i have to melt and reshape the data and plot bar graph that;'s it?
See the
gather()function in tidyr.I get this error
Error: stat_count() must not be used with a y aesthetic.This isn't really a bioinformatics question. This is just that you need to go and follow a walkthrough/tutorial online for how to format the data for ggplot barplots (I'd be the first to admit that ggplot's errors aren't the most discernable).
to do the error bars more than one value per condition is needed follows just the code for the barplots:
yes it worked thanks a lot.Can you show me whats wrong with my code if I try that in ggplot2?