collapsePathwaysORA: Collapse list of enriched pathways to independent ones....

Description Usage Arguments Value Examples

View source: R/fgseaORA.R

Description

Collapse list of enriched pathways to independent ones. Version for ORA hypergeometric test.

Usage

1
collapsePathwaysORA(foraRes, pathways, genes, universe, pval.threshold = 0.05)

Arguments

foraRes

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'.

genes

Set of query genes, same as in 'fora()'

universe

A universe from whiche 'genes' were selected, same as in 'fora()'

pval.threshold

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

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
 8
 9
10
data(examplePathways)
data(exampleRanks)
foraRes <- fora(examplePathways, genes=tail(names(exampleRanks), 200), universe=names(exampleRanks))
collapsedPathways <- collapsePathwaysORA(foraRes[order(pval)][padj < 0.01],
                                             examplePathways,
                                             genes=tail(names(exampleRanks), 200),
                                             universe=names(exampleRanks))

mainPathways <- foraRes[pathway %in% collapsedPathways$mainPathways][
                          order(pval), pathway]

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