Learn R Programming

pathfindR (version 1.3.0)

enrichment_chart: Plot the Bubble Chart of Enrichment Results

Description

This function is used to plot a bubble chart displaying the enrichment results.

Usage

enrichment_chart(result_df, plot_by_cluster = FALSE)

Arguments

result_df

a data frame that must contain the following columns:

Pathway

Description of the enriched pathway

Fold_Enrichment

Fold enrichment value for the enriched pathway

lowest_p

the lowest adjusted-p value of the given pathway over all iterations

Up_regulated

the up-regulated genes in the input involved in the given pathway, comma-separated

Down_regulated

the down-regulated genes in the input involved in the given pathway, comma-separated

Cluster(OPTIONAL)

the cluster to which the pathway is assigned

plot_by_cluster

boolean value indicating whether or not to group the pathways by cluster (works if "Cluster" is a column of `result_df`).

Value

a `ggplot2` object containing the bubble chart. The x-axis corresponds to fold enrichment values while the y-axis indicates the enriched pathways. Size of the bubble indicates the number of DEGs in the given pathway. 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 pathways are grouped by clusters.

Examples

Run this code
# NOT RUN {
g <- enrichment_chart(RA_output)
# }

Run the code above in your browser using DataLab