Install & Compatibility
Where this runs
tested against v1.6.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.9
✕ build_error
✓ 31.5s
595MB installed
● package 595MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
GOEnrichmentStudy
✓ from goatools.goea.go_enrichment_ns import GOEnrichmentStudy
✗ from goatools import GOEnrichmentStudy
Basic workflow: load GO DAG, load associations, run enrichment study.
from goatools import GOEnrichmentStudy
from goatools.obo_parser import GODag
from goatools.associations import read_associations
# Download go-basic.obo from http://geneontology.org/ontology/go-basic.obo
obodag = GODag('go-basic.obo')
# Load gene-to-GO associations (tab-separated: gene_id\tGO_id)
assoc = read_associations('gene2go.tsv', obodag, no_top=True)
# List of gene IDs of interest (e.g., from RNA-seq)
gene_list = ['GENE1', 'GENE2', 'GENE3']
# Background population (e.g., all genes in genome)
population = list(assoc.keys())
# Run enrichment
goea = GOEnrichmentStudy(population, assoc, obodag, propagate_count=True, alpha=0.05)
results = goea.run_study(gene_list)
print(results[:5])
Upgrade
Version history
1.6.5latest on PyPI · released May 12, 2026
Audit
Dependencies
pandasrequiredData manipulation for gene lists and results
numpyrequiredNumerical computations
scipyrequiredStatistical tests (Fisher's exact test)