Quantitative proteomics data toolkit — convert, transform, query, and validate QPX Parquet datasets
Project description
QPX
A Python package for working with mass spectrometry data in the QPX format.
Features
- Convert data from DIA-NN, MaxQuant, FragPipe, QuantMS (mzTab), mzIdentML, and SDRF to QPX Parquet format
- Transform QPX data: gene mapping, protein quantification (DirectLFQ, MaxLFQ, iBAQ, TopN, …), accession normalization, metadata updates
- Query datasets with SQL, filter rows, or preview with
head - Inspect dataset summaries, Arrow schemas, and Parquet metadata
- Validate datasets against the canonical QPX schema
- Ontology management for PSI-MS and PRIDE CV terms
MuData Export (quantification results only)
QPX datasets can be exported to MuData — the multi-modal container from the scverse ecosystem. This export is available only for quantification results (precursor/protein intensities and, optionally, protein expression and differential expression results).
ds = Dataset("path/to/PXD000000/")
mdata = ds.to_mudata() # auto-detects label & available modalities
mdata.write("PXD000000.h5mu") # serialize to HDF5
Requires the optional
mudatadependency:pip install "qpx[mudata]"
Performance
Installation
Install from PyPI
pip install qpx
# With optional extras
pip install "qpx[quantify]" # protein quantification (mokume + DirectLFQ)
pip install "qpx[all]" # all optional dependencies
Install from GitHub (latest dev)
pip install git+https://github.com/bigbio/qpx.git
Install from Source
# Clone the repository
git clone https://github.com/bigbio/qpx.git
cd qpx
# Install the package locally
pip install .
Install and build with uv
uv is a fast Python package installer and resolver. The project supports PEP 621 and can be installed, built, and published with uv.
Prerequisites: Install uv (e.g. curl -LsSf https://astral.sh/uv/install.sh | sh or pip install uv).
# Install from GitHub
uv pip install "qpx @ git+https://github.com/bigbio/qpx.git"
# With optional extras (transforms, plotting)
uv pip install "qpx[transforms,plotting] @ git+https://github.com/bigbio/qpx.git"
From a local clone:
git clone https://github.com/bigbio/qpx.git
cd qpx
# Create a venv, install the project and its dependencies (recommended)
uv sync
# Or install in editable mode with optional dev dependencies
uv sync --extra dev
# Run the CLI without installing globally
uv run qpxc --help
Build distributable packages (sdist and wheel in dist/):
uv build
Publish to PyPI (after configuring credentials or trusted publishing):
uv build
uv publish
The pyproject.toml uses PEP 621 metadata with Hatchling as the build backend.
Development Installation
For development with all dependencies:
# Using uv (recommended for fast installs)
uv sync --extra dev
# Or using pip
pip install -e ".[dev]"
System Dependencies
QPX depends on pyOpenMS, which requires certain system libraries. If you encounter errors related to missing shared libraries (e.g., libglib-2.0.so.0), install the required system dependencies:
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install -y libglib2.0-0
macOS:
brew install glib
Using Conda/Mamba (Recommended for pyOpenMS):
Using mamba (faster dependency resolution):
mamba env create -f environment.yml
conda activate qpx
pip install git+https://github.com/bigbio/qpx.git
Or with conda:
conda env create -f environment.yml
conda activate qpx
pip install git+https://github.com/bigbio/qpx.git
Usage
The package provides a command-line interface (qpxc) with the following command groups:
qpxc [OPTIONS] COMMAND [ARGS]...
Commands:
convert Convert external tool outputs to QPX format.
transform Transform QPX data into derived representations.
query Query and inspect QPX datasets.
info Show information about a QPX dataset.
validate Validate a QPX dataset or structure against the canonical schema.
ontology Manage CV ontology data (PSI-MS, PRIDE CV).
Convert
qpxc convert [diann | maxquant | quantms | fragpipe | mzidentml | sdrf] [OPTIONS]
Transform
qpxc transform [gene-map | quantify | normalize-accessions | update-metadata] [OPTIONS]
Query
# Run SQL against a dataset
qpxc query sql --dataset-path ./PXD014414 --sql "SELECT anchor_protein, COUNT(*) FROM feature GROUP BY 1"
# Filter rows
qpxc query filter --dataset-path ./PXD014414 --structure feature --condition "charge >= 3"
# Preview first N rows
qpxc query head --dataset-path ./PXD014414 --structure feature -n 20
Info & Validate
# Dataset summary
qpxc info --dataset-path ./PXD014414
# Validate against canonical schema
qpxc validate --dataset-path ./PXD014414
Configuration
Most commands support a --verbose flag that enables more detailed logging to stdout. The CLI uses standard logging configuration and does not require environment variables.
Development
Project Structure
qpx/
├── cli/ # Click CLI (entry point: qpx.cli.main:main)
│ ├── main.py # Top-level CLI group
│ └── convert.py # convert subcommands (maxquant, diann, quantms, fragpipe, mzidentml, sdrf)
├── converters/ # Tool-specific converters
│ ├── quantms/ # QuantMS (mzTab) converter
│ ├── diann/ # DIA-NN converter
│ ├── maxquant/ # MaxQuant converter
│ ├── fragpipe/ # FragPipe converter
│ ├── mzidentml/ # mzIdentML converter
│ └── sdrf.py # Shared SDRF converter
├── core/ # Core logic & formats
│ ├── data/ # Schema definitions (YAML + Python)
│ │ └── schemas/ # YAML schema files for all structures
│ ├── engine.py # DuckDB engine wrapper
│ ├── scores.py # Score normalization & ontology
│ └── ontology/ # OBO ontology registry
├── writers/ # Parquet writers (one per structure)
├── views/ # Analytical views (protein, peptide, QC)
└── dataset.py # Main Dataset class entry point
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests
- Submit a pull request
License
This project is licensed under the Apache-2.0 License - see the LICENSE file for details.
Core contributors and collaborators
The project is run by different groups:
- Yasset Perez-Riverol (PRIDE Team, European Bioinformatics Institute - EMBL-EBI, U.K.)
- Ping Zheng (Chongqing Key Laboratory of Big Data for Bio Intelligence, Chongqing University of Posts and Telecommunications, Chongqing, China)
IMPORTANT: If you contribute with the following specification, please make sure to add your name to the list of contributors.
Code of Conduct
As part of our efforts toward delivering open and inclusive science, we follow the Contributor Covenant Code of Conduct for Open Source Projects.
How to cite
Copyright notice
Copyright 2025 BigBio
Licensed under the Apache License, Version 2.0.
See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qpx-1.0.1.tar.gz.
File metadata
- Download URL: qpx-1.0.1.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ae6d4a8fd87d09a0f685785e5fd89517f952fb47126b13698d6b93ca86ca3df
|
|
| MD5 |
881cea702681812471ee59d1e9587ecc
|
|
| BLAKE2b-256 |
48bc590093ca0d3b81742c088eb68b9594a0930bdb0796558777d4a4ff2c69d4
|
Provenance
The following attestation bundles were made for qpx-1.0.1.tar.gz:
Publisher:
python-publish.yml on bigbio/qpx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qpx-1.0.1.tar.gz -
Subject digest:
2ae6d4a8fd87d09a0f685785e5fd89517f952fb47126b13698d6b93ca86ca3df - Sigstore transparency entry: 1223489057
- Sigstore integration time:
-
Permalink:
bigbio/qpx@d6c5176ece741e60742fe338e16510dd14d33202 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/bigbio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d6c5176ece741e60742fe338e16510dd14d33202 -
Trigger Event:
release
-
Statement type:
File details
Details for the file qpx-1.0.1-py3-none-any.whl.
File metadata
- Download URL: qpx-1.0.1-py3-none-any.whl
- Upload date:
- Size: 504.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
709ab0e3540fc5c31021b3bfbf9a11981ac17c5ede97f820a819299b5baf2a0d
|
|
| MD5 |
ff5dee52edbbc68b9cfdfadd3e9185b2
|
|
| BLAKE2b-256 |
c664b0b9dc8e0d03a332dcc5b819e4a6d2ef2b1261670406530a166cc95d4b85
|
Provenance
The following attestation bundles were made for qpx-1.0.1-py3-none-any.whl:
Publisher:
python-publish.yml on bigbio/qpx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qpx-1.0.1-py3-none-any.whl -
Subject digest:
709ab0e3540fc5c31021b3bfbf9a11981ac17c5ede97f820a819299b5baf2a0d - Sigstore transparency entry: 1223489151
- Sigstore integration time:
-
Permalink:
bigbio/qpx@d6c5176ece741e60742fe338e16510dd14d33202 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/bigbio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d6c5176ece741e60742fe338e16510dd14d33202 -
Trigger Event:
release
-
Statement type: