Functional Enrichment and GO Annotation

Published

Jun 2026

After protein identifiers have been cleaned and annotation-ready lists have been prepared, the next step is functional enrichment and Gene Ontology annotation.

Functional enrichment helps move the analysis from individual proteins to biological processes, molecular functions, cellular components, and pathways.

In this results-first proteomics workflow, enrichment begins from the ranked and filtered protein lists generated in earlier chapters.

Starting Point

This chapter uses outputs from Chapter 07:

results/annotation-ready-gene-list.tsv
results/annotation-ready-protein-list.tsv
results/cleaned-protein-identifiers.tsv

These files were generated by:

Rscript scripts/R/07-clean-protein-identifiers.R \
  results/ranked-significant-proteins.tsv \
  results

The key input for GO enrichment is usually a clean gene or protein identifier list.

Why Functional Enrichment Matters

A list of differentially abundant proteins can be informative, but interpretation becomes stronger when proteins are summarized into biological functions.

Functional enrichment asks:

Are some biological functions represented more than expected?
        ↓
Are multiple proteins pointing to the same pathway?
        ↓
Do upregulated and downregulated proteins suggest different biology?
        ↓
Are the results coherent with the study question?

This helps avoid interpreting proteins one by one without broader biological context.

Main Enrichment Categories

Gene Ontology commonly organizes annotations into three major domains:

Biological Process
Molecular Function
Cellular Component

These are often abbreviated as:

BP
MF
CC

For example:

Biological Process   → immune response, translation, glycolysis
Molecular Function   → kinase activity, binding, transporter activity
Cellular Component   → mitochondrion, ribosome, extracellular matrix

Enrichment Input Strategy

This chapter prepares separate enrichment-ready inputs for:

all significant proteins
upregulated proteins
downregulated proteins

This separation is useful because proteins that increase and decrease may represent different biological patterns.

For example:

upregulated proteins   → activated or enriched functions in numerator condition
downregulated proteins → reduced functions in numerator condition

For the running example:

treated_vs_control

positive log2 fold change means higher abundance in treated.

Expected Input Files

The expected input files are:

results/cleaned-protein-identifiers.tsv
results/annotation-ready-gene-list.tsv
results/annotation-ready-protein-list.tsv

The most important table is:

results/cleaned-protein-identifiers.tsv

because it preserves regulation and ranking information.

Output Files

The enrichment-preparation script creates:

results/
├── enrichment-input-all-genes.tsv
├── enrichment-input-upregulated-genes.tsv
├── enrichment-input-downregulated-genes.tsv
├── enrichment-input-all-proteins.tsv
├── enrichment-input-upregulated-proteins.tsv
├── enrichment-input-downregulated-proteins.tsv
└── enrichment-input-summary.tsv

These files are ready to be used in GO, pathway, or web-based enrichment tools.

Enrichment Preparation Script

The executable script is saved as:

scripts/R/08-prepare-functional-enrichment-inputs.R

The guide shows how to run the script. The full executable code is maintained in scripts/R/.

Running the Script

From the project root, run:

Rscript scripts/R/08-prepare-functional-enrichment-inputs.R \
  results/cleaned-protein-identifiers.tsv \
  results

The arguments are:

1st argument → cleaned protein identifier table
2nd argument → output directory

Output 1: All Gene Inputs

The all-gene enrichment input is:

results/enrichment-input-all-genes.tsv

This file contains all available cleaned gene symbols from the significant protein table.

It is useful for enrichment tools that accept gene symbols.

Output 2: Upregulated Gene Inputs

The upregulated gene input is:

results/enrichment-input-upregulated-genes.tsv

This file contains gene symbols for proteins classified as upregulated.

For the running example:

upregulated → higher abundance in treated

Output 3: Downregulated Gene Inputs

The downregulated gene input is:

results/enrichment-input-downregulated-genes.tsv

This file contains gene symbols for proteins classified as downregulated.

For the running example:

downregulated → lower abundance in treated

Output 4: Protein Identifier Inputs

Some enrichment or pathway tools accept protein accessions instead of gene symbols.

The protein-list outputs are:

results/enrichment-input-all-proteins.tsv
results/enrichment-input-upregulated-proteins.tsv
results/enrichment-input-downregulated-proteins.tsv

These files are useful when working with UniProt-centered tools or protein-network tools.

Output 5: Enrichment Input Summary

The summary file is:

results/enrichment-input-summary.tsv

It records:

total cleaned proteins
gene symbols available
protein identifiers available
upregulated gene identifiers
downregulated gene identifiers
upregulated protein identifiers
downregulated protein identifiers

This summary helps confirm whether enough identifiers are available for enrichment.

Choosing an Identifier Type

The best identifier type depends on the enrichment method.

Common choices include:

gene symbols
Entrez IDs
Ensembl IDs
UniProt accessions
STRING identifiers

For this results-first edition, the workflow prepares gene-symbol and protein-accession lists.

Formal organism-specific conversion can be added later using annotation databases.

Organism Matters

GO enrichment is organism-specific.

A gene symbol such as:

TP53

must be interpreted in the correct organism context.

Before formal enrichment, document:

organism
identifier type
background set
database version
enrichment method
multiple-testing correction

Without this information, enrichment results can be difficult to reproduce.

Background Set

The enrichment background is the set of proteins that could have been detected and tested.

Possible backgrounds include:

all quantified proteins
all proteins in the differential abundance table
all proteins passing identification confidence filters
all proteins detected in the experiment

Using only significant proteins as both input and background is not appropriate.

For this results-first guide, the default practical background is:

all proteins in the differential abundance result table

When available, the full quantified protein table is better.

GO Enrichment Results

A typical GO enrichment result table may contain:

GO_ID
term_name
ontology
gene_count
background_count
p_value
adjusted_p_value
genes

Later visualization and interpretation chapters can use these columns to summarize enriched terms.

Example Interpretation Pattern

A good enrichment interpretation should connect enrichment results back to the comparison.

For example:

Proteins higher in treated were enriched for mitochondrial translation.

or:

Proteins lower in treated were enriched for extracellular matrix organization.

Avoid overinterpreting enrichment as proof of mechanism.

Enrichment suggests biological themes that need to be interpreted with the experimental design.

Relationship to STRING Analysis

Functional enrichment and STRING analysis are complementary.

GO enrichment asks:

Which functions are overrepresented?

STRING analysis asks:

Do the proteins form known or predicted interaction networks?

Both analyses help move from a protein list to biological interpretation.

Looking Ahead

The next chapter focuses on STRING network analysis.

Cleaned identifiers
        ↓
Functional enrichment inputs
        ↓
GO and pathway interpretation
        ↓
STRING network analysis
        ↓
Biological interpretation