> For the complete documentation index, see [llms.txt](https://academy.dnanexus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://academy.dnanexus.com/public-datasets-on-the-dnanexus-platform/target-validation/pathway-enrichment-analysis.md).

# Pathway Enrichment Analysis

Pathway enrichment analysis

## Necessary Disclaimers and Legal

The user is responsible for reviewing and complying with the license requirements of the software, notebooks, and data referenced in this documentation.

Users are responsible for the costs associated with analyzing notebooks and its storage in their project spaces.&#x20;

Instance type availability and pricing are subject to the contract between the user or the user’s organization and DNAnexus.

## Overview

Pathway enrichment analysis is a computational method used to identify biological pathways or gene sets that are statistically overrepresented in a list of genes of interest, such as differentially expressed genes from an RNA-seq experiment. By mapping genes to known biological pathways, enrichment analysis provides mechanistic insight into the underlying biology driving observed gene expression changes.&#x20;

DNAnexus platform provides two notebooks for pathway enrichment analysis:

* ClusterProfiler: a comprehensive R package for statistical analysis and visualization of functional profiles, supporting Gene Ontology (GO), Reactome, and MSigDB pathway databases via Over-Representation Analysis (ORA) and Gene Set Enrichment Analysis (GSEA).
* gget enrichr:  a Python-based tool that queries the Enrichr database directly, enabling fast and flexible enrichment analysis with support for custom background gene sets.

## Citations for ClusterProfiler and gget

ClusterProfiler:

* [Using clusterProfiler to characterize multiomics data (2024)](https://www.nature.com/articles/s41596-024-01020-z)
* [clusterProfiler: an R package for comparing biological themes among gene clusters (2012)](https://pubmed.ncbi.nlm.nih.gov/22455463/)
* Official documentation:[ Biomedical Knowledge Mining using GOSemSim and clusterProfiler](https://yulab-smu.top/biomedical-knowledge-mining-book/)

gget:

* [Efficient querying of genomic reference databases with gget (2023)](https://academic.oup.com/bioinformatics/article/39/1/btac836/6971843)
* Official documentation:[ gget Introduction](https://pachterlab.github.io/gget/en/introduction.html)

## Running analyses on DNAnexus

### Copying enrichment analysis notebooks into a project

To explore the demo analysis, copy the notebooks from the public project into your own project space. Follow these steps to copy the notebooks:

1. Create a project for your enrichment analysis, billed to your own organization. Tutorials on project setup can be found[ here](https://academy.dnanexus.com/overview-of-the-platform/setting-up-a-project).
2. Navigate to the Resources tab, locate the project titled "Public Datasets AWS US (East)," and select the "ClusterProfiler" folder.

<figure><img src="/files/H2iAFi5yJM3mrRq3wwVA" alt=""><figcaption></figcaption></figure>

3. Select the two notebooks and one example dataset.
4. Click "Copy" in the top-right menu and select the project created in Step 1.
5. Return to your project space to begin exploring the notebooks.
6. To run the notebooks, refer to the[ JupyterLab](https://academy.dnanexus.com/interactivecloudcomputing/jupyterlab/introduction) section of the Academy documentation, which includes instructions for the standard environment.

### Example of enrichment analysis notebooks

We have provided two notebooks for the demo enrichment analysis: "ClusterProfiler\_ReactomePA\_R\_dxjupyterlab.ipynb" and "gget\_enrich\_notebook\_dxjupyterlab.ipynb". Both are optimized for the [JupyterLab with Python, R, Stata, ML, Image Processing](https://academy.dnanexus.com/interactivecloudcomputing/jupyterlab) environment (version 2.11).

For "ClusterProfiler\_ReactomePA\_R\_dxjupyterlab.ipynb", please follow the instructions of installing packages in the notebook.

For gget\_enrich\_notebook\_dxjupyterlab.ipynb notebook, you can use the snapshot snapshot-target\_validation-jupyterlab-xxxx-xx-xx.tar.gz, which is available in the "Notebook\_snapshot" folder within "Public Datasets *Region*". <br>

<figure><img src="/files/lsYC1k2JaMUvur9cOTa6" alt=""><figcaption></figcaption></figure>

To use the snapshot, choose this snapshot in the Snapshot box when you start the JupyterLab.

<img src="/files/gi2xXEdHsTJH9eNvwi5l" alt="" height="351" width="624">

After launching, select the appropriate kernel and instance type from the table below.

| Notebook                                           | Instance Type                         | Kernel                   |
| -------------------------------------------------- | ------------------------------------- | ------------------------ |
| gget\_enrich\_notebook\_dxjupyterlab.ipynb         | <p>mem1\_ssd1\_v2\_x16</p><p><br></p> | <p><br></p>              |
| ClusterProfiler\_ReactomePA\_R\_dxjupyterlab.ipynb | <p>mem1\_ssd1\_v2\_x16</p><p><br></p> | Clusterprofile (R 4.4.3) |

<img src="/files/w2JTk8lIulmusFhxd2Wv" alt="" height="351" width="624">

Note: Notebook filenames may include a timestamp. If multiple versions are available, please use the most recent one.
