Pronoms: Proteomics Normalization Python Library
Overview
Pronoms is a Python library implementing multiple normalization methods for quantitative proteomics data. Each normalization method is encapsulated within modular, reusable classes. The library includes visualization capabilities that allow users to easily observe the effects of normalization. All normalization methods are implemented in pure Python (NumPy/SciPy/pandas); pronoms has no R or rpy2 dependency.
Documentation
See https://pronoms.readthedocs.io/ for complete documentation.
Installation
You can install Pronoms directly from PyPI using pip:
pip install pronoms
Prerequisites
- Python 3.9 or higher
- No R / rpy2 install required.
Installing for Development
# Clone the repository
git clone https://github.com/mriffle/pronoms.git
cd pronoms
# Install in development mode with dev dependencies
pip install -e .[dev]
Usage
Basic Example
import numpy as np
from pronoms.normalizers import MedianNormalizer
# Create sample data
data = np.random.rand(5, 100) # 5 samples, 100 proteins/features
# Create normalizer and apply normalization
normalizer = MedianNormalizer()
normalized_data = normalizer.normalize(data)
# Visualize the effect of normalization
normalizer.plot_comparison(data, normalized_data)
Available Normalizers
- DirectLFQNormalizer: Performs protein quantification directly from peptide/ion intensity data using the DirectLFQ algorithm. Ammar C, Schessner JP, Willems S, Michaelis AC, Mann M. Accurate Label-Free Quantification by directLFQ to Compare Unlimited Numbers of Proteomes. Mol Cell Proteomics. 2023 Jul;22(7):100581. doi:10.1016/j.mcpro.2023.100581. PMID: 37225017
- L1Normalizer: Scales samples to have a unit L1 norm (sum of absolute values).
- MADNormalizer: Median Absolute Deviation Normalization. Robustly scales samples by subtracting the median and dividing by the Median Absolute Deviation (MAD). Pass
scale_to_sigma=Trueto multiply MAD by 1.4826 so the output is a robust z-score (matches R'smad()). - MedianNormalizer: Scales each sample (row) by its median, then rescales by the mean of medians to preserve overall scale.
- MedianPolishNormalizer: Tukey's Median Polish. Decomposes data (often log-transformed) into overall, row, column, and residual effects by iterative median removal.
- QuantileNormalizer: Normalizes samples to have the same distribution using quantile mapping.
- RankNormalizer: Transforms each sample's values to their ranks (1 to N), with tied values receiving the median rank. Optionally normalizes ranks by dividing by N for cross-dataset comparability.
- SPLMNormalizer: Stable Protein Log-Mean Normalization. Uses stably expressed proteins (lowest linear-space CV,
std/mean) to derive scaling factors for normalization in log-space, then transforms back. - VSNNormalizer: Variance Stabilizing Normalization. Native NumPy/SciPy implementation of Huber et al.'s arcsinh-based variance-stabilizing transform with LTS-robust parameter estimation; matches Bioconductor's
vsnpackage output to ~1e-6 on realistic proteomics data. Huber W, von Heydebreck A, Sültmann H, Poustka A, Vingron M. Variance stabilization applied to microarray data calibration and to the quantification of differential expression. Bioinformatics. 2002;18 Suppl 1:S96–104. doi:10.1093/bioinformatics/18.suppl_1.s96. PMID: 12169536
Data Format
All normalizers expect data in the format of a 2D numpy array or pandas DataFrame with shape (n_samples, n_features) where:
- Each row represents a sample
- Each column represents a protein/feature
This follows the standard convention used in scikit-learn and other Python data science libraries.
Development
Set up a virtual environment and install the dev extras:
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
The pre-flight gate before any commit is:
pytest # full test suite (warnings -> errors)
ruff check src tests # lint
ruff format --check src tests # formatting (use `ruff format` to apply)
mypy # static type check
Coverage:
pytest --cov=src/pronoms --cov-report=term-missing
License
This project is licensed under the Apache License License - see the LICENSE file for details.
Metadata
Release files for pronoms 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pronoms-0.4.0.tar.gz | 56.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pronoms-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 100.2 kB
Release files / pronoms-0.4.0.tar.gz
| Download URL | pronoms-0.4.0.tar.gz |
|---|---|
| Size | 56.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c57bbd23de6acbde960db5879753a82668718ab09d6c155ae8e0f4e681bb75b2
|
|
BLAKE2b-256 checksum How to use checksums |
c70ce9a02cef2e0e4a143594b2204ddf264e60f2c4c0b0109979cc9bfaf08da7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 27, 2026.
Transparency logRelease files / pronoms-0.4.0-py3-none-any.whl
| Download URL | pronoms-0.4.0-py3-none-any.whl |
|---|---|
| Size | 43.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2be612ee1eaf3e4bbdb1469d19fa98e0d86e61453a8a343df062d7efed6e182c
|
|
BLAKE2b-256 checksum How to use checksums |
9967b699309d28ec13af77a6791b250663a5db8f4f30f7a4af6de87591d477cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 27, 2026.
Transparency log