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 Distribution

context_ms-0.1.2.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: context_ms-0.1.2.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for context_ms-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8356b7651ca8899c7df55875c293342fdd1f627b83eafb99ece43b5511d3357e
MD5 6a9a7511626d6f9b74a942efcfb2798c
BLAKE2b-256 1e7c013b258dd971088d425a937d993232977f44a82dd768df25e1e0dc814d17

See more details on using hashes here.

Provenance

The following attestation bundles were made for context_ms-0.1.2.tar.gz:

Publisher: PyPIpublish.yaml on shannon225/Context

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: context_ms-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3c2fd41e5fe3f3e84d25cb2940d930033aa34684750212a87121a068db549749
MD5 36d5d8bc1d2c511349054c2a7b81249f
BLAKE2b-256 52a3676d993d2e2e6c6b97fd1d9b75f1374785c105f351b569b61b2fe87f07e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for context_ms-0.1.2-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