enrichment

Runs PR-AUC and hypergeometric gene-set enrichment with multifunctionality correction against GO and GMT libraries.

Updated Apr 18, 2026
One-click install
npx skills add https://github.com/ppavlidis/skillz --skill enrichment-ppavlidis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: enrichment
Source: https://github.com/ppavlidis/skillz/tree/main/skills/enrichment
Command: npx skills add https://github.com/ppavlidis/skillz --skill enrichment-ppavlidis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, numpy, scipy, requests, obonet, networkx, and includes scripts (resource) components.

What problem does it solve? Standard gene-set enrichment methods over-detect hits: Fisher's exact discards rank information, ROC-AUC calls almost any large set enriched, and highly multifunctional genes (TP53, TNF) make sets look significant regardless of the underlying biology. This Skill applies the stringent PR-AUC method from Ballouz et al. (2017) plus multifunctionality correction so enrichment results reflect the user's specific signal rather than generic gene properties. ## Core Features & Use Cases - PR-AUC enrichment (pr_enrichment): Takes a scored/ranked gene list and computes per-set PR-AUC with permutation p-values, BH q-values, and multifunctionality-corrected p-values against GO BP or any GMT library (KEGG, Reactome, MSigDB). - Over-representation analysis (ora): Hypergeometric/Fisher's exact test for hit lists, with a parallel MF-baseline run using the top-n most multifunctional genes to flag non-specific hits. - Full provenance: Every run writes a .meta.json sidecar recording input sha256, GAF date, OBO version, background set hash, permutation count, and seed. - Use Case: Given a TSV of differential expression scores, run pr_enrichment to rank GO biological process terms by PR-AUC and immediately see which hits survive multifunctionality correction. ## Quick Start Ask the assistant to run PR-AUC gene-set enrichment on your scored gene list TSV against the default GO biological process library with multifunctionality correction enabled.

Frequently Asked Questions about enrichment

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run gene-set enrichment on a ranked gene list?

Use the pr_enrichment.py script with a TSV containing gene symbols and numeric scores. It ranks genes by score, computes PR-AUC per gene set against GO BP or a GMT library, and reports permutation p-values and BH q-values.

What is the difference between PR-AUC and ORA enrichment?

PR-AUC uses the full ranked score list and rewards sets concentrated at the top, while ORA uses a binary hit list with a hypergeometric test. PR-AUC is more stringent for small sets against large backgrounds; ORA suits simple significant-gene lists.

Can I use KEGG or MSigDB gene sets instead of GO?

Yes, pass --library gmt:<path> with any GMT-format file, such as MSigDB hallmark sets, KEGG, or Reactome exports. The default go-bp library is built from the GO Consortium GAF file plus go.obo with true-path propagation.

What is multifunctionality correction in enrichment analysis?

Multifunctionality correction flags enrichment hits driven by always-multifunctional genes like TP53 rather than your specific biology. It runs a parallel analysis against gene multifunctionality percentiles and reports corrected p-values; it is on by default and can be disabled with --no-mf-correction.

Does the enrichment analysis support mouse genes?

Yes, pass --species mouse to use the MGI GAF file and mouse protein-coding background. Human is the default, using goa_human.gaf.gz from the GO Consortium.

Why does the enrichment script fail with zero overlap errors?

The script exits non-zero when no input genes match the background, usually because gene symbols differ in case or format from the background set. Symbols are uppercased automatically, so check that your identifiers are gene symbols rather than Ensembl or Entrez IDs.