This function plots a bar chart representing enriched pathways, modules, or functional modules. The bars are colored according to the database of origin.
An object containing the enrichment results and other relevant data.
An integer specifying the top N pathways to display.
An integer specifying the width of the Y-axis labels.
A character string specifying the level of analysis. One of "pathway", "module", or "functional_module".
A numeric value for the FDR adjusted P-value cutoff.
A numeric value for the count cutoff.
A named vector containing the colors for different databases.
A character vector specifying which databases to include in the plot. Should be "go", "kegg", or/and "reactome".
A ggplot object representing the bar chart.
if (FALSE) {
# Assume `obj` is an object containing the relevant data
plot_pathway_bar(obj, top_n = 5, level = "pathway")
plot_pathway_bar(obj, top_n = 10, level = "module", p.adjust.cutoff = 0.05)
}