See group_enrichment for examples. NOTE the box fill and the box text have different meanings.
show_group_enrichment(
df_enrich,
return_list = FALSE,
scales = "free",
add_text_annotation = TRUE,
fill_by_p_value = TRUE,
use_fdr = TRUE,
cut_p_value = FALSE,
cut_breaks = c(-Inf, -5, log10(0.05), -log10(0.05), 5, Inf),
cut_labels = c("↓ 1e-5", "↓ 0.05", "non-significant", "↑ 0.05", "↑ 1e-5"),
fill_scale = scale_fill_gradient2(low = "#08A76B", mid = "white", high = "red",
midpoint = ifelse(fill_by_p_value, 0, 1)),
cluster_row = FALSE,
cluster_col = FALSE,
...
)
result data.frame
from group_enrichment.
if TRUE
, return a list of ggplot
object so user
can combine multiple plots by other R packages like patchwork
.
Should scales be fixed ("fixed"
, the default),
free ("free"
), or free in one dimension ("free_x"
,
"free_y"
)?
if TRUE
, add text annotation in box.
When show p value with filled color, the text indicates relative change;
when show relative change with filled color, the text indicates p value.
if TRUE
, show log10 based p values with filled color.
The +/- of p values indicates change direction.
If p vlaues is mapped to fill, then text shows effect size, and vice versa.
if TRUE
, show FDR values instead of raw p-values.
if TRUE
, cut p values into 5 regions for better visualization.
Only works when fill_by_p_value = TRUE
.
when cut_p_value
is TRUE
, this option set the (log10 based) breaks.
when cut_p_value
is TRUE
, this option set the labels.
a Scale
object generated by ggplot2
package to
set color for continuous values.
if TRUE
, cluster rows (or columns) with Hierarchical Clustering ('complete' method).
other parameters passing to ggplot2::facet_wrap, only used
when return_list
is FALSE
.
a (list of) ggplot
object.