Skip to content

Commit

Permalink
fora example in vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
markziemann committed Jul 17, 2024
1 parent eea285e commit 95f9759
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions vignettes/fgsea-tutorial.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,21 @@ And running fgsea:
fgseaRes <- fgsea(pathways, ranks, minSize=15, maxSize=500)
head(fgseaRes)
```

## Over-representation test

`fgsea` package also contains a function called `fora` for over-representation analysis based
enrichment tests, based on the hypergeometric test.

`fora` requires a foreground set of genes of interest, a background set consisting of all
robustly detected genes, and some pathways.

In the following example, the foreground (`fg`) consists of the 500 genes with the highest
`stat` value.

```{r}
fg <- names(head(exampleRanks[order(-exampleRanks)],500))
bg <- names(exampleRanks)
ora <- fora(genes=fg, universe=bg, pathways=examplePathways)
head(ora)
```

0 comments on commit 95f9759

Please sign in to comment.