plotGseaTable: Plots table of enrichment graphs using ggplot and gridExtra.

View source: R/plot.R

plotGseaTableR Documentation

Plots table of enrichment graphs using ggplot and gridExtra.

Description

Plots table of enrichment graphs using ggplot and gridExtra.

Usage

plotGseaTable(
  pathways,
  stats,
  fgseaRes,
  gseaParam = 1,
  colwidths = c(5, 3, 0.8, 1.2, 1.2),
  pathwayLabelStyle = NULL,
  headerLabelStyle = NULL,
  valueStyle = NULL,
  axisLabelStyle = NULL,
  render = NULL
)

Arguments

pathways

Pathways to plot table, as in 'fgsea' function.

stats

Gene-level stats, as in 'fgsea' function.

fgseaRes

Table with fgsea results.

gseaParam

GSEA-like parameter. Adjusts displayed statistic values, values closer to 0 flatten plots. Default = 1, value of 0.5 is a good choice too.

colwidths

Vector of five elements corresponding to column width for grid.arrange. Can be both units and simple numeric vector, in latter case it defines proportions, not actual sizes. If column width is set to zero, the column is not drawn.

pathwayLabelStyle

list with style parameter adjustments for pathway labels. For example, 'list(size=10, color="red")' set the font size to 10 and color to red. See 'cowplot::draw_text' for possible options.

headerLabelStyle

similar to 'pathwayLabelStyle' but for the table header.

valueStyle

similar to 'pathwayLabelStyle' but for NES and p-value columns.

axisLabelStyle

list with style parameter adjustments for stats axis labels. See 'ggplot2::element_text' for possible options.

render

(deprecated)

Value

ggplot object with enrichment barcode plots

Examples

data(examplePathways)
data(exampleRanks)
fgseaRes <- fgsea(examplePathways, exampleRanks, minSize=15, maxSize=500)
topPathways <- fgseaRes[head(order(pval), n=15)][order(NES), pathway]
plotGseaTable(examplePathways[topPathways], exampleRanks,
              fgseaRes, gseaParam=0.5)

ctlab/fgsea documentation built on Dec. 21, 2024, 1:55 p.m.