fedup
Bioconductor package for pathway enrichment and depletion analysis via a Fisher's exact test on custom test sets and annotations
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 2 committers (50.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (18.9%) to scientific vocabulary
Keywords
bioconductor
enrichment
network
pathways
Last synced: 6 months ago
·
JSON representation
Repository
Bioconductor package for pathway enrichment and depletion analysis via a Fisher's exact test on custom test sets and annotations
Basic Info
- Host: GitHub
- Owner: rosscm
- License: mit
- Language: R
- Default Branch: main
- Homepage: https://rosscm.github.io/fedup/
- Size: 10.8 MB
Statistics
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
bioconductor
enrichment
network
pathways
Created over 5 years ago
· Last pushed over 4 years ago
Metadata Files
Readme
License
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "inst/figures/",
out.width = "100%"
)
```
**F**isher's Test for **E**nrichment and **D**epletion of **U**ser-Defined **P**athways
[](https://ci.appveyor.com/project/rosscm/fedup)



[](https://codecov.io/gh/rosscm/fedup)
`fedup` is an R package that tests for enrichment and depletion of user-defined
pathways using a Fisher's exact test. The method is designed for versatile
pathway annotation formats (eg. gmt, txt, xlsx) to allow the user to run
pathway analysis on custom annotations. This package is also
integrated with Cytoscape to provide network-based pathway visualization
that enhances the interpretability of the results.
This README will quickly demonstrate how to use `fedup` when testing two
sets of genes. Refer to full
[vignettes](https://www.bioconductor.org/packages/release/bioc/html/fedup.html)
for additional information and implementations (e.g., using single or
multiple test sets).
# Contents
- [System prerequisites](#system-prerequisites)
- [Installation](#installation)
- [Running the package](#running-the-package)
* [Input data](#input-data)
* [Pathway analysis](#pathway-analysis)
* [Dot plot](#dot-plot)
* [Enrichment map](#enrichment-map)
- [Versioning](#versioning)
- [Shoutouts](#shoutouts)
# System prerequisites
**R version** ≥ 4.1
**R packages**:
- **CRAN**: openxlsx, tibble, dplyr, data.table, ggplot2, ggthemes,
forcats, RColorBrewer
- **Bioconductor**: RCy3
# Installation
Install `fedup` from Bioconductor:
```{r, eval = FALSE, message = FALSE}
if(!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("fedup")
```
Or install the development version from Github:
```{r, message = FALSE}
devtools::install_github("rosscm/fedup", quiet = TRUE)
```
Load necessary packages:
```{r, message = FALSE}
library(fedup)
library(dplyr)
library(tidyr)
library(ggplot2)
```
# Running the package
## Input data
Load test genes (`geneDouble`) and pathway annotations (`pathwaysGMT`):
```{r}
data(geneDouble)
data(pathwaysGMT)
```
Take a look at the data structure:
```{r}
str(geneDouble)
str(head(pathwaysGMT))
```
To see more info on this data, run `?geneDouble` or `?pathwaysGMT`.
You could also run `example("prepInput", package = "fedup")` or
`example("readPathways", package = "fedup")` to see exactly how the
data was generated using the `prepInput()` and `readPathways()` functions.
`?` and `example()` can be used on any other functions mentioned here to
see their documentation and run examples.
## Pathway analysis
Now use `runFedup` on the sample data:
```{r}
fedupRes <- runFedup(geneDouble, pathwaysGMT)
```
The `fedupRes` output is a list of length `length(which(names(geneDouble) !=
"background"))`, corresponding to the number of test sets in `geneDouble`
(i.e., 2).
View `fedup` results for `FASN_negative` sorted by pvalue:
```{r}
set <- "FASN_negative"
print(head(fedupRes[[set]][which(fedupRes[[set]]$status == "enriched"),]))
print(head(fedupRes[[set]][which(fedupRes[[set]]$status == "depleted"),]))
```
Let's also view `fedup` results for `FASN_positive`, sorted by pvalue:
```{r}
set <- "FASN_positive"
print(head(fedupRes[[set]][which(fedupRes[[set]]$status == "enriched"),]))
print(head(fedupRes[[set]][which(fedupRes[[set]]$status == "depleted"),]))
```
## Dot plot
Prepare data for plotting via `dplyr` and `tidyr`:
```{r}
fedupPlot <- fedupRes %>%
bind_rows(.id = "set") %>%
separate(col = "set", into = c("set", "sign"), sep = "_") %>%
subset(qvalue < 0.05) %>%
mutate(log10qvalue = -log10(qvalue)) %>%
mutate(pathway = gsub("\\%.*", "", pathway)) %>%
mutate(status = factor(status, levels = c("enriched", "depleted"))) %>%
as.data.frame()
```
Plot significant results (qvalue < 0.05) in the form of a dot plot via
`plotDotPlot`. Colour and facet the points by the `sign` column:
```{r, fedupDotplot, fig.width = 11, fig.height = 15.5}
p <- plotDotPlot(
df = fedupPlot,
xVar = "log10qvalue",
yVar = "pathway",
xLab = "-log10(qvalue)",
fillVar = "sign",
fillLab = "Genetic interaction",
fillCol = c("#6D90CA", "#F6EB13"),
sizeVar = "fold_enrichment",
sizeLab = "Fold enrichment") +
facet_grid("sign", scales = "free", space = "free") +
theme(strip.text.y = element_blank())
print(p)
```
Look at all those chick... enrichments! This is a bit overwhelming, isn't it?
How do we interpret these 156 fairly redundant pathways in a way that doesn't
hurt our tired brains even more? Oh I know, let's use an enrichment map!
## Enrichment map
First, make sure to have
[Cytoscape](https://cytoscape.org/download.html) downloaded and and open
on your computer. You’ll also need to install the
[EnrichmentMap](http://apps.cytoscape.org/apps/enrichmentmap) (≥ v3.3.0) and
[AutoAnnotate](http://apps.cytoscape.org/apps/autoannotate) apps.
Then format results for compatibility with EnrichmentMap using `writeFemap`:
```{r}
resultsFolder <- tempdir()
writeFemap(fedupRes, resultsFolder)
```
Prepare a pathway annotation file (gmt format) from the pathway list you
passed to `runFedup` using the `writePathways` function (you don't need to run
this function if your pathway annotations are already in gmt format, but it
doesn't hurt to make sure):
```{r}
gmtFile <- tempfile("pathwaysGMT", fileext = ".gmt")
writePathways(pathwaysGMT, gmtFile)
```
Cytoscape is open right? If so, run these lines and let the `plotFemap`
magic happen:
```{r, fedupEM, eval = FALSE}
netFile <- tempfile("fedupEM", fileext = ".png")
plotFemap(
gmtFile = gmtFile,
resultsFolder = resultsFolder,
qvalue = 0.05,
chartData = "DATA_SET",
hideNodeLabels = TRUE,
netName = "fedupEM",
netFile = netFile
)
```
To note here, the EM nodes were coloured manually (by the same colours passed to
`plotDotPlot`) in Cytoscape via the *Change Colors* option in the EM panel.
A feature for automated dataset colouring is set to be released in
[version 3.3.2](https://github.com/BaderLab/EnrichmentMapApp/issues/455)
of EnrichmentMap.

This has effectively summarized the 156 pathways from our dot plot into 21
unique biological themes (including 4 unclustered pathways). We can now see
clear themes in the data pertaining to negative *FASN* genetic interactions,
such as `diseases glycosylation, proteins`, `golgi transport`, and
`rab regulation trafficking`. These can be compared and constrasted with the
enrichment seen for *FASN* positive interactions.
Try this out yourself! Hopefully it’s the only fedup you achieve
:grimacing:
# Versioning
For the versions available, see the [tags on this
repo](https://github.com/rosscm/fedup/tags).
# Shoutouts
:sparkles:[**2020**](https://media.giphy.com/media/z9AUvhAEiXOqA/giphy.gif):sparkles:
Owner
-
Name: Catherine Ross
-
Login: rosscm
-
Kind: user
-
Location: Toronto
-
Company: University of Toronto
-
Website: https://rosscm.github.io/
-
Twitter: cthrnrss
-
Repositories: 18
-
Profile: https://github.com/rosscm
Senior Bioinformatician @ Genentech / MSc @ UofT
GitHub Events
Total
Last Year
Committers
Last synced: over 2 years ago
Top Committers
Name
Email
Commits
Catherine Ross
c****s@m****a
338
Nitesh Turaga
n****a@g****m
1
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
-
Total issues: 1
-
Total pull requests: 7
-
Average time to close issues: 1 day
-
Average time to close pull requests: 1 minute
-
Total issue authors: 1
-
Total pull request authors: 1
-
Average comments per issue: 3.0
-
Average comments per pull request: 0.0
-
Merged pull requests: 6
-
Bot issues: 0
-
Bot pull requests: 0
Past Year
-
Issues: 0
-
Pull requests: 0
-
Average time to close issues: N/A
-
Average time to close pull requests: N/A
-
Issue authors: 0
-
Pull request authors: 0
-
Average comments per issue: 0
-
Average comments per pull request: 0
-
Merged pull requests: 0
-
Bot issues: 0
-
Bot pull requests: 0
Top Authors
Issue Authors
-
AlexanderPico
(1)
Pull Request Authors
-
rosscm
(7)
Top Labels
Issue Labels
enhancement (1)
Pull Request Labels
Packages
-
Total packages: 1
-
Total downloads:
-
bioconductor
7,163
total
-
Total dependent packages: 0
-
Total dependent repositories: 0
-
Total versions: 5
-
Total maintainers: 1
bioconductor.org:
fedup
Fisher's Test for Enrichment and Depletion of User-Defined Pathways
-
Homepage: https://github.com/rosscm/fedup
-
Documentation: https://bioconductor.org/packages/release/bioc/vignettes/fedup/inst/doc/fedup.pdf
-
License: MIT + file LICENSE
-
Latest release: 1.16.0
published 10 months ago
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Stargazers count: 15.1%
Forks count: 19.8%
Average: 24.2%
Downloads: 86.3%
Maintainers (1)
Last synced:
6 months ago
Dependencies
DESCRIPTION
cran
-
R
>= 4.0
depends
-
RColorBrewer
*
imports
-
RCy3
*
imports
-
data.table
*
imports
-
dplyr
*
imports
-
forcats
*
imports
-
ggplot2
*
imports
-
ggthemes
*
imports
-
openxlsx
*
imports
-
stats
*
imports
-
tibble
*
imports
-
utils
*
imports
-
biomaRt
*
suggests
-
covr
*
suggests
-
devtools
*
suggests
-
knitr
*
suggests
-
rmarkdown
*
suggests
-
rmdformats
*
suggests
-
testthat
*
suggests
-
tidyr
*
suggests