Zubair Khalid

Virologist/Molecular Biologist | Veterinarian | Bioinformatician

Conventional & Molecular Virology • Vaccine Development • Computational Biology

Dr. Zubair Khalid is a veterinarian and virologist specializing in conventional and molecular virology, vaccine development, and computational biology. Dedicated to advancing animal health through innovative research and multi-omics approaches.

Dr. Zubair Khalid - Veterinarian, Virologist, and Vaccine Development Researcher specializing in Computational Biology, Multi-omics, Animal Health, and Infectious Disease Research

Category: Guides

Gene Ontology Background Set

This guide explains what a gene ontology background set is and why it matters for functional enrichment analysis. It is intended for bioinformatics trainees, researchers performing RNA-seq or differential expression analysis, and anyone who needs to interpret Gene Ontology (GO) results rigorously. A background set defines the pool of genes that serves as the reference for statistical tests, and choosing it incorrectly can produce misleading biological conclusions. NCBI Bookshelf provides authoritative background on GO analysis principles, while EMBL-EBI Training offers practical tutorials on enrichment workflows.


At a Glance

Aspect Key Point
Definition The set of all genes considered “testable” in your experiment
Purpose Provides the universe for hypergeometric or Fisher’s exact tests
Default error Using all genome annoted genes when your assay only measured a subset
Critical decision Match background to the measurable gene space (e.g., expressed genes, array probes)
Validation steps Check overlap with detected features, review bias in gene length or expression
Common pitfalls Ignoring platform bias, mixing species, using organism defaults without thought

Core Concepts: What Is a Background Set?

In GO enrichment analysis, you test whether a set of differentially expressed genes (or other gene list of interest) contains more terms from a particular GO category than expected by chance. The “expected by chance” calculation depends on the background set. If you have 100 differentially expressed genes and 14 of them are annotated to “DNA repair”, you need to know how many genes in the entire experiment are annotated to “DNA repair” to compute significance.

The background set is that entire experimental universe. If you used RNA-seq, the background should typically be all genes that were expressed above a detection threshold in your samples, not all genes in the genome. If you used a microarray, it should be all genes represented on the array. If you used a targeted panel, only the targeted genes belong in the background.

Galaxy Training Network materials emphasize that background selection directly affects the false discovery rate. Using an excessively large background (e.g., whole genome) inflates p-values for categories where many genes are never measured, leading to false negatives. Conversely, a background that is too small can cause false positives because the reference pool is too narrow.


Decision Criteria: Selecting an Appropriate Background

Choose your background set based on three factors:

  1. The technology that generated your gene list , RNA-seq detects actively transcribed genes, whole genome arrays detect all probe sets, targeted panels detect a fixed gene list. The background must mirror that detection space.
  2. The filtering steps you applied , If you removed lowly expressed genes before differential testing, those genes cannot be part of the background because they were never eligible to appear in your foreground list.
  3. The biological question , For a comparison between disease and control, the background is often the union of all expressed genes across both conditions. For a single condition study (e.g., ChIP-seq peaks near genes), use the set of all genes that could have a peak within a defined window.

Bioconductor documentation for packages like clusterProfiler and topGO advises users to explicitly set the universe parameter. When left at default, many tools use all genes in the organism’s annotation, which is rarely correct.

A common decision tree emerges:

  • Does your experiment measure all genes? If yes, then whole genome background may be acceptable (but only if all genes are truly detectable).
  • If you filtered by expression, abundance, or detection p-value, then background = set of genes passing the filter.
  • If you used a commercial array, background = genes on the array library.
  • If you studied a specific pathway via PCR panel, background = panel genes only.

Practical Workflow: From Data to Background Set

Follow these implementation steps adapted from EMBL-EBI Training protocols:

Step 1: Define the measurable gene universe.
After quantification but before any filtering, identify the identifier type (Ensembl, Entrez, gene symbol). Record how many features were quantified. For RNA-seq, this includes all transcripts with at least one read count.

Step 2: Apply your quality and detection filters.
Remove lowly expressed genes, genes with high missingness, or genes that fail normalization criteria. The set of retained genes becomes your candidate background. Document the filtering thresholds (e.g., keep genes with CPM > 1 in at least three samples).

Step 3: Map identifiers to GO annotations.
Use a curated annotation source. The GO consortium provides monthly GO annotations for major species. NCBI Bookshelf has chapters on accessing these annotations via FTP or APIs.

Step 4: Run enrichment analysis with explicit background.
In R with clusterProfiler, use enrichGO(universe = background_genes). In Python with GOATOOLS, pass the background list as the population. Verify that the number of background genes matches your filtered feature count.

