collapsePathwaysORA | R Documentation |
Collapse list of enriched pathways to independent ones. Version for ORA hypergeometric test.
collapsePathwaysORA(foraRes, pathways, genes, universe, pval.threshold = 0.05)
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'. |
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.
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]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.