I have 2 set of genes that are enriched at different development stages. I have visulaized their GeneOntology individually using ggplot.
Now I would like to put the geneontology visulization in the same figure. For example: stage 1 on the leftside, stage2 at the right side. The bars are horizontal. They share Y axis but using two parts of the X axis.
I have searched a round. Maybe because my expression in google in not accurate most of the questions and answers I searched does not fit my question.
Does anyone know where I can look into?
Thank you very much
Thank you for the advice. My data is like this: (Term)/(Count)/(PValue)/(Genes) /(List _Total)/(Pop_Hits)/(Pop_Total)/(Fold_Enrichment)/ (Bonferroni)/(Benjamini)/(FDR)/( Group)
it is a csv file and contains the above columns (I listed the columns and separate them by using / ). My original code is:
I added a group column in mydata_3 and label each row that belong to group 1 (contains first 20 rows), or group2(contains 21 rows). I want to put the geneontology and P value side by side separated by group factor. But do not know how to modify my code
Should be able to just add
+ facet_wrap(vars(Group))
to your last line and get what you want.It gives me 2 groups indeed. However, the two groups are on the same side of the Y axis with one column is group1 the the other column right to it was group2 (Both groups are on the right side of Y axis). But it is a good start.
I eventually found how to express my question: I would like to make a divergent barplot with ggplot2. I have found some posts and learn it.
Thank you for your help,