See group_enrichment for examples.
show_group_enrichment(
df_enrich,
return_list = FALSE,
scales = "free",
add_text_annotation = TRUE,
fill_by_p_value = TRUE,
cut_p_value = FALSE,
fill_scale = scale_fill_gradient2(low = "#08A76B", mid = "white", high = "red",
midpoint = ifelse(fill_by_p_value, 0, 1)),
...
)
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 TRUE
, cut p values into 5 regions for better visualization.
Only works when fill_by_p_value = TRUE
.
a Scale
object generated by ggplot2
package to
set color for continuous values.
other parameters passing to ggplot2::facet_wrap, only used
when return_list
is FALSE
.
a (list of ) ggplot
object.