collapsePathwaysORA {fgsea} | R Documentation

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

### Description

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

### Usage

    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

    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]

[Package fgsea version 1.16.0 Index]