Step 5: Examine overlap between foreground and background.
Check that your foreground list (e.g., upregulated genes) is a subset of your background list. If not, you likely have identifier mismatches.


Quality Checks and Validation

Before accepting any enrichment result, perform these checks:

  • Overlap test: How many foreground genes have GO annotations? If less than 50%, your annotation mapping may be incomplete or your gene list may contain non coding features that are poorly annotated.
  • Background size consistency: Does the background set size equal the number of features after filtering? If it is much larger, you may have included unexpressed genes.
  • Gene length bias test: Longer genes generate more reads and are more likely to be detected as differentially expressed. If your background includes all genes, but your foreground is enriched for long genes, GO terms associated with long genes (often those with many introns) can appear significant spuriously. Use a gene length correction or restrict background to genes with similar length distributions.
  • Term frequency in background: Check that the proportion of background genes annotated to a GO term is not unreasonably high or low. For example, “mitochondrial translation” should cover a few hundred genes in human, not thousands.

NCBI Sequence Read Archive data can be used to generate control sets: randomly sample an equal number of expressed genes from your background and repeat the enrichment to see if your results differ from random expectation.


Common Mistakes and How to Avoid Them

Mistake 1: Using the whole genome as background for RNA-seq.
This inflates the reference size and buries real signals. Fix: Use only genes with expression above detection threshold.

Mistake 2: Mixing gene identifiers from different versions.
If foreground uses Ensembl v108 but background uses Ensembl v75, many annotations will fail to map. Fix: Use a consistent build across all data.

Mistake 3: Including genes with no GO annotation in the background.
While including unannotated genes is standard, it reduces statistical power. Some tools allow restricting background to only genes that have at least one annotation. Consider both approaches and report which you used. Bioconductor vignettes show how to filter background to “all annotated genes”.

Mistake 4: Ignoring multi mapping or ambiguous features.
For microarray backgrounds, include all probe sets, even those that map to multiple genes, or remove them entirely. In RNA-seq, multimapping reads can cause spurious expression calls. Document how you handled these.

Mistake 5: Assuming the default background in a tool is correct.
Many tools default to “all genes in organism database”. Always override it with your computed set.


Limits of Interpretation and Uncertainty

A background set cannot rescue poor experimental design. If your foreground list is contaminated by technical artifacts or if your gene list is derived from a biased filtering pipeline, even a correct background will produce misleading GO terms.

GO enrichment tests treat genes as independent, but they are not. Pathway co regulation, gene duplication, and shared regulation create dependencies that violate the hypergeometric distribution assumption. Background correction does not solve this, it only sets the denominator.

Another limit is annotation bias. Well studied genes have more GO terms, and highly expressed genes are more likely to have functional annotations. A background set that includes many uncharacterized genes will shift significance toward terms associated with well studied families. Publications such as "The miR-16-1-3p passenger strand exhibits functional activity and suppresses malignant phenotypes in osteosarcoma" highlight that even single passenger strands can have activity, yet their GO annotation may be incomplete. Similarly, a study on telomere related genes in colon adenocarcinoma used a curated background to avoid bias from unannotated genes.

When background set size is small (e.g., fewer than 500 genes), enrichment tests become unreliable because the sampling distribution is too sparse. In that case, consider using a rank based approach like GSEA, which does not require a dichotomous background.

Finally, background sets are specific to the species, tissue, and condition. Transcriptomic remodeling of bone marrow mesenchymal stromal cells in pediatric B cell acute lymphoblastic leukemia demonstrates that a background derived from healthy marrow may not be appropriate for a leukemia context because the measurable gene space changes.


Frequently Asked Questions

Can I use the same background set for multiple comparisons?
Yes, if the measurable gene universe remains unchanged. For example, if you test different contrasts from the same RNA-seq experiment, use the same background (e.g., all expressed genes) for each contrast. Changing the background across tests breaks comparability.

What if I do not have a defined background set and cannot compute one?
You can use the entire genome annotated for your organism, but you must explicitly note this as a limitation. The results will likely miss terms that are enriched only among expressed genes. This is acceptable for exploratory analysis but not for publication level claims.

Should I include non coding genes in the background?
Only if your foreground list also includes non coding genes. Mixing coding and non coding without accounting for annotation differences can bias enrichment toward terms associated with either group. Separate analyses for mRNA and lncRNA are recommended.

My foreground list was generated from a public dataset. How do I reconstruct the background?
Look for the original count matrix or the list of all quantified genes in the supplementary materials. If unavailable, approximate the background by using the set of all genes present in the expression matrix after filtering, as described in the methods section of the source paper. A study on manganese metabolism related gene signatures for tuberculosis used this approach by checking supplementary tables.


References and Further Reading


Related Articles