Hi,
I've been using enrichR to perform enrichment analysis (GO and pathway terms) on several differentially expressed gene lists of interest. Currently, I use the plotEnrich() function to export a PDF plot of the top 30 terms based on adjusted p-values.
However, I’ve noticed that some biologically relevant GO terms or pathways—those that align well with our research findings are ranked lower (e.g., within the top 100 or even top 450), and thus don’t appear in the default plots.
Is there a way to select and visualize only specific GO terms or pathways of interest, rather than relying on the top N terms? Alternatively, do you have suggestions for custom plotting a selected list of terms (with their counts and adjusted p-values) as a bar plot?
library(enrichR)
dbs <- c("GO_Biological_Process_2023",
"Reactome_Pathways_2024")
## Input gene list
genes.input <- DEGs_list$geneSymbol
enrich_results <- enrichr(genes.input, dbs)
## Plot
pdf("plotEnrich_GO_BP.pdf", height = 7,width = 7)
plotEnrich(
enrich_results$GO_Biological_Process_2023,
showTerms = 30,
numChar = 50,
y = "Count",
orderBy = "Adjusted.P.value",
title = "GO_Biological_Process_2023"
)
dev.off()
pdf("plotEnrich_Reactome.pdf", height = 7,width = 7)
plotEnrich(
enrich_results$Reactome_Pathways_2024,
showTerms = 30,
numChar = 40,
y = "Count",
orderBy = "Adjusted.P.value",
title = "Reactome_Pathways_2024"
)
dev.off()
Thanks in advance for your help!
Best regards,
Toufiq
dthorbur thank you very much. I will tru this out.