https://github.com/ccicb/easyenrich

Find elements that occur more frequently in one cohort compared to another

https://github.com/ccicb/easyenrich

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.4%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

Find elements that occur more frequently in one cohort compared to another

Basic Info
  • Host: GitHub
  • Owner: CCICB
  • License: other
  • Language: R
  • Default Branch: main
  • Homepage:
  • Size: 55.7 KB
Statistics
  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```

# easyenrich


[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![CRAN status](https://www.r-pkg.org/badges/version/easyenrich)](https://CRAN.R-project.org/package=easyenrich)


Test whether counts of an element differs between 2 groups. For example identify which genes are present at different rates in lists of 'mutated genes' from two different cohorts. **easyenrich** creates 1 contingency table for every element in a list of vectors, summarising counts of their presence/absence in each cohort (represented as the different vectors in the list). It also runs the fisher test, applies MTC, and produces forest plots to visualise the results.


## Installation

You can install the development version of easyenrich like so:

``` r
if (!require("remotes"))
    install.packages("remotes")

remotes::install_github("CCICB/easyenrich")
```

## Quick Start


```{r example, fig.height=3, fig.width=7}
library(easyenrich)

#Step 1: Create a list of two or more vectors.  
input <- list(
 colorectal = c("APC", "APC", "APC", "TP53", "APC"),
 melanoma = c("BRAF", "BRAF", "BRAF", "BRAF", "BRAF", "TP53", "APC")
)

# Step 2: Create contingency tables
contingency_tables <- list_to_contingency_tables(input)

# Step 3: Compute fisher p values & odds ratios
# Odds ratios can be interpreted as the relative odds of seeing gene  in a colorectal cancer VS melanoma (based on order of cohorts in original input list)
comparison <- contingency_tables_to_fisher(contingency_tables)

# Step 4: Sort results based on fdr and print result
comparison[order(comparison$fdr),]

# Step 5: Visualise Results
plot_rainforest(comparison)
```

Owner

  • Name: CCICB
  • Login: CCICB
  • Kind: organization

GitHub Events

Total
  • Member event: 1
  • Push event: 4
  • Create event: 2
Last Year
  • Member event: 1
  • Push event: 4
  • Create event: 2

Dependencies

DESCRIPTION cran
  • rlang * imports
  • ggplot2 * suggests
  • scales * suggests
  • testthat >= 3.0.0 suggests