collapsePathways: Collapse list of enriched pathways to independent ones.

Description Usage Arguments Value Examples

Description

Collapse list of enriched pathways to independent ones.

Usage

1
2
3
4
5
6
7
8
collapsePathways(
  fgseaRes,
  pathways,
  stats,
  pval.threshold = 0.05,
  nperm = 10/pval.threshold,
  gseaParam = 1
)

Arguments

fgseaRes

Table with results of running fgsea(), should be filtered by p-value, for example by selecting ones with padj < 0.01.

pathways

List of pathways, should contain all the pathways present in 'fgseaRes'.

stats

Gene-level statistic values used for ranking, the same as in 'fgsea()'.

pval.threshold

Two pathways are considered dependent when p-value of enrichment of one pathways on background of another is greater then 'pval.threshold'.

nperm

Number of permutations to test for independence, should be several times greater than '1/pval.threhold'. Default value: '10/pval.threshold'.

gseaParam

GSEA parameter, same as for 'fgsea()'

Value

Named list with two elments: 'mainPathways' containing IDs of pathways not reducable to each other, and 'parentPathways' with vector describing for all the pathways to which ones they can be reduced. For pathways from 'mainPathwyas' vector 'parentPathways' contains 'NA' values.

Examples

1
2
3
4
5
6
7
data(examplePathways)
data(exampleRanks)
fgseaRes <- fgsea(examplePathways, exampleRanks, nperm=10000, maxSize=500)
collapsedPathways <- collapsePathways(fgseaRes[order(pval)][padj < 0.01],
                                      examplePathways, exampleRanks)
mainPathways <- fgseaRes[pathway %in% collapsedPathways$mainPathways][
                         order(-NES), pathway]

Example output

sh: 1: wc: Permission denied
Warning message:
In fgsea(examplePathways, exampleRanks, nperm = 10000, maxSize = 500) :
  You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To run fgseaMultilevel, you need to remove the nperm argument in the fgsea function call.

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