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
- PyPI package: https://pypi.org/project/context-ms
- Container image: https://github.com/shannon225/Context/pkgs/container/context
- GitHub repository: https://github.com/shannon225/Context
- Percolator: http://percolator.ms
- pyIsoPEP: https://github.com/statisticalbiotechnology/smooth_q_to_pep
Project details
Release history Release notifications | RSS feed
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8356b7651ca8899c7df55875c293342fdd1f627b83eafb99ece43b5511d3357e
|
|
| MD5 |
6a9a7511626d6f9b74a942efcfb2798c
|
|
| BLAKE2b-256 |
1e7c013b258dd971088d425a937d993232977f44a82dd768df25e1e0dc814d17
|
Provenance
The following attestation bundles were made for context_ms-0.1.2.tar.gz:
Publisher:
PyPIpublish.yaml on shannon225/Context
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
context_ms-0.1.2.tar.gz -
Subject digest:
8356b7651ca8899c7df55875c293342fdd1f627b83eafb99ece43b5511d3357e - Sigstore transparency entry: 1606766718
- Sigstore integration time:
-
Permalink:
shannon225/Context@906c3dba21b0d571b3a4163de54c4fb7f4310988 -
Branch / Tag:
refs/heads/containerize - Owner: https://github.com/shannon225
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
PyPIpublish.yaml@906c3dba21b0d571b3a4163de54c4fb7f4310988 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c2fd41e5fe3f3e84d25cb2940d930033aa34684750212a87121a068db549749
|
|
| MD5 |
36d5d8bc1d2c511349054c2a7b81249f
|
|
| BLAKE2b-256 |
52a3676d993d2e2e6c6b97fd1d9b75f1374785c105f351b569b61b2fe87f07e5
|
Provenance
The following attestation bundles were made for context_ms-0.1.2-py3-none-any.whl:
Publisher:
PyPIpublish.yaml on shannon225/Context
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
context_ms-0.1.2-py3-none-any.whl -
Subject digest:
3c2fd41e5fe3f3e84d25cb2940d930033aa34684750212a87121a068db549749 - Sigstore transparency entry: 1606766781
- Sigstore integration time:
-
Permalink:
shannon225/Context@906c3dba21b0d571b3a4163de54c4fb7f4310988 -
Branch / Tag:
refs/heads/containerize - Owner: https://github.com/shannon225
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
PyPIpublish.yaml@906c3dba21b0d571b3a4163de54c4fb7f4310988 -
Trigger Event:
push
-
Statement type: