
Plot Functional Enrichment Dotplot
plot_enrichment_dotplot.RdThis function creates a dotplot for functional enrichment results, showing gene ratio, count, and adjusted p-value for the top terms.
Arguments
- enrichment_df
Dataframe from one database of Enrichr results.
- title
Character. Title for the plot.
- n_input_genes
Integer. Total number of genes used in the enrichment call.
- top_n
Integer. Number of top terms to show.
- wrap_width
Integer. Width for wrapping long term names.
- color_limits
Numeric vector of length 2. Limits for the color scale.
- size_limits
Numeric vector of length 2. Limits for the size scale.
- aspect_ratio
Numeric. Aspect ratio for the plot.
- output_file
Character. Optional path to save the plot (e.g., "enrichment_dotplot.pdf"). If NULL (default), the plot is displayed in the active device.