
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
bio-pypage
Advanced tools
pyPAGE is a Python implementation of the conditional-information PAGE framework for gene-set enrichment analysis.
It is designed to infer differential activity of pathways and regulons while accounting for annotation and membership biases using information-theoretic methods.
Standard gene-set enrichment methods test whether pathway members are non-randomly distributed across a ranked gene list. pyPAGE frames this as an information-theoretic question: how much does knowing a gene's pathway membership tell you about its expression bin?
For single-cell data, the question becomes: are pathway scores spatially coherent across the cell manifold? A pathway whose activity varies smoothly across cell states (rather than randomly) is biologically meaningful.
Install from PyPI:
pip install bio-pypage
Or install from source:
git clone https://github.com/goodarzilab/pyPAGE
cd pyPAGE
pip install -e .
import pandas as pd
from pypage import PAGE, ExpressionProfile, GeneSets
# 1) Load expression profile (gene, score)
expr = pd.read_csv(
"example_data/AP2S1.tab.gz",
sep="\t",
header=None,
names=["gene", "score"],
)
exp = ExpressionProfile(expr["gene"], expr["score"], is_bin=True)
# 2) Load annotation (gene, pathway)
ann = pd.read_csv(
"example_data/GO_BP_2021_index.txt.gz",
sep="\t",
header=None,
names=["gene", "pathway"],
)
gs = GeneSets(ann["gene"], ann["pathway"])
# 3) Run pyPAGE
p = PAGE(exp, gs, n_shuffle=100, k=7, filter_redundant=True)
results, heatmap = p.run()
print(results.head())
heatmap.show()
results contains:
pathwayCMI — conditional mutual information scorez-score — z-score of observed CMI vs. permutation null distributionp-value — empirical p-value from permutation testRegulation pattern (1 for up, -1 for down)Use these canonical examples with the bundled example_data/ outputs.
pypage -e example_data/test_DESeq_logFC.txt \
--gmt example_data/c2.all.v2026.1.Hs.symbols.gmt \
--type continuous --n-bins 9 \
--cols GENE,log2FoldChange \
--seed 42 \
--outdir example_data/test_DESeq_logFC_cont_PAGE
pypage -e example_data/test_DESeq_logFC.txt \
--gmt example_data/c2.all.v2026.1.Hs.symbols.gmt \
--type discrete \
--cols GENE,log2FoldChange_bin9 \
--seed 42 \
--outdir example_data/test_DESeq_logFC_disc_PAGE
pypage-sc --adata example_data/CRC.h5ad \
--gene-column gene \
--gmt example_data/c2.all.v2026.1.Hs.symbols.gmt \
--groupby PhenoGraph_clusters --n-jobs 0 --fast-mode
Bulk continuous (example_data/test_DESeq_logFC_cont_PAGE/):
Bulk discrete (example_data/test_DESeq_logFC_disc_PAGE/):
Single-cell (example_data/CRC_scPAGE/):
Bulk continuous heatmap (PDF | HTML):

Bulk discrete heatmap (PDF | HTML):

Single-cell ranking (PDF | Interactive ranking | SC report):

Single-cell UMAP pathway example (PDF):

Single-cell group-enrichment example (PDF | Stats TSV):

The detailed user and API documentation now lives in MANUAL.md.
Updated notebooks:
Bakulin A, Teyssier NB, Kampmann M, Khoroshkin M, Goodarzi H (2024) pyPAGE: A framework for Addressing biases in gene-set enrichment analysis—A case study on Alzheimer's disease. PLoS Computational Biology 20(9): e1012346. https://doi.org/10.1371/journal.pcbi.1012346
MIT
pyPAGE was developed in the Goodarzi Lab at UCSF by Artemy Bakulin, Noam B. Teyssier, and Hani Goodarzi.
FAQs
Python implementation of the PAGE algorithm
We found that bio-pypage demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.