>
clusterProfiler Tutorial: GO Enrichment Analysis in R

clusterProfiler Tutorial: GO Enrichment Analysis in R

Last updated: March 13, 2026

📖 RNA-Seq Data Analysis Workflow — check it out for an overview.

What is clusterProfiler?

clusterProfiler is a software package for running functional enrichment analyses on gene lists, including GO enrichment analysis and pathway analysis.

Gene lists are commonly obtained by performing differential expression analysis (DEG analysis) on data from experiments such as RNA-Seq.

This page explains how to install and use clusterProfiler.

Installation

First, if R is not yet installed on your system, install it. (The example below uses Homebrew.)

$ brew install r

Launch R and run the following commands to install BiocManager and clusterProfiler.

> if (!requireNamespace("BiocManager", quietly=TRUE)) > install.packages("BiocManager") > BiocManager::install("clusterProfiler")

If the following command runs without errors, the installation was successful.

> library(clusterProfiler)

You also need to install the appropriate annotation package. The example below is for human.

> BiocManager::install("org.Hs.eg.db")

If the following command runs without errors, the installation was successful.

> library(org.Hs.eg.db)

Preparing the Data

Prepare your gene lists using a tool such as edgeR. You will need both a list of all genes (all_genes) and a list of differentially expressed genes (degs), as shown below.

> all_genes <- rownames(result) > degs <- rownames(result[result$FDR<0.05,])

For more details on how to use edgeR, see this page.

Running GO Enrichment Analysis

The following command performs enrichment analysis on the Biological Process category of Gene Ontology.

> ego <- enrichGO(gene=degs, universe=all_genes, OrgDb=org.Hs.eg.db, ont="BP", pvalueCutoff=0.01, qvalueCutoff=0.05)

The output looks like this.

ID Description ... geneID Count GO:0045930 GO:0045930 negative regulation of mitotic cell cycle ... ENSG00000010244/ENSG00000108691/ENSG0000019878... 5 GO:1901991 GO:1901991 negative regulation of mitotic cell cycle phas... ... ENSG00000010244/ENSG00000108691/ENSG0000019878... 4 GO:0045786 GO:0045786 negative regulation of cell cycle ... ENSG00000010244/ENSG00000108691/ENSG0000019878... 5 GO:0090329 GO:0090329 regulation of DNA-templated DNA replication ... ENSG00000198783/ENSG00000005156/ENSG00000172716 3 GO:1901988 GO:1901988 negative regulation of cell cycle phase transi... ... ENSG00000010244/ENSG00000108691/ENSG0000019878... 4 GO:0010948 GO:0010948 negative regulation of cell cycle process ... ENSG00000010244/ENSG00000108691/ENSG0000019878... 4

The enrichment analysis has produced a list of Gene Ontology terms that are significantly overrepresented among the differentially expressed genes compared to the full set of genes.

RNA-Seq Data Analysis Software

This is an RNA-Seq Data Analysis Software recommended for those who:

✔︎ Seeking to avoid outsourcing or collaboration for RNA-Seq data analysis.

✔︎ Lacking time to learn RNA-Seq data analysis.

✔︎ Frustrated by the complexity of existing tools.

overview

Users can perform gene expression quantification, identification of differentially expressed genes, gene ontology(GO) analysis, pathway analysis, as well as drawing volcano plots, MA plots, and heatmaps.

BxINFO LLC logo

BxINFO LLC

A research support company specializing in bioinformatics.

We provide tools and information to support life science research, with a focus on RNA-Seq analysis.

→ Learn more