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

Description Usage Arguments Value Examples

View source: R/plot.R

Description

Plots table of enrichment graphs using ggplot and gridExtra.

Usage

1
2
3
4
5
6
7
8
plotGseaTable(
  pathways,
  stats,
  fgseaRes,
  gseaParam = 1,
  colwidths = c(5, 3, 0.8, 1.2, 1.2),
  render = TRUE
)

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. If column width is set to zero, the column is not drawn.

render

If true, the plot is rendered to the current device. Otherwise, the grob is returned. Default is true.

Value

TableGrob object returned by grid.arrange.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(examplePathways)
data(exampleRanks)
fgseaRes <- fgsea(examplePathways, exampleRanks, nperm=1000,
                  minSize=15, maxSize=100)
topPathways <- fgseaRes[head(order(pval), n=15)][order(NES), pathway]
## Not run: 
plotGseaTable(examplePathways[topPathways], exampleRanks,
              fgseaRes, gseaParam=0.5)

## End(Not run)

Example output

Loading required package: Rcpp

fgsea documentation built on Nov. 8, 2020, 5:22 p.m.