Skip to main content

Protein Feature Enrichment Score (PFES)

PyPI version Open In Colab

Protein Feature Enrichment Score (PFES) is an interpretable framework for missense variant interpretation. Rather than outputting a single pathogenicity probability, PFES quantifies the degree to which a variant's protein characteristics statistically resemble known pathogenic or benign variation, and decomposes that signal into six feature attribute categories: physicochemical properties, 3D structure, domain/region annotations, functional sites, post-translational modifications, and protein-protein interactions.

This repository contains the data, analysis notebooks, and source code accompanying the manuscript: BioRxiv


Repository Structure

missense-pfes/
├── data/                        # Pre-preprocessed protein feature annotations for case/control datasets
├── notebooks/                   # Analysis notebooks reproducing key figures and results, and live PFES computation (Colab)
├── results/                     # Output files - precomputed enrichment odds ratios and p-values, scored case and control datasets from batch pfes scorer, example output folder from PFES Colab
├── src/pfes/                    # PFES batch scorer (installable as a CLI tool)
└── glossary_protein_feature.md  # Definitions of all 103 protein features used for PFES computation

Quick Start: Query a variant(s)

The easiest way to use PFES is through our Google Colab notebook, which requires no local installation: Open In Colab

The notebook returns two outputs for any queried variant(s):

  1. PFES report — overall PFES, PFES partitioning category with statistical significance, and a breakdown of contributions across six attribute categories with plain-language interpretation of each enriched feature

  2. Protein-wide mutational landscape — a heatmap of PFES across all possible amino acid substitutions in the queried protein, decomposed by attribute category, showing where the variant of interest sits within the full substitution space

PFES Batch Scorer

PyPI version

src/pfes/scorer.py computes PFES scores for a batch of missense variants from a TSV/CSV input file. It fetches protein feature data via the g2papi package and the enrichment table from this repository.

Installation

pip install missense-pfes

Or install from source:

git clone https://github.com/broadinstitute/missense-pfes.git
cd missense-pfes
pip install .

Input format

The input file should be a TSV or CSV with the following columns:

Column Description
Gene HGNC gene symbol
UniProt UniProt accession
ResID Residue position
RefAA Reference amino acid (single-letter)
AltAA Alternate amino acid (single-letter)

Usage

usage: pfes [-h] -i INPUT -o OUTPUT [--rerun] [--log LOG] [--workers WORKERS]

Compute PFES scores for a batch of missense variants.

options:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        Input TSV or CSV (columns: Gene, UniProt, ResID, RefAA, AltAA).
                        When --rerun is set, use the previous output file.
  -o OUTPUT, --output OUTPUT
                        Output TSV or CSV path (format inferred from extension).
  --rerun               Only process rows where PFES is NaN (fill missing scores).
  --log LOG             Path for error log (default: pfes_errors.log).
  --workers WORKERS     Number of parallel workers (default: 1).
# Basic usage
pfes -i variants.tsv -o scored_variants.tsv

# Parallel processing
pfes -i variants.tsv -o scored_variants.tsv --workers 4

# Specify a custom error log path
pfes -i variants.tsv -o scored_variants.tsv --log my_errors.log... 

Output retains the five input columns (Gene, UniProt, ResID, RefAA, AltAA) and appends seven score columns: PFES, PFES_Physicochemical, PFES_Structure, PFES_Domain, PFES_Function, PFES_Modification, and PFES_PPI.

Handling failures and missing scores

Scoring requires fetching protein feature data from g2papi at runtime. Individual proteins or variants may fail due to missing data or network issues, in which case their PFES columns are left as NaN in the output. Details of each failure — including the gene, UniProt accession, residue, and error message — are written to a log file (pfes_errors.log by default).

To retry only the failed variants without re-running the entire dataset, pass the previous output file as input with --rerun:

# Fill in missing scores from a previous run
pfes -i scored_variants.tsv -o scored_variants.tsv --rerun

This fills in any rows where PFES is NaN and leaves successfully scored rows untouched.

Data

Preprocessed protein feature annotations for the pathogenic (case) and control (benign + common population) variant datasets used in the paper. See glossary_protein_feature.md for definitions and sources of all 103 protein features.

File Description
data/case_annotation.tsv Protein feature annotations for 39,695 pathogenic variants
data/control_annotation.tsv Protein feature annotations for 130,832 control variants

Notebooks

Notebook Description
notebooks/compute_enrichment.ipynb Runs Fisher's exact test enrichment analysis within each PANTHER protein functional class and visualizes odds ratios. Generates results/enrichment_OR_by_protein_class.csv.
notebooks/compute_partitioning_threshold.ipynb Computes empirical PFES distributions and derives partitioning thresholds (PF-Enriched/Neutral/Depleted) from the scored case and control datasets.
notebooks/G2P_PFES.ipynb Colab notebook for querying PFES scores and reports for individual variants of a gene of interest. Open In Colab

Results

File Description
results/case_pfes.tsv The scored (overall and per attribute) pathogenic variants, generated by the PFES batch scorer
results/control_pfes.tsv The scored (overall and per attribute) control variants, generated by the PFES batch scorer
results/pfes_pvalue_lookup.tsv Empirical p-value lookup table for variant partitioning, generated by PFES_empirical_stats.ipynb
results/enrichment_OR_by_protein_class.csv Odds ratios from Fisher's exact tests for all 103 protein features across 20 PANTHER protein functional classes, generated by notebooks/compute_enrichment.ipynb. Regenerated for v0.1.2 with the feature definitions shared with the scorer (lower-edge-inclusive bins; SS9 - excluded; see glossary_protein_feature.md)

Citation

If you use PFES in your work, please cite:

Human Proteome-wide Mechanistic Interpretation of Missense Mutations through Protein Feature Enrichment Score [BioRxiv DOI later]

Contact

Seulki Kwon — skwon@broadinstitute.org
Broad Institute of MIT and Harvard

Release files for missense-pfes 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for missense-pfes 0.1.2
File Size Uploaded
missense_pfes-0.1.2.tar.gz 19.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for missense-pfes 0.1.2
File Interpreter ABI Platform
missense_pfes-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 40.5 kB

Release files / missense_pfes-0.1.2.tar.gz

Download URL missense_pfes-0.1.2.tar.gz
Size 19.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b4408b5723ce90fd7e09b5ff1a8f029ccbf110760f2ec31cd6c96c41a374a759
BLAKE2b-256 checksum
How to use checksums
bd51e9894705d7af391e774523a6efcd8fbc8f9f5a6e895f4800f8645c340416
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Release files / missense_pfes-0.1.2-py3-none-any.whl

Download URL missense_pfes-0.1.2-py3-none-any.whl
Size 21.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c728d4c637d440470938be85a83aad1e0e6c74112510e8fb023071a8e648ed4b
BLAKE2b-256 checksum
How to use checksums
17dc067e0b24d93317b4756719ef5531a1463986ebf777166b37d2ec457928f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page