Estimate PEPs from empirical null models using isotonic regression.
Project description
Isotonic PEP Estimation
Overview
pyIsotonicPEP provides a unified interface for estimating Posterior Error Probabilities (PEPs) using isotonic regression for identifications in shotgun proteomics. It supports two methods:
- q2pep: Estimate non-decreasing PEPs from q-values.
- d2pep: Estimate non-decreasing PEPs from a stream of target and decoy observations derived from target-decoy competition (TDC) method.
The package consists of two main Python files:
IsotonicPEP.py: Implements isotonic regression for PEP estimation.main.py: Provides a command-line interface (CLI) to run the isotonic regressor with various options.
Features
- Isotonic Regression: Enforces a non-decreasing constraint on probability estimates.
- q2pep Method: Converts q-values to PEP values.
- d2pep Method: Processes target-decoy observations to compute PEP values.
- Optional PEP-based q-value Estimation: Calculates q-values from the estimated PEPs.
- Flexible Input Formats: In
d2pepmode, supports both concatenated input files and separate target/decoy files. - Configurable Regression Options: Choose between PAVA and I-Spline regression, with options for interpolation and block center calculation.
Usage
Pull the Docker image from GitHub Container Registry and display the help message
$ podman pull ghcr.io/statisticalbiotechnology/pyisotonicpep:main
$ podman run --rm -it pyisotonicpep:main -h
Command-Line Options
General Options
usage: main.py [-h] [--no-calc-q] [--verbose] {q2pep,d2pep} ...
{q2pep,d2pep}Select the PEP estimation method.q2pepEstimate PEPs from q-values.d2pepEstimate PEPs from target-decoy observations.
-h, --helpShow this help message and exit.--no-calc-qDo not estimate q-values from calculated PEPs (by default, q-values are calculated).--verbosePrint detailed parameter information.
q2pep Mode Options
usage: main.py q2pep [-h] --input INPUT [--qcol QCOL] [--regression-algo {PAVA,ispline}] [--max-iter MAX_ITER] [--ip] [--ip-algo {ispline,pchip}] [--center-method {mean,median}] --output OUTPUT
--input INPUTPath to the TSV file containing q-values.--qcol QCOLColumn name for q-values in the input file (default: 'q-value').--regression-algo {PAVA,ispline}Regression algorithm to use (default: 'ispline').--max-iter MAX_ITERMaximum iterations for I-Spline iterative solvers (default: 5000).--ipApply monotonic interpolation (only used when using the PAVA regression algorithm).--ip-algo {ispline,pchip}Interpolation algorithm for PAVA-derived block centers (default: 'ispline').--center-method {mean,median}Method for computing block centers in interpolation (default: 'mean').--output OUTPUTOutput file path or directory. If a directory is provided, the default filename outputPEP.target.qbased.txt will be used.
d2pep Mode Options
usage: main.py d2pep [-h] (--cat-file CAT_FILE | --target-file TARGET_FILE) [--decoy-file DECOY_FILE] [--score-col SCORE_COL] [--type-col TYPE_COL] [--target-label TARGET_LABEL] [--decoy-label DECOY_LABEL] [--regression-algo {PAVA,ispline}] [--max-iter MAX_ITER] --output OUTPUT
--cat-file CAT_FILEPath to a concatenated TSV file containing score and label columns.--target-file TARGET_FILEPath to the TSV file containing target scores (used in separate input mode).--decoy-file DECOY_FILEPath to the TSV file containing decoy scores (required in separate input mode).--score-col SCORE_COLColumn name for score (default: 'score').--type-col TYPE_COLColumn name for target/decoy (default: 'label').--target-label TARGET_LABELTarget label in concatenated input file (default: 'target').--decoy-label DECOY_LABELDecoy label in concatenated input file (default: 'decoy').--regression-algo {PAVA,ispline}Regression algorithm to use (default: 'ispline').--max-iter MAX_ITERMaximum iterations for I-Spline iterative solvers (default: 5000).--output OUTPUTOutput file path or directory. If a directory is provided, the default filename outputPEP.target.dbased.txt will be used (note: only target PEPs are saved).
Running examples with the provided files
1. q2pep Mode
$ podman run --rm -it -v .:/data pyisotonicpep:main q2pep --input /example/peptide.target.txt --output /data
2. d2pep Mode
2.1 using a concatenated target and decoy input
$ podman run --rm -it -v .:/data pyisotonicpep:main d2pep --cat-file /example/peptide.cat.txt --score-col score --type-col type --target-label 0 --decoy-label 1 --output /data
2.2 using separate target and decoy inputs
$ podman run --rm -it -v .:/data pyisotonicpep:main d2pep --target-file /example/peptide.target.txt --decoy-file /example/peptide.decoy.txt --score-col score --output /data
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
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 pyisopep-0.1.0.tar.gz.
File metadata
- Download URL: pyisopep-0.1.0.tar.gz
- Upload date:
- Size: 13.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08825e11dde5e257861a16dd9a0d7d7ea402c16e5021b9c2c0580b664870e967
|
|
| MD5 |
0fe061f4969a3369dc06fcc9bef59e09
|
|
| BLAKE2b-256 |
3e2f8be039c756db7903fe60335c561173ac9ff538cf8e71f4a4248cf51a9a78
|
File details
Details for the file pyisopep-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyisopep-0.1.0-py3-none-any.whl
- Upload date:
- Size: 26.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35f4c493a258bf8b850edb9316fc12993402b600f198ba8f119c49f90123112e
|
|
| MD5 |
2afc87b9e14805596f86a91e17d1d987
|
|
| BLAKE2b-256 |
34bfa9de1104958545350cb8807e61681845642358cbc5322522bbbf84a77492
|