Skip to content

Commit 1947d7c

Browse files
authored
Merge pull request #25 from daichengxin/main
add pyonsite
2 parents c5f773a + 927ba50 commit 1947d7c

3 files changed

Lines changed: 192 additions & 3 deletions

File tree

.github/workflows/quantms-containers.yml

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
- "diann-*/**"
1111
- "relink-*/Dockerfile"
1212
- "wiffconverter-*/**"
13+
- "pyonsite-*/**"
1314
- ".github/workflows/**"
1415
release:
1516
types: [published]
@@ -37,9 +38,11 @@ jobs:
3738
diann_matrix: ${{ steps.set-matrix.outputs.diann_matrix }}
3839
relink_matrix: ${{ steps.set-matrix.outputs.relink_matrix }}
3940
wiffconverter_matrix: ${{ steps.set-matrix.outputs.wiffconverter_matrix }}
41+
pyonsite_matrix: ${{ steps.set-matrix.outputs.pyonsite_matrix }}
4042
has_diann: ${{ steps.set-matrix.outputs.has_diann }}
4143
has_relink: ${{ steps.set-matrix.outputs.has_relink }}
4244
has_wiffconverter: ${{ steps.set-matrix.outputs.has_wiffconverter }}
45+
has_pyonsite: ${{ steps.set-matrix.outputs.has_pyonsite }}
4346
steps:
4447
- uses: actions/checkout@v4
4548

