This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Is it possible to recreate clusterProfiler plots using my own pathway data?

Hi all,

I love the plots that are produced by clusterProfiler for summarizing a large amount of gene ontology or pathway data. But what I'm interested in doing is combining pathway data from several sources to produce a plot, rather than using the enrichGO/enrichKEGG functions built into clusterProfiler. The plot I'm trying to create using my own input data is:

clusterProfiler dotplot

In clusterProfiler, the input to this is dataframe of the format:

enter image description here

I can create a dataframe containing my "customized" pathway data, but can't get it to be recognized by the dotplot function in clusterProfiler (because it's a data frame and technically not a "compareClusterResult" object). So is there a way to coerce my data frame to a compareClusterResult object or an alternative way to do this? I'm not skilled enough to recreate something similar using ggplot2 or plotly....

Many thanks for your help - much appreciated.

Jim

clusterprofiler r gene ontology pathway dotplot

1 answer

maybe you can try merge_result function, see https://guangchuangyu.github.io/2015/08/functional-enrichment-for-gtex-paper/ and corresponding source code in https://github.com/GuangchuangYu/enrichment4GTEx_clusterProfiler.

It does work! many thanks~

Hi, Could you tell me how you did it?

Log in to answer this question.