enrichItPlot: Adaptive visualisation of enrichIt results

View source: R/enrichItPlot.R

enrichItPlotR Documentation

Adaptive visualisation of enrichIt results

Description

Adaptive visualisation of enrichIt results

Usage

enrichItPlot(
  res,
  plot.type = c("bar", "dot", "cnet"),
  top = 20,
  x.measure = "-log10(padj)",
  color.measure = x.measure,
  show.counts = TRUE,
  palette = "inferno",
  ...
)

Arguments

res

'data.frame' returned by [enrichIt()].

plot.type

'"bar"', '"dot"', or '"cnet"'.

top

Integer. Keep the top *n* terms **per database** (ranked by adjusted *p*). Set to 'Inf' to keep all.

x.measure

A column in 'res' mapped to the *x*-axis (ignored for '"cnet"'). Default '"-log10(padj)"'.

color.measure

Column mapped to color (dot plot only). Default same as 'x.measure'.

show.counts

Logical. Annotate bar plot with the 'Count' (number of genes).

palette

palette Character. Any palette from hcl.pals.

...

Further arguments passed to **ggplot2** geoms (e.g. 'alpha', 'linewidth').

Value

A **patchwork** object (bar / dot) or **ggraph** object (cnet).

Examples

## Not run: 
ranks <- setNames(markers$avg_log2FC, rownames(markers))
gs    <- getGeneSets("Homo sapiens", library = c("H", "C2"))
res   <- enrichIt(ranks, gs)

enrichItPlot(res)               
enrichItPlot(res, "dot", top=10) 
enrichItPlot(res, "cnet", top=5) 

## End(Not run)

ncborcherding/escape documentation built on June 12, 2025, 1 p.m.