Create Plot for Functional Enrichment Analysis.

EnrichPlot(
  fe.res,
  signif = "p.adjust",
  show.num = 10,
  grad.col.vec = c("grey", "red"),
  fill.color = "red",
  str.width = 30,
  plot.type = c("bar", "dot"),
  plot.resolution = 300,
  plot.width = 7,
  plot.height = 9,
  save = FALSE
)

Arguments

fe.res

Functional enrichment analysis results to plot, usually selected from raw results.

signif

Significance criterion of the results, choose from p.adjust, pvalue, qvalue, NULL (do not show significance information). Default: p.adjust.

show.num

The number of terms to show, select in descending order of the FoldEnrichment. Default: 10.

grad.col.vec

Two color gradient vector (low, high) for signif. Used when signif is not NULL. Default: c("grey", "red").

fill.color

Color used to color the geom when signif is NULL. Default: "red".

str.width

Length of enrichment term in plot. If NULL, use raw length. Default: 30.

plot.type

The type of the plot, choose from bar and dot. Default: bar.

plot.resolution

Resolution of plot. Default: 300.

plot.width

The width of plot. Default: 7.

plot.height

The height of plot. Default: 9.

save

Logical value, whether to save all results. Default: FALSE.

Value

If save is TRUE, return NULL, else return a ggplot2 object.

Examples

# show p.adjust # EnrichPlot(fe.res = fe.res, grad.col.vec=c("grey", "red")) # EnrichPlot(fe.res = fe.res, grad.col.vec=c("grey", "red"), plot.type = "dot") # do not show signif # EnrichPlot(fe.res = fe.res, signif = NULL, fill.color = "red") # EnrichPlot(fe.res = fe.res, signif = NULL, fill.color = "red", plot.type = "dot")