Skip to main content

Estimate PEPs from empirical null models using isotonic regression.

Project description

pyIsoPEP: Isotonic PEP Estimator

Overview

pyIsoPEP provides both a Docker image and a Python API with a unified interface for estimating smooth, non‑decreasing Posterior Error Probabilities (PEPs) using isotonic regression for target identifications in shotgun proteomics.

Two workflows are available:

workflow scheme starting point
q2pep rank-based a list of target identifications with q-values
d2pep score-based target‑decoy competition (TDC) output: a list of target and decoy identifications with scores

Internally, both workflows use isotonic regression - implemented via either the Pool-Adjacent-Violators Algorithm (PAVA) or I‑Splines. Optional post-processing can be applied to derive q-values from the estimated PEPs. In I‑Spline regression, for d2pep, scores are adaptively binned to balance decoy counts per bin, with tighter bins at lower scores. Linear weight rescaling is applied to emphasize early (low-PEP) regions.


Installation

PyPI

pip install pyIsoPEP

Docker image

podman pull ghcr.io/statisticalbiotechnology/pyisotonicpep:main
# or
docker pull ghcr.io/statisticalbiotechnology/pyisotonicpep:main

Input & output

Input: tab‑separated value (TSV) files; column names are configurable.
Output: the original target rows plus up to four extra columns:

column present when description
pyIsoPEP FDR --calc-q-from-fdr estimated False Discovery Rates (FDRs)
pyIsoPEP q-value from FDR --calc-q-from-fdr FDR-derived q-values
pyIsoPEP PEP always estimated PEPs
pyIsoPEP q-value from PEP --calc-q-from-pep PEP-derived q-values

Command-line reference

Top‑level help:

pyisopep -h
# or
podman run --rm -it pyisotonicpep:main -h

Workflow‑specific help:

pyisopep q2pep -h
pyisopep d2pep -h
# or
podman run --rm -it pyisotonicpep:main q2pep -h
podman run --rm -it pyisotonicpep:main d2pep -h

Common flags (valid for both workflows)

flag default description
--cat-file FILE, --target-file FILE required Select concatenated vs. separate input
--decoy-file FILE Required only with separate target & decoy lists
--score-col COL score Score column
--label-col COL label Column distinguishing targets/decoys in a concatenated file
--target-label STR target String marking target rows
--decoy-label STR decoy String marking decoy rows
--regression-algo {PAVA,ispline} ispline Monotone regression backend
--calc-q-from-fdr off Derive q‑values from running FDRs (needs decoys)
--calc-q-from-pep off Derive q‑values after estimating PEPs
--output FILE|DIR required Write a target‑only list; if DIR, a default name is used
--verbose off Echo all parsed parameters

Additional flags – q2pep only

flag default description
--qcol COL q-value Column containing the input q‑values
--ip off Smooth PAVA step‑function with a monotone spline
--ip-algo {ispline,pchip} ispline Interpolator used with --ip
--center-method {mean,median} mean x‑coordinate of each PAVA block center when interpolating

Examples

PyPI

q2pep

Example 1: a target input file with q‑values

pyisopep q2pep --target-file example/peptide.target.txt --qcol q-value --calc-q-from-pep --output example/results

Example 2: separate target and decoy input files, derive q‑values from FDR first

pyisopep q2pep --target-file example/peptide.target.txt --decoy-file example/peptide.decoy.txt --score-col score --label-col type --target-label 0 --decoy-label 1 --calc-q-from-fdr --calc-q-from-pep --output results/

Example 3: a concatenated target and decoy input file with q‑values

pyisopep q2pep --cat-file example/peptide.cat.txt --qcol q-value --score-col score --label-col type --target-label 0 --decoy-label 1 --calc-q-from-pep --output results/

d2pep

Example 1: separate target and decoy input files

pyisopep d2pep --target-file example/peptide.target.txt --decoy-file example/peptide.decoy.txt --score-col score --label-col type --target-label 0 --decoy-label 1 --calc-q-from-fdr --calc-q-from-pep --output results/

Example 2: a concatenated target and decoy input file

pyisopep d2pep --cat-file example/peptide.cat.txt --qcol q-value --score-col score --label-col type --target-label 0 --decoy-label 1 --calc-q-from-pep --output results/

Docker image

Pull the Docker image from GitHub Container Registry

podman pull ghcr.io/statisticalbiotechnology/pyisotonicpep:main

q2pep

podman run --rm -it -v .:/data pyisotonicpep:main q2pep --target-file /example/peptide.target.txt --decoy-file /example/peptide.decoy.txt --score-col score --label-col type --target-label 0 --decoy-label 1 --calc-q-from-fdr --calc-q-from-pep --output /data

d2pep

podman run --rm -it -v .:/data pyisotonicpep:main d2pep --cat-file /example/peptide.cat.txt --qcol q-value --score-col score --label-col type --target-label 0 --decoy-label 1 --calc-q-from-pep --output /data

Links


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.2.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.2-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file pyisopep-0.1.2.tar.gz.

File metadata

  • Download URL: pyisopep-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 24ab5e34adcf2d3ed401345802ff7c877417b3f5351cf10e40eb1ea91de0723b
MD5 fdf3613132646291979f3a9c77584f5a
BLAKE2b-256 8e3625d634523062c6e2c632da442e67416890f4d339ac51b9ab94da339a5664

See more details on using hashes here.

File details

Details for the file pyisopep-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pyisopep-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 26.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bc5252adb4cbad4c8dced2380ed1da48a4c788a86bf8cd372fc4d0c55a0e6dbb
MD5 7111d8481994eaa7113710cc3881f7ca
BLAKE2b-256 45608d039d9be11f595f4c8061a251a4883941e6622c996d56c2a5e5ba788c7d

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