Skip to contents

Displays one of three distinct over-representation metrics without treating them as interchangeable: rich factor is overlap divided by the background term size, gene ratio is overlap divided by the input list size, and fold enrichment is gene ratio divided by background ratio. Point area represents overlap count and colour represents finite -log10() evidence; adjusted evidence is labelled compactly as adj p.

Usage

plot_ora_bubble(
  result,
  terms,
  x = c("rich_factor", "gene_ratio", "fold_enrichment"),
  p_value = c("auto", "adjusted", "raw"),
  term_labels = NULL
)

Arguments

result

A clusterProfiler enrichResult or an ORA result data frame containing ID, Description, GeneRatio, BgRatio, pvalue, p.adjust, and Count.

terms

Unique term identifiers to display, in the desired order. Terms are never selected automatically.

x

ORA metric displayed on the horizontal axis.

p_value

Evidence column to display. "auto" uses adjusted p-values only when every selected term has one; otherwise the whole plot uses raw p-values.

term_labels

Optional complete term-named character vector describing the selected terms.

Value

An unprinted standard ggplot object carrying recommended physical dimensions for plot_save().