NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

funkea: Functional Enrichment Analysis in Python

Benjamin Tenmann, Karina Close, Andrea Rodriguez-Martinez, Sam AbujudehOpenReview 2025

TL;DR

Genome-wide association studies (GWAS) are generating massive datasets, making it challenging to interpret the biological significance of identified genetic variants. This paper introduces funkea, a Python package that unifies popular functional enrichment analysis methods, offering a scalable and flexible solution for researchers to interpret GWAS results by linking them to biological pathways, cell types, and tissues.

What Problem Does This Paper Address?

Genome-wide association studies (GWAS) are incredibly powerful for identifying genetic variants associated with various traits and diseases. However, as GWAS become larger and more sophisticated, they produce vast numbers of "hits" – genetic variants that show a statistically significant association. The challenge lies in understanding what these hits mean biologically. Simply knowing a variant is associated with a disease isn't enough; researchers need to connect these variants to underlying biological mechanisms. Functional enrichment analysis aims to do this by determining if specific sets of biological features (like genes in a particular pathway, or genes expressed in a certain cell type) are disproportionately represented among the GWAS hits. While many methods exist for this, they are often developed as standalone command-line tools, lacking the scalability and unified interface needed for modern, large-scale genetics research.

Methods

funkea tackles this by providing a unified Python interface to five popular functional enrichment analysis methods: DEPICT, Fisher's exact test, GARFIELD, S-LDSC, and SNPsea. The core innovation is not in developing entirely new algorithms, but in creating a standardized framework. The package abstracts the process into two main stages:

  1. Data Pipeline: This stage transforms raw user input (GWAS summary statistics and genomic annotations) into a format usable by each enrichment method. This involves defining the space of genomic annotations (e.g., genes, regulatory regions) and how they are partitioned (e.g., by pathway, cell type).
  2. Enrichment Method: This stage applies the specific statistical test or model for each of the five methods to determine if a given partition is "enriched" with GWAS hits.

A key technical aspect is the integration of Apache Spark. This allows funkea to scale computations to handle virtually limitless datasets, a crucial requirement for modern GWAS. The paper also details specific implementations for computationally intensive tasks like LD pruning and hypergeometric tests within the Spark framework.

Datasets

The paper demonstrates funkea's capabilities using two example GWAS datasets:

  • Parkinson's Disease Study: Data from the OpenGWAS project (ID: ieu-b-7).
  • Cholesterol Study: Data from the UK Biobank.

The annotation data used for these demonstrations was a subset of the GTEx (Genotype-Tissue Expression) project data, specifically focusing on tissue expression. No new benchmarks or datasets were introduced by the paper itself.

Key Insights and Ideas

  • Unified Interface for Diverse Methods: The most significant insight is the realization that many functional enrichment methods share common underlying steps (data preparation, statistical testing). funkea leverages this by providing a single, plug-and-play interface, drastically simplifying the workflow for researchers who might otherwise need to learn and manage multiple disparate tools.
  • Scalability is Paramount: The paper strongly emphasizes that traditional, non-distributed tools are insufficient for current GWAS scales. By integrating Spark, funkea directly addresses this bottleneck, enabling analyses on massive datasets that were previously intractable.
  • Flexibility in Annotation: The framework is designed to be highly flexible, allowing users to apply enrichment analysis to any type of genomic annotation and any biologically relevant partitioning scheme (pathways, cell types, tissues, etc.) without needing to rewrite code for each new dataset or annotation source.

Key Results

The paper primarily focuses on the development and utility of the funkea package rather than presenting novel quantitative results from new biological discoveries. The key "result" is the successful implementation of a unified, scalable platform.

  • Demonstration of Functionality: The paper shows example outputs (Figure 1) illustrating tissue enrichment results from GWAS on cholesterol and Parkinson's disease, demonstrating that funkea can effectively produce interpretable visualizations of enrichment across different tissues.
  • Scalable Implementations: The inclusion of Spark-based implementations for LD pruning and hypergeometric tests ensures that core computational tasks can be performed efficiently at scale.

Limitations and Future Work

  • Limited Method Set: While funkea unifies five popular methods, it does not include all available functional enrichment methods. The authors acknowledge this implicitly by focusing on these five.
  • FDR Correction for DEPICT: The paper notes that for the DEPICT method, the false discovery rate (FDR) estimation step (which involves running N repetitions with randomly generated loci) was not included in the Python package for consistency. This means users might need to perform this step separately if a robust FDR is critical for their analysis using DEPICT.
  • Future Work: The paper doesn't explicitly detail future work, but the inherent flexibility of the funkea framework suggests that adding more enrichment methods or annotation sources would be a natural next step. Further optimization of Spark jobs for specific hardware configurations could also be an area for improvement.

Summary updated

BibTeX
@misc{tenmann2025funkea,
  author = {Benjamin Tenmann and Karina Close and Andrea Rodriguez-Martinez and Sam Abujudeh},
  title = {{funkea: Functional Enrichment Analysis in Python}},
  year = {2025},
  url = {https://openreview.net/forum?id=R1MltnIwy3},
  howpublished = {OpenReview},
}
Figure