@@ -58,6 +61,7 @@ jobs:
5861
diann_1_8_1: [ 'diann-1.8.1/**', '.github/workflows/**' ]
5962
relink_1_1_0: [ 'relink-1.1.0/**', '.github/workflows/**' ]
6063
wiffconverter_0_10: [ 'wiffconverter-0.10/**', '.github/workflows/**' ]
64+
pyonsite_0_0_3: [ 'pyonsite-0.0.3/**', '.github/workflows/**' ]
6165
6266
- name: Build matrices
6367
id: set-matrix
@@ -73,6 +77,7 @@ jobs:
7377
CHG_181: ${{ steps.filter.outputs.diann_1_8_1 }}
7478
CHG_RLK: ${{ steps.filter.outputs.relink_1_1_0 }}
7579
CHG_WC010: ${{ steps.filter.outputs.wiffconverter_0_10 }}
80+
CHG_OS003: ${{ steps.filter.outputs.pyonsite_0_0_3 }}
7681
run: |
7782
DIANN_ALL='[
7883
{"context":"diann-2.5.1","tag":"ghcr.io/${{ github.repository_owner }}/diann:2.5.1","sif":"diann-sif:2.5.1","extra_tags":"ghcr.io/${{ github.repository_owner }}/diann:latest","chg":"CHG_251"},
@@ -90,11 +95,15 @@ jobs:
9095
WIFFCONV_ALL='[
9196
{"context":"wiffconverter-0.10","tag":"ghcr.io/${{ github.repository_owner }}/wiffconverter:0.10","sif":"wiffconverter-sif:0.10","extra_tags":"ghcr.io/${{ github.repository_owner }}/wiffconverter:latest","chg":"CHG_WC010"}
9297
]'
98+
PYONSITE_ALL='[
99+
{"context":"pyonsite-0.0.3","tag":"ghcr.io/${{ github.repository_owner }}/pyonsite:0.0.3","sif":"pyonsite-sif:0.0.3","extra_tags":"ghcr.io/${{ github.repository_owner }}/pyonsite:latest","chg":"CHG_OS003"}
100+
]'
93101
94102
if [[ "$EVENT" == "release" || "$EVENT" == "workflow_dispatch" ]]; then
95103
DIANN=$(echo "$DIANN_ALL" | jq -c '[.[] | del(.chg)]')
96104
RELINK=$(echo "$RELINK_ALL" | jq -c '[.[] | del(.chg)]')
97105
WIFFCONV=$(echo "$WIFFCONV_ALL" | jq -c '[.[] | del(.chg)]')
106+
PYONSITE=$(echo "$PYONSITE_ALL" | jq -c '[.[] | del(.chg)]')
98107
else
99108
DIANN=$(echo "$DIANN_ALL" | jq -c --arg c251 "${CHG_251:-false}" --arg c250 "${CHG_250:-false}" --arg c232 "${CHG_232:-false}" --arg c220 "${CHG_220:-false}" --arg c210 "${CHG_210:-false}" \
100109
--arg c20 "${CHG_20:-false}" --arg c192 "${CHG_192:-false}" --arg c181 "${CHG_181:-false}" \
@@ -112,17 +121,22 @@ jobs:
112121
'[.[] | select(.chg == "CHG_RLK" and $crlk == "true") | del(.chg)]')
113122
WIFFCONV=$(echo "$WIFFCONV_ALL" | jq -c --arg cwc010 "${CHG_WC010:-false}" \
114123
'[.[] | select(.chg == "CHG_WC010" and $cwc010 == "true") | del(.chg)]')
124+
PYONSITE=$(echo "$PYONSITE_ALL" | jq -c --arg cos003 "${CHG_OS003:-false}" \
125+
'[.[] | select(.chg == "CHG_OS003" and $cos003 == "true") | del(.chg)]')
115126
fi
116127
117128
echo "diann_matrix={\"include\":$DIANN}" >> $GITHUB_OUTPUT
118129
echo "relink_matrix={\"include\":$RELINK}" >> $GITHUB_OUTPUT
119130
echo "wiffconverter_matrix={\"include\":$WIFFCONV}" >> $GITHUB_OUTPUT
131+
echo "pyonsite_matrix={\"include\":$PYONSITE}" >> $GITHUB_OUTPUT
120132
echo "has_diann=$([ "$DIANN" != "[]" ] && echo true || echo false)" >> $GITHUB_OUTPUT
121133
echo "has_relink=$([ "$RELINK" != "[]" ] && echo true || echo false)" >> $GITHUB_OUTPUT
122134
echo "has_wiffconverter=$([ "$WIFFCONV" != "[]" ] && echo true || echo false)" >> $GITHUB_OUTPUT
135+
echo "has_pyonsite=$([ "$PYONSITE" != "[]" ] && echo true || echo false)" >> $GITHUB_OUTPUT
123136
echo "DIA-NN: $DIANN"
124137
echo "Relink: $RELINK"
125138
echo "WiffConverter: $WIFFCONV"
139+
echo "Pyonsite: $PYONSITE"
126140
127141
# ── Build DIA-NN containers (sequential) ───────────────────────────────
128142
build-diann:
@@ -323,10 +337,68 @@ jobs:
323337
singularity push image.sif oras://ghcr.io/${{ github.repository_owner }}/$SIF_LATEST
324338
fi
325339
340+
# ── Build pyonsite container (after WiffConverter) ──────────────────────────
341+
build-pyonsite:
342+
name: "pyonsite ${{ matrix.context }}"
343+
needs: [detect-changes, build-diann, build-relink, build-wiffconverter]
344+
if: always() && needs.detect-changes.outputs.has_pyonsite == 'true' && github.repository_owner == 'bigbio'
345+
runs-on: ubuntu-latest
346+
permissions:
347+
contents: read
348+
packages: write
349+
strategy:
350+
fail-fast: false
351+
max-parallel: 1
352+
matrix: ${{ fromJSON(needs.detect-changes.outputs.pyonsite_matrix) }}
353+
354+
steps:
355+
- uses: actions/checkout@v4
356+
- uses: docker/setup-buildx-action@v3
357+
358+
- name: Log in to GitHub Container Registry (GHCR)
359+
uses: docker/login-action@v3
360+
with:
361+
registry: ghcr.io
362+
username: ${{ github.actor }}
363+
password: ${{ secrets.GITHUB_TOKEN }}
364+
365+
- name: Build and push Docker image
366+
uses: docker/build-push-action@v5
367+
with:
368+
context: ./${{ matrix.context }}
369+
push: ${{ github.event_name != 'pull_request' }}
370+
load: true
371+
tags: |
372+
${{ matrix.tag }}
373+
${{ matrix.extra_tags }}
374+
cache-from: type=gha,scope=${{ matrix.context }}
375+
cache-to: type=gha,scope=${{ matrix.context }},mode=max
376+
provenance: false
377+
378+
- name: Set up Singularity
379+
if: github.event_name != 'pull_request'
380+
uses: eWaterCycle/setup-singularity@v7
381+
with:
382+
singularity-version: 3.8.7
383+
384+
- name: Convert to Singularity and push
385+
if: github.event_name != 'pull_request'
386+
run: |
387+
docker save ${{ matrix.tag }} -o image.tar
388+
singularity build image.sif docker-archive://image.tar
389+
390+
echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ github.actor }} --password-stdin oras://ghcr.io
391+
392+
singularity push image.sif oras://ghcr.io/${{ github.repository_owner }}/${{ matrix.sif }}
393+
if [[ "${{ github.event_name }}" == "release" && -n "${{ matrix.extra_tags }}" ]]; then
394+
SIF_LATEST=$(echo "${{ matrix.sif }}" | sed 's/:[^:]*$/:latest/')
395+
singularity push image.sif oras://ghcr.io/${{ github.repository_owner }}/$SIF_LATEST
396+
fi
397+
326398
# ── Sync OpenMS containers (after everything else) ─────────────────────
327399
sync-openms:
328400
name: Sync OpenMS Containers
329-
needs: [build-diann, build-relink, build-wiffconverter]
401+
needs: [build-diann, build-relink, build-wiffconverter, build-pyonsite]
330402
if: always() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch') && github.repository_owner == 'bigbio'
331403
runs-on: ubuntu-latest
332404
permissions:

README.md

Lines changed: 72 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# QuantMS Docker Containers
22

3-
A repository of production-ready Docker and Singularity containers for proteomics tools used in quantms pipelines, including **DIA-NN**, **Relink**, and **OpenMS**.
3+
A repository of production-ready Docker and Singularity containers for proteomics tools used in quantms pipelines, including **DIA-NN**, **Relink**, **pyonsite**, and **OpenMS**.
44

55
## Overview
66

77
This repository provides containerized versions of popular proteomics tools:
88

99
- [DIA-NN](https://github.com/vdemichev/DiaNN): A powerful software solution for analyzing DIA proteomics data
1010
- [Relink](https://github.com/bigbio/relink): Crosslinking mass spectrometry analysis pipeline (xiSEARCH, xiFDR, Scout)
11+
- [pyonsite](https://github.com/bigbio/onsite): Mass spectrometry post-translational modification localization tool (AScore, PhosphoRS, LucXor) — published on PyPI as `pyonsite`
1112
- [OpenMS](https://www.openms.de/): A versatile open-source software for mass spectrometry data analysis
1213
- [WiffConverter](https://hub.docker.com/r/sciex/wiffconverter): SCIEX `.wiff` / `.wiff.scan` to indexed `.mzML` conversion via the bundled `OneOmics.WiffConverter` .NET assembly
1314

@@ -181,6 +182,43 @@ On failure the wrapper prints a banner with the input/output/mode and the last
181182
`.wiff.scan`, locked output, unsupported acquisition) are diagnosable from the
182183
console without re-running.
183184

185+
### pyonsite Container
186+
187+
The pyonsite container provides a complete mass spectrometry PTM localization environment for phosphorylation site assignment and scoring. The PyPI package name is `pyonsite`; the CLI tool is invoked as `onsite`.
188+
189+
| Algorithm | Description |
190+
| ---------- | ------------------------------------------------------------ |
191+
| AScore | Probability-based approach using binomial statistics |
192+
| PhosphoRS | Site-specific probabilities with isomer analysis |
193+
| LucXor | Two-stage processing with false localization rate estimation |
194+
195+
| Container Type | Tag | URL |
196+
| -------------- | ----- | --------------------------------------------- |
197+
| Docker | 0.0.3 | `ghcr.io/bigbio/pyonsite:0.0.3` |
198+
| Docker | latest | `ghcr.io/bigbio/pyonsite:latest` |
199+
| Singularity | 0.0.3 | `oras://ghcr.io/bigbio/pyonsite-sif:0.0.3` |
200+
201+
```bash
202+
# Pull the image
203+
docker pull ghcr.io/bigbio/pyonsite:latest
204+
205+
# AScore algorithm
206+
docker run --rm -v /path/to/data:/data ghcr.io/bigbio/pyonsite:latest \
207+
onsite ascore -in /data/spectra.mzML -id /data/identifications.idparquet -out /data/results.idparquet
208+
209+
# PhosphoRS algorithm
210+
docker run --rm -v /path/to/data:/data ghcr.io/bigbio/pyonsite:latest \
211+
onsite phosphors -in /data/spectra.mzML -id /data/identifications.idparquet -out /data/results.idparquet
212+
213+
# LucXor algorithm with FLR
214+
docker run --rm -v /path/to/data:/data ghcr.io/bigbio/pyonsite:latest \
215+
onsite lucxor -in /data/spectra.mzML -id /data/identifications.idparquet -out /data/results.idparquet
216+
217+
# Compute all three algorithms at once
218+
docker run --rm -v /path/to/data:/data ghcr.io/bigbio/pyonsite:latest \
219+
onsite ascore --compute-all-scores -in /data/spectra.mzML -id /data/identifications.idparquet -out /data/results.idparquet
220+
```
221+
184222
### OpenMS Containers
185223

186224
OpenMS containers are publicly available and can be pulled directly:
@@ -200,6 +238,7 @@ Please note the following license restrictions:
200238

201239
- **DIA-NN**: Custom academic license with restrictions. Please review the [DIA-NN license](diann-2.1.0/LICENSE.txt) before using. No commercial use or cloud deployment without collaboration agreement.
202240
- **DIA-NN Enterprise**: Separate per-user license issued by the DIA-NN authors. The key and the Enterprise binary are **not redistributable** — never commit them or publish the Enterprise image. Build locally only.
241+
- **pyonsite**: Available under the [MIT License](https://github.com/bigbio/onsite/blob/main/LICENSE) (the underlying `onsite` software)
203242
- **Relink/xiSEARCH/xiFDR/Scout**: Please review the individual tool licenses
204243
- **OpenMS**: Available under the [BSD 3-Clause License](https://github.com/OpenMS/OpenMS/blob/develop/LICENSE)
205244
- **WiffConverter**: Proprietary SCIEX redistributable (via the public `sciex/wiffconverter` Docker Hub image). Users are responsible for complying with SCIEX's terms of use.
@@ -221,6 +260,13 @@ Please note the following license restrictions:
221260
- Architecture: `amd64`/`x86_64`
222261
- Includes: Java 21, .NET 9.0, Python 3.12, pyOpenMS, polars, pandas
223262

263+
### pyonsite Container
264+
265+
- Base Image: `python:3.12-slim`
266+
- Version: 0.0.3
267+
- Architecture: `amd64`/`x86_64`
268+
- Includes: Python 3.12, pyOpenMS, NumPy, SciPy, pyarrow, click
269+
224270
### OpenMS Containers
225271

226272
- Sourced from: `ghcr.io/openms/openms-tools-thirdparty`
@@ -323,6 +369,29 @@ docker run -v /path/to/data:/data ghcr.io/bigbio/relink:latest \
323369
process_dataset [options]
324370
```
325371

372+
#### pyonsite
373+
374+
The CLI tool inside the container is invoked as `onsite` (the PyPI package is `pyonsite`). It provides three PTM localization algorithms (AScore, PhosphoRS, LucXor) and accepts mzML spectra files with identifications in idparquet format:
375+
376+
```bash
377+
# AScore algorithm
378+
docker run -v /path/to/data:/data ghcr.io/bigbio/pyonsite:latest \
379+
onsite ascore -in /data/spectra.mzML -id /data/identifications.idparquet -out /data/results.idparquet
380+
381+
# PhosphoRS algorithm
382+
docker run -v /path/to/data:/data ghcr.io/bigbio/pyonsite:latest \
383+
onsite phosphors -in /data/spectra.mzML -id /data/identifications.idparquet -out /data/results.idparquet
384+
385+
# LucXor algorithm with FLR
386+
docker run -v /path/to/data:/data ghcr.io/bigbio/pyonsite:latest \
387+
onsite lucxor -in /data/spectra.mzML -id /data/identifications.idparquet -out /data/results.idparquet
388+
389+
# Compute all three algorithms with decoy-based FLR
390+
docker run -v /path/to/data:/data ghcr.io/bigbio/pyonsite:latest \
391+
onsite ascore --compute-all-scores --add-decoys \
392+
-in /data/spectra.mzML -id /data/identifications.idparquet -out /data/results.idparquet
393+
```
394+
326395
#### OpenMS
327396

328397
```bash
@@ -347,7 +416,8 @@ This repository includes a GitHub Actions workflow that builds and syncs all con
347416
1. Builds and pushes DIA-NN Docker and Singularity containers (all versions)
348417
2. Builds and pushes Relink Docker and Singularity containers
349418
3. Builds and pushes WiffConverter Docker and Singularity containers
350-
4. Syncs OpenMS containers from the official repository to BigBio
419+
4. Builds and pushes pyonsite Docker and Singularity containers
420+
5. Syncs OpenMS containers from the official repository to BigBio
351421

352422
The workflow is triggered by:
353423

pyonsite-0.0.3/Dockerfile

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
FROM python:3.12-slim
2+
3+
# Metadata
4+
LABEL base_image="python:3.12-slim"
5+
LABEL version="1"
6+
LABEL software="pyonsite"
7+
LABEL software.version="0.0.3"
8+
LABEL about.summary="onsite: mass spectrometry post-translational modification localization tool (AScore, PhosphoRS, LucXor)"
9+
LABEL about.home="https://github.com/bigbio/onsite"
10+
LABEL about.documentation="https://github.com/bigbio/onsite"
11+
LABEL about.license="MIT"
12+
LABEL about.tags="Proteomics,PTM,Phosphorylation,MassSpectrometry"
13+
LABEL maintainer="Yasset Perez-Riverol <ypriverol@gmail.com>"
14+
15+
ENV DEBIAN_FRONTEND=noninteractive
16+
ENV PYTHONUNBUFFERED=1
17+
ENV PYTHONDONTWRITEBYTECODE=1
18+
19+
# Install system dependencies required by pyopenms (libglib-2.0)
20+
RUN apt-get update && apt-get install -y --no-install-recommends \
21+
libglib2.0-0 && \
22+
rm -rf /var/lib/apt/lists/*
23+
24+
# Install pyonsite and its dependencies (pyopenms, numpy, scipy, pyarrow, click)
25+
RUN pip install --no-cache-dir pyonsite==0.0.3
26+
27+
# Verify installation
28+
RUN set -e; \
29+
echo "=== Version checks ===" && \
30+
python -c "from importlib.metadata import version; print(f'pyonsite {version(\"pyonsite\")}')" && \
31+
python -c "import pyopenms; print(f'pyopenms {pyopenms.__version__}')" && \
32+
python -c "import numpy; print(f'numpy {numpy.__version__}')" && \
33+
python -c "import scipy; print(f'scipy {scipy.__version__}')" && \
34+
python -c "import pyarrow; print(f'pyarrow {pyarrow.__version__}')" && \
35+
echo "=== CLI smoke test ===" && \
36+
onsite --help && \
37+
echo "=== Subcommand help ===" && \
38+
onsite ascore --help && \
39+
onsite phosphors --help && \
40+
onsite lucxor --help && \
41+
echo "=== All checks passed ==="
42+
43+
WORKDIR /data/
44+
45+
# Reset ENTRYPOINT/CMD so the container behaves like the other images in this repo
46+
ENTRYPOINT []
47+
CMD ["/bin/bash"]

0 commit comments

Comments
 (0)