Skip to main content

Context-aware confidence estimation for targeted proteomics

Project description

Context: Confidence Estimation for Targeted Proteomics

Overview

Context produces PSM- and peptide-level q-values and PEPs for targeted mass-spec assays. Because the target panel is usually too small to train Percolator directly, Context trains Percolator on the non-target PSMs from the same run (a large, statistically well-behaved background) and transfers the learned linear discriminant to score the target panel. pyIsoPEP (q2pep) then computes FDR + q-values from TDC scores and fits an isotonic spline q -> PEP, separately at the PSM and peptide levels.

Context is distributed as both a container image (Podman-, Docker- and Apptainer-compatible) and a Python package exposing the same CLI.


Installation

PyPI

pip install context-ms

Context is a Python package with one external dependency: Percolator. For PyPI installations, either a local percolator executable on PATH or a container runtime (Podman or Docker) must be available. Context uses the local executable when present; otherwise, it runs ghcr.io/percolator/percolator:master through Podman or Docker (set with --container-cmd, default podman).

Container image

podman pull ghcr.io/shannon225/context:main
# or
apptainer build context.sif docker://ghcr.io/shannon225/context:main

Input & output

Input: two Percolator-compatible tsv files for non-target and target PSMs/peptides. They must share an identical header (same columns, same order).

Output: for context run --nontarget NT --target TG --prefix P --outdir results/ --seed K:

results/
  weights/P.seedK.weights.txt           # raw Percolator weights (3 CV-bin rows)
  P.seedK.rescored_features.tsv         # target features rescored with the seed weights
  P.seedK.psm.target.txt                # PSM-level target output
  P.seedK.peptide.target.txt            # peptide-level target output

Command-line reference

context run -h
flag default description
--nontarget FILE required nontarget (background) feature TSV used to train Percolator
--target FILE required target panel feature TSV
--prefix STR required output prefix for results files
--outdir DIR results where outputs land
--seed INT 1 Percolator seed
--container-cmd CMD podman container runtime for the Percolator / pyIsoPEP fallback paths (podman or docker)

Examples

PyPI

context run \
  --nontarget example/nontarget.tsv \
  --target    example/target.tsv \
  --prefix    run01 \
  --outdir    results

Container image

# Podman
podman run --rm -v "$PWD:/work" -w /work \
  ghcr.io/shannon225/context:main \
  run --nontarget example/nontarget.tsv --target example/target.tsv \
      --prefix run01 --outdir results

# Apptainer
apptainer run --bind "$PWD:/work" --pwd /work context.sif \
  run --nontarget example/nontarget.tsv --target example/target.tsv \
      --prefix run01 --outdir results

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

context_ms-0.1.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file context_ms-0.1.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for context_ms-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c4afc693971e090ad4fa7958a68c60c312ae349c6a5d45e80b489aa3f6b4fc64
MD5 48556b40361ea48cb18a43b8c7eb5558
BLAKE2b-256 4d66b7c8a284778c9659fc1af2714bd287047c4db6b8cdbb164d5b05abd6419c

See more details on using hashes here.

Provenance

The following attestation bundles were made for context_ms-0.1.1-py3-none-any.whl:

Publisher: PyPIpublish.yaml on shannon225/Context

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