Skip to content

Commit 011982f

Browse files
committed
Merge branch 'markziemann-master'
2 parents 7282d85 + 95f9759 commit 011982f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

vignettes/fgsea-tutorial.Rmd

+18
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,21 @@ And running fgsea:
157157
fgseaRes <- fgsea(pathways, ranks, minSize=15, maxSize=500)
158158
head(fgseaRes)
159159
```
160+
161+
## Over-representation test
162+
163+
`fgsea` package also contains a function called `fora` for over-representation analysis based
164+
enrichment tests, based on the hypergeometric test.
165+
166+
`fora` requires a foreground set of genes of interest, a background set consisting of all
167+
robustly detected genes, and some pathways.
168+
169+
In the following example, the foreground (`fg`) consists of the 500 genes with the highest
170+
`stat` value.
171+
172+
```{r}
173+
fg <- names(head(exampleRanks[order(-exampleRanks)],500))
174+
bg <- names(exampleRanks)
175+
ora <- fora(genes=fg, universe=bg, pathways=examplePathways)
176+
head(ora)
177+
```

0 commit comments

Comments
 (0)