Skip to main content

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 d2pep mode, 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.
    • q2pep Estimate PEPs from q-values.
    • d2pep Estimate PEPs from target-decoy observations.
  • -h, --help Show this help message and exit.
  • --no-calc-q Do not estimate q-values from calculated PEPs (by default, q-values are calculated).
  • --verbose Print 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 INPUT Path to the TSV file containing q-values.
  • --qcol QCOL Column name for q-values in the input file (default: 'q-value').
  • --regression-algo {PAVA,ispline} Regression algorithm to use (default: 'ispline').
  • --max-iter MAX_ITER Maximum iterations for I-Spline iterative solvers (default: 5000).
  • --ip Apply 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 OUTPUT Output 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_FILE Path to a concatenated TSV file containing score and label columns.
  • --target-file TARGET_FILE Path to the TSV file containing target scores (used in separate input mode).
  • --decoy-file DECOY_FILE Path to the TSV file containing decoy scores (required in separate input mode).
  • --score-col SCORE_COL Column name for score (default: 'score').
  • --type-col TYPE_COL Column name for target/decoy (default: 'label').
  • --target-label TARGET_LABEL Target label in concatenated input file (default: 'target').
  • --decoy-label DECOY_LABEL Decoy label in concatenated input file (default: 'decoy').
  • --regression-algo {PAVA,ispline} Regression algorithm to use (default: 'ispline').
  • --max-iter MAX_ITER Maximum iterations for I-Spline iterative solvers (default: 5000).
  • --output OUTPUT Output 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

pyisopep-0.1.0.tar.gz (13.8 MB view details)

Uploaded Source

Built Distribution

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

pyisopep-0.1.0-py3-none-any.whl (26.3 kB view details)

Uploaded Python 3

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

Hashes for pyisopep-0.1.0.tar.gz
Algorithm Hash digest
SHA256 08825e11dde5e257861a16dd9a0d7d7ea402c16e5021b9c2c0580b664870e967
MD5 0fe061f4969a3369dc06fcc9bef59e09
BLAKE2b-256 3e2f8be039c756db7903fe60335c561173ac9ff538cf8e71f4a4248cf51a9a78

See more details on using hashes here.

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

Hashes for pyisopep-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35f4c493a258bf8b850edb9316fc12993402b600f198ba8f119c49f90123112e
MD5 2afc87b9e14805596f86a91e17d1d987
BLAKE2b-256 34bfa9de1104958545350cb8807e61681845642358cbc5322522bbbf84a77492

See more details on using hashes here.

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