gene-statistics

Computes per-gene multifunctionality scores from GO annotations to flag habitual top-hit genes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Genes annotated to many GO terms (like TP53 or BRCA1) appear as top hits in nearly every enrichment, guilt-by-association, or differential expression analysis regardless of the actual biology. This Skill quantifies that bias per gene so you can distinguish genuinely implicated genes from usual suspects. ## Core Features & Use Cases - Multifunctionality scoring: Computes the Gillis & Pavlidis (2011) MF score over propagated GO BP annotations, outputting a ranked TSV with score, rank, and percentile per gene. - Reproducible provenance: Every run writes a sidecar .meta.json recording GAF date, OBO data-version, sha256 hashes, and all filter choices. - Composable background sets: Restricts the computation to a protein-coding universe by default via the sibling gene-set-fetch skill, or accepts a user-supplied TSV. - Use Case: After running a GO enrichment that returns TP53 and MYC as top hits, check their mf_percentile to see whether they rank high simply because they are annotated everywhere. ## Quick Start Run the multifunctionality script for human genes to produce a ranked per-gene TSV of multifunctionality scores.

Frequently Asked Questions about gene-statistics

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

FAQPage Schema
How do I compute gene multifunctionality scores in Python?

Run scripts/multifunctionality.py with a species flag such as --species human or --species mouse. It downloads the GAF annotation file and go.obo, propagates annotations via the true-path rule, and writes a ranked TSV with mf_score, mf_rank, and mf_percentile per gene.

What is a multifunctionality score in GO enrichment analysis?

It is the Gillis and Pavlidis 2011 per-gene score summing 1/(n_i * (N - n_i)) over a gene's propagated GO terms, where n_i is the term's gene count and N is the annotated universe. Only the ranking and percentile are meaningful, not the raw value.

Does the multifunctionality script support mouse genes?

Yes, pass --species mouse to use the MGI GAF file instead of the human GOA file. All other steps including propagation, scoring, and provenance metadata work identically for both species.

Should I exclude IEA evidence codes from GO annotations?

No, this tool includes all evidence codes by default because IEA annotations are not lower quality, and filtering them biases results toward well-studied genes. Evidence filtering is available as an opt-in via --evidence-codes.

Why does multifunctionality.py fail with a background set error?

The default background restricts computation to a protein-coding gene set fetched from the sibling gene-set-fetch skill, which must be installed alongside it. Pass --background-set annotated to use the full annotated universe, or --background-tsv with your own gene list.