This is a test version of Biostars. For the public version, visit https://www.biostars.org.
clusterporfiler enrichGO plot

Could anyone please help me replicating this plot from clusterprofiler R package?

dotplot

clusterprofiler gene ontology plot

1 answer

Have you tried doing this? If so posting what you have tried could help.

In any case, the clusterProfiler R package has a detailed user guide that would help you learn how to do anything you want to do. You can make a dot plot simply by using the dotplot function after performing GO enrichment analysis using the enrichGO function (looks like this is what you want based on your example). After that you can use the plot_grid function to organize plots (for example here) the way you want. Hope this will get you going.

Thank you for the reply. The specific plot I would want to do is to have the enriched terms for biological processes/molecular function/cellular component in a facet grid from ggplot2. Also it has only one legend to it. Do you have any suggestions for that? I have read through the vignette provided and also their github repository but I could not find a solution for this specific problem.

I see. That's why giving few more details help.

Try the accepted answer in this thread. Instead of "cyl" in this answer, use ontology (I am not sure how it appears in your dataframe. Check and use the correct form: ontology/ONTOLOGY/Ontology)! That should do it.

Log in to answer this question.