This function is used to create a ggplot2 bubble chart displaying the enrichment results.
enrichment_chart( result_df, top_terms = 10, plot_by_cluster = FALSE, num_bubbles = 4, even_breaks = TRUE )
a data frame that must contain the following columns:
number of top terms (according to the "lowest_p" column)
to plot (default = 10). If
boolean value indicating whether or not to group the
enriched terms by cluster (works if
number of sizes displayed in the legend
whether or not to set even breaks for the number of sizes
displayed in the legend
ggplot2 object containing the bubble chart.
The x-axis corresponds to fold enrichment values while the y-axis indicates
the enriched terms. Size of the bubble indicates the number of significant
genes in the given enriched term. Color indicates the -log10(lowest-p) value.
The closer the color is to red, the more significant the enrichment is.
Optionally, if "Cluster" is a column of
plot_by_cluster == TRUE, the enriched terms are grouped by clusters.
g <- enrichment_chart(RA_output)