fgsea: Wrapper to run methods for preranked gene set enrichment...

View source: R/fgsea.R

fgseaR Documentation

Wrapper to run methods for preranked gene set enrichment analysis.

Description

This function provide an interface to two existing functions: fgseaSimple, fgseaMultilevel. By default, the fgseaMultilevel function is used for analysis. For compatibility with the previous implementation you can pass the 'nperm' argument to the function.

Usage

fgsea(
  pathways,
  stats,
  minSize = 1,
  maxSize = length(stats) - 1,
  gseaParam = 1,
  ...
)

Arguments

pathways

List of gene sets to check.

stats

Named vector of gene-level stats. Names should be the same as in 'pathways'

minSize

Minimal size of a gene set to test. All pathways below the threshold are excluded.

maxSize

Maximal size of a gene set to test. All pathways above the threshold are excluded.

gseaParam

GSEA parameter value, all gene-level statis are raised to the power of 'gseaParam'

...

optional arguments for functions fgseaSimple, fgseaMultilevel

Value

A table with GSEA results. Each row corresponds to a tested pathway.

Examples

data(examplePathways)
data(exampleRanks)
fgseaRes <- fgsea(examplePathways, exampleRanks, maxSize=500)
# Testing only one pathway is implemented in a more efficient manner
fgseaRes1 <- fgsea(examplePathways[1], exampleRanks)

ctlab/fgsea documentation built on Oct. 10, 2024, 10:31 a.m.