{"id":22957042,"url":"https://github.com/rosscm/fedup","last_synced_at":"2025-09-07T22:40:44.337Z","repository":{"id":51040610,"uuid":"302429834","full_name":"rosscm/fedup","owner":"rosscm","description":"Bioconductor package for pathway enrichment and depletion analysis via a Fisher's exact test on custom test sets and annotations","archived":false,"fork":false,"pushed_at":"2021-07-12T21:36:30.000Z","size":11295,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-31T03:56:53.849Z","etag":null,"topics":["bioconductor","enrichment","network","pathways"],"latest_commit_sha":null,"homepage":"https://rosscm.github.io/fedup/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rosscm.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-08T18:32:57.000Z","updated_at":"2024-07-19T15:24:20.000Z","dependencies_parsed_at":"2022-08-24T19:41:32.175Z","dependency_job_id":null,"html_url":"https://github.com/rosscm/fedup","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/rosscm/fedup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosscm%2Ffedup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosscm%2Ffedup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosscm%2Ffedup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosscm%2Ffedup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rosscm","download_url":"https://codeload.github.com/rosscm/fedup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosscm%2Ffedup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274107883,"owners_count":25223472,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bioconductor","enrichment","network","pathways"],"created_at":"2024-12-14T17:14:56.494Z","updated_at":"2025-09-07T22:40:44.316Z","avatar_url":"https://github.com/rosscm.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"inst/figures/\",\n  out.width = \"100%\"\n)\n```\n\n\u003cdiv align=\"center\"\u003e\n\n**F**isher's Test for **E**nrichment and **D**epletion of **U**ser-Defined **P**athways\n\n\u003cimg align=\"right\" width=\"300\" height=\"345\" src=\"inst/figures/fedup.png\"\u003e\n\n[![Build status](https://ci.appveyor.com/api/projects/status/qc664qr0kavg99xq?svg=true)](https://ci.appveyor.com/project/rosscm/fedup)\n![R-CMD-check](https://github.com/rosscm/fedup/workflows/R-CMD-check/badge.svg)\n![R-CMD-check-bioc](https://github.com/rosscm/fedup/workflows/R-CMD-check-bioc/badge.svg)\n![test-coverage](https://github.com/rosscm/fedup/workflows/test-coverage/badge.svg)\n[![codecov](https://codecov.io/gh/rosscm/fedup/branch/main/graph/badge.svg?token=AVOAV1ILVL)](https://codecov.io/gh/rosscm/fedup)\n\n\u003cdiv align=\"left\"\u003e\n\n`fedup` is an R package that tests for enrichment and depletion of user-defined\npathways using a Fisher's exact test. The method is designed for versatile\npathway annotation formats (eg. gmt, txt, xlsx) to allow the user to run\npathway analysis on custom annotations. This package is also\nintegrated with Cytoscape to provide network-based pathway visualization\nthat enhances the interpretability of the results.\n\nThis README will quickly demonstrate how to use `fedup` when testing two\nsets of genes. Refer to full\n[vignettes](https://www.bioconductor.org/packages/release/bioc/html/fedup.html)\nfor additional information and implementations (e.g., using single or\nmultiple test sets).\n\n# Contents\n\n- [System prerequisites](#system-prerequisites)\n- [Installation](#installation)\n- [Running the package](#running-the-package)\n  * [Input data](#input-data)\n  * [Pathway analysis](#pathway-analysis)\n  * [Dot plot](#dot-plot)\n  * [Enrichment map](#enrichment-map)\n- [Versioning](#versioning)\n- [Shoutouts](#shoutouts)\n\n# System prerequisites\n\n**R version** ≥ 4.1  \n**R packages**:\n\n-   **CRAN**: openxlsx, tibble, dplyr, data.table, ggplot2, ggthemes,\n    forcats, RColorBrewer  \n-   **Bioconductor**: RCy3\n\n# Installation\n\nInstall `fedup` from Bioconductor:\n\n```{r, eval = FALSE, message = FALSE}\nif(!requireNamespace(\"BiocManager\", quietly = TRUE))\n    install.packages(\"BiocManager\")\nBiocManager::install(\"fedup\")\n```\n\nOr install the development version from Github:\n\n```{r, message = FALSE}\ndevtools::install_github(\"rosscm/fedup\", quiet = TRUE)\n```\n\nLoad necessary packages:\n\n```{r, message = FALSE}\nlibrary(fedup)\nlibrary(dplyr)\nlibrary(tidyr)\nlibrary(ggplot2)\n```\n\n# Running the package\n## Input data\n\nLoad test genes (`geneDouble`) and pathway annotations (`pathwaysGMT`):\n\n```{r}\ndata(geneDouble)\ndata(pathwaysGMT)\n```\n\nTake a look at the data structure:\n\n```{r}\nstr(geneDouble)\nstr(head(pathwaysGMT))\n```\n\nTo see more info on this data, run `?geneDouble` or `?pathwaysGMT`.\nYou could also run `example(\"prepInput\", package = \"fedup\")` or\n`example(\"readPathways\", package = \"fedup\")` to see exactly how the\ndata was generated using the `prepInput()` and `readPathways()` functions.\n`?` and `example()` can be used on any other functions mentioned here to\nsee their documentation and run examples.\n\n## Pathway analysis\n\nNow use `runFedup` on the sample data:\n\n```{r}\nfedupRes \u003c- runFedup(geneDouble, pathwaysGMT)\n```\n\nThe `fedupRes` output is a list of length `length(which(names(geneDouble) !=\n\"background\"))`, corresponding to the number of test sets in `geneDouble`\n(i.e., 2).\n\nView `fedup` results for `FASN_negative` sorted by pvalue:\n\n```{r}\nset \u003c- \"FASN_negative\"\nprint(head(fedupRes[[set]][which(fedupRes[[set]]$status == \"enriched\"),]))\nprint(head(fedupRes[[set]][which(fedupRes[[set]]$status == \"depleted\"),]))\n```\n\nLet's also view `fedup` results for `FASN_positive`, sorted by pvalue:\n\n```{r}\nset \u003c- \"FASN_positive\"\nprint(head(fedupRes[[set]][which(fedupRes[[set]]$status == \"enriched\"),]))\nprint(head(fedupRes[[set]][which(fedupRes[[set]]$status == \"depleted\"),]))\n```\n\n## Dot plot\n\nPrepare data for plotting via `dplyr` and `tidyr`:\n\n```{r}\nfedupPlot \u003c- fedupRes %\u003e%\n    bind_rows(.id = \"set\") %\u003e%\n    separate(col = \"set\", into = c(\"set\", \"sign\"), sep = \"_\") %\u003e%\n    subset(qvalue \u003c 0.05) %\u003e%\n    mutate(log10qvalue = -log10(qvalue)) %\u003e%\n    mutate(pathway = gsub(\"\\\\%.*\", \"\", pathway)) %\u003e%\n    mutate(status = factor(status, levels = c(\"enriched\", \"depleted\"))) %\u003e%\n    as.data.frame()\n```\n\nPlot significant results (qvalue \u003c 0.05) in the form of a dot plot via\n`plotDotPlot`. Colour and facet the points by the `sign` column:\n\n```{r, fedupDotplot, fig.width = 11, fig.height = 15.5}\np \u003c- plotDotPlot(\n        df = fedupPlot,\n        xVar = \"log10qvalue\",\n        yVar = \"pathway\",\n        xLab = \"-log10(qvalue)\",\n        fillVar = \"sign\",\n        fillLab = \"Genetic interaction\",\n        fillCol = c(\"#6D90CA\", \"#F6EB13\"),\n        sizeVar = \"fold_enrichment\",\n        sizeLab = \"Fold enrichment\") +\n    facet_grid(\"sign\", scales = \"free\", space = \"free\") +\n    theme(strip.text.y = element_blank())\nprint(p)\n```\n\nLook at all those chick... enrichments! This is a bit overwhelming, isn't it?\nHow do we interpret these 156 fairly redundant pathways in a way that doesn't\nhurt our tired brains even more? Oh I know, let's use an enrichment map!\n\n## Enrichment map\n\nFirst, make sure to have\n[Cytoscape](https://cytoscape.org/download.html) downloaded and and open\non your computer. You’ll also need to install the\n[EnrichmentMap](http://apps.cytoscape.org/apps/enrichmentmap) (≥ v3.3.0) and\n[AutoAnnotate](http://apps.cytoscape.org/apps/autoannotate) apps.\n\nThen format results for compatibility with EnrichmentMap using `writeFemap`:\n\n```{r}\nresultsFolder \u003c- tempdir()\nwriteFemap(fedupRes, resultsFolder)\n```\n\nPrepare a pathway annotation file (gmt format) from the pathway list you\npassed to `runFedup` using the `writePathways` function (you don't need to run\nthis function if your pathway annotations are already in gmt format, but it\ndoesn't hurt to make sure):\n\n```{r}\ngmtFile \u003c- tempfile(\"pathwaysGMT\", fileext = \".gmt\")\nwritePathways(pathwaysGMT, gmtFile)\n```\n\nCytoscape is open right? If so, run these lines and let the `plotFemap`\nmagic happen:\n\n```{r, fedupEM, eval = FALSE}\nnetFile \u003c- tempfile(\"fedupEM\", fileext = \".png\")\nplotFemap(\n    gmtFile = gmtFile,\n    resultsFolder = resultsFolder,\n    qvalue = 0.05,\n    chartData = \"DATA_SET\",\n    hideNodeLabels = TRUE,\n    netName = \"fedupEM\",\n    netFile = netFile\n)\n```\n\nTo note here, the EM nodes were coloured manually (by the same colours passed to\n`plotDotPlot`) in Cytoscape via the *Change Colors* option in the EM panel.\nA feature for automated dataset colouring is set to be released in\n[version 3.3.2](https://github.com/BaderLab/EnrichmentMapApp/issues/455)\nof EnrichmentMap.\n\n![](inst/figures/fedupEM.png)\n\nThis has effectively summarized the 156 pathways from our dot plot into 21\nunique biological themes (including 4 unclustered pathways). We can now see\nclear themes in the data pertaining to negative *FASN* genetic interactions,\nsuch as `diseases glycosylation, proteins`, `golgi transport`, and\n`rab regulation trafficking`. These can be compared and constrasted with the\nenrichment seen for *FASN* positive interactions.\n\nTry this out yourself! Hopefully it’s the only fedup you achieve\n:grimacing:\n\n# Versioning\n\nFor the versions available, see the [tags on this\nrepo](https://github.com/rosscm/fedup/tags).\n\n# Shoutouts\n\n:sparkles:[**2020**](https://media.giphy.com/media/z9AUvhAEiXOqA/giphy.gif):sparkles:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosscm%2Ffedup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frosscm%2Ffedup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosscm%2Ffedup/lists"}