README.md

**F**isher’s Test for **E**nrichment and **D**epletion of **U**ser-Defined **P**athways [![Build status](https://ci.appveyor.com/api/projects/status/qc664qr0kavg99xq?svg=true)](https://ci.appveyor.com/project/rosscm/fedup) ![R-CMD-check](https://github.com/rosscm/fedup/workflows/R-CMD-check/badge.svg) ![R-CMD-check-bioc](https://github.com/rosscm/fedup/workflows/R-CMD-check-bioc/badge.svg) ![test-coverage](https://github.com/rosscm/fedup/workflows/test-coverage/badge.svg) [![codecov](https://codecov.io/gh/rosscm/fedup/branch/main/graph/badge.svg?token=AVOAV1ILVL)](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: wzxhzdk:0 Or install the development version from Github: wzxhzdk:1 Load necessary packages: wzxhzdk:2 # Running the package ## Input data Load test genes (`geneDouble`) and pathway annotations (`pathwaysGMT`): wzxhzdk:3 Take a look at the data structure: wzxhzdk:4 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: wzxhzdk:5 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: wzxhzdk:6 Let’s also view `fedup` results for `FASN_positive`, sorted by pvalue: wzxhzdk:7 ## Dot plot Prepare data for plotting via `dplyr` and `tidyr`: wzxhzdk:8 Plot significant results (qvalue < 0.05) in the form of a dot plot via `plotDotPlot`. Colour and facet the points by the `sign` column: wzxhzdk:9 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`: wzxhzdk:10 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): wzxhzdk:11 Cytoscape is open right? If so, run these lines and let the `plotFemap` magic happen: wzxhzdk:12 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. ![](inst/figures/fedupEM.png) 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:


rosscm/fedup documentation built on July 19, 2021, 2:21 a.m.