--- id: gseapy version: "1.3.1" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # gseapy — Gene Set Enrichment Analysis in Python License: permissive · Maintenance: active · Downloads: 249.9K/mo ## What it is and what it does GSEApy is a Python/Rust implementation of gene set enrichment analysis that brings GSEA functionality and Enrichr API access into a Python environment. It supports multiple analysis methods—standard GSEA, prerank (with a faithful Rust port of fgsea's multilevel algorithm for resolving p-values below 1/permutation_num), single-sample GSEA (ssGSEA), and GSVA—making it suitable for RNA-seq, ChIP-seq, and microarray data. The package can work with expression matrices, ranked gene lists, or Enrichr libraries, and produces publication-quality figures via matplotlib. The package is designed for both interactive Python workflows and command-line batch processing. It accepts standard GSEA file formats (GMT, GCT, RNK, CLS) and can work directly with pandas DataFrames and Series, eliminating the need to switch between Python and desktop GSEA tools. A biomart module also enables gene ID conversion. Runtime dependencies are numpy, scipy, pandas, matplotlib, and requests—all widely used scientific Python libraries. Use it for: - Identify significantly enriched biological pathways in RNA-seq differential expression results using prerank with gene rankings. - Perform single-sample enrichment scoring across multiple samples to assess pathway activity per sample. - Batch process multiple genomic datasets in a snakemake or Python workflow without manual GSEA desktop invocations. - Reproduce GSEA desktop results programmatically using the replot module on existing GSEA output directories. - Query Enrichr libraries for functional annotation of gene lists via the enrichr module API. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Performs gene set enrichment analysis (GSEA) on genomic data using Python, supporting multiple methods including prerank, ssGSEA, GSVA, and Enrichr API integration. Yes. GSEApy is actively maintained, has no known vulnerabilities, carries a permissive BSD-3-Clause license, and fills a genuine need for GSEA functionality within Python workflows. The medium install friction (Rust compilation) is a one-time cost offset by broad wheel availability for modern Python versions (3.10–3.13) and clear fallback instructions. Suitable for bioinformaticians and computational biologists working with genomic data. ## Install pip install gseapy uv add gseapy poetry add gseapy ## Installing gseapy Before you install: Medium install friction due to Rust compilation requirement for versions after 0.11.0. Wheels are available for Python 3.10–3.13 on macOS, Linux, and Windows, but pip install may require a Rust toolchain if a pre-built wheel is unavailable. Active maintenance with recent release (19 days ago). License in practice: BSD-3-Clause permissive license allows commercial and private use with minimal restrictions, requiring only license and copyright notice retention. Quickstart: pip install gseapy import gseapy import pandas as pd # Run GSEA with expression data and gene sets gseapy.gsea(data='expression.txt', gene_sets='gene_sets.gmt', cls='test.cls', outdir='test') # Or use prerank with fgsea multilevel p-value method gseapy.prerank(rnk='gsea_data.rnk', gene_sets='gene_sets.gmt', method='multilevel', outdir='test') Requires Python >=3.9. If pip install fails, Rust toolchain must be installed first (curl https://sh.rustup.rs -sSf | sh). Verify before relying: - Whether the Rust compilation requirement applies to all platforms or only specific architectures. - Performance characteristics when analyzing large-scale genomic datasets. - Compatibility with specific gene set database formats beyond GMT and Enrichr libraries. ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 249.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags gene set enrichment analysis python, GSEA RNA-seq analysis, enrichment analysis bioinformatics, GO enrichment python, genomic data analysis, prerank GSEA tool, ssGSEA single sample, bioinformatics, genomics, enrichment-analysis [View on SkillFed](https://skillfed.io/packages/gseapy) · [View on PyPI](https://pypi.org/project/gseapy/)