I am trying to visualize the result of GO enrichment analysis. My dataframe looks like:
And I used this R code to visualize:
ggplot(ego, showCategory = 20, aes(Count, Description, fill = ONTOLOGY)) + geom_bar(stat = "identity") + facet_wrap(~ ONTOLOGY, nrow = 5, , scales = "free", drop = FALSE) + theme(legend.position = "bottom", axis.title.y = element_blank()) + geom_text( aes(label = paste(Count)), color = "black", size = 4, hjust = 0.1, position = position_dodge(0.9) )
But, with this code, only BP part is shown.
How could I present all GO such as BP, MF, and CC ? in dataframe, there are MF and CC also within ONTOLOGY section..