Skip to main content

Flexible normalization methods for proteomics quantitative data

Project description

Pronoms Logo

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. Some normalization methods, such as VSN normalization, leverage R on the backend for computation.

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
  • For R-based normalizers (VSN):
    • R installed on your system
    • Required R packages: vsn

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).
  • 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 (low log-space CV) to derive scaling factors for normalization in log-space, then transforms back.
  • VSNNormalizer: Variance Stabilizing Normalization (via R's vsn package). Stabilizes variance across the intensity range. 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.

R Integration

For normalizers that use R (VSN), ensure R is properly installed and accessible. The library uses rpy2 to interface with R.

Installing Required R Packages

The VSN package is part of Bioconductor. In R, run the following commands:

if (!require("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("vsn")

Development

  • Run tests: pytest

License

This project is licensed under the Apache License License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pronoms-0.2.0.tar.gz (45.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pronoms-0.2.0-py3-none-any.whl (37.2 kB view details)

Uploaded Python 3

File details

Details for the file pronoms-0.2.0.tar.gz.

File metadata

  • Download URL: pronoms-0.2.0.tar.gz
  • Upload date:
  • Size: 45.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pronoms-0.2.0.tar.gz
Algorithm Hash digest
SHA256 59e4a6956b4b0bcbf5bb9146b1701e552037b598dcb2d342ca08be3799beaa00
MD5 3088e35448b2f0a3b36d914e0c291322
BLAKE2b-256 c608beaa0acaf1bc1e08f2f71252e571c00609105c98a3dbd68b3608d8e30bcf

See more details on using hashes here.

Provenance

The following attestation bundles were made for pronoms-0.2.0.tar.gz:

Publisher: publish.yml on mriffle/pronoms

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pronoms-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pronoms-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 37.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pronoms-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1296ab91bbe37ddf298c8001444adb4842288fb178e6072ad89f9b6a112699db
MD5 302811c401fff708679d8206ef3890a0
BLAKE2b-256 1d7dd4fd718c3b13fc4e87225abcafdbf94f15a7c889f2bc5740d1aaf728e4db

See more details on using hashes here.

Provenance

The following attestation bundles were made for pronoms-0.2.0-py3-none-any.whl:

Publisher: publish.yml on mriffle/pronoms

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page