enrichment_chart {pathfindR} | R Documentation |
Create Bubble Chart of Enrichment Results
Description
This function is used to create a ggplot2 bubble chart displaying the enrichment results.
Usage
enrichment_chart(
result_df,
top_terms = 10,
plot_by_cluster = FALSE,
num_bubbles = 4,
even_breaks = TRUE
)
Arguments
result_df |
a data frame that must contain the following columns:
|
top_terms |
number of top terms (according to the 'lowest_p' column)
to plot (default = 10). If |
plot_by_cluster |
boolean value indicating whether or not to group the
enriched terms by cluster (works if |
num_bubbles |
number of sizes displayed in the legend |
even_breaks |
whether or not to set even breaks for the number of sizes
displayed in the legend |
Value
a 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 result_df
and
plot_by_cluster == TRUE
, the enriched terms are grouped by clusters.
Examples
g <- enrichment_chart(example_pathfindR_output)