Hi Biostar community,
I am conducting GO and KEGG pathway enrichment analyses on RNA-Seq data. My goal is to visualize both upregulated and downregulated genes in a single plot for each analysis. Here's the issue:
For GO enrichment analysis, I am using the clusterProfiler package in R with the enrichGO() function for both upregulated and downregulated genes. However, I'm having trouble creating a combined dotplot that distinguishes between the upregulated and downregulated terms in the same visualization.
For KEGG pathway analysis, I am using enrichKEGG() for both sets of genes and facing a similar issue. I would like to combine the pathways enriched in upregulated and downregulated genes in one plot for better comparison, but I can't figure out how to merge these results in the same visualization.
What would be the best approach to achieve this for both GO and KEGG analyses? Any code examples or tips would be greatly appreciated!
Thank you!
Depends on the output your are getting, say its something like below, saved in a dataframe
df
that countains yourFoldEnrichment
values,GO_Term
,LogFDR
which is the log of the false discovery rate, andCount
, which is the number of genes from your data that are present in the tested GO gene set, you could do something like the following to get a dot plot: