-
Notifications
You must be signed in to change notification settings - Fork 6
feat(converters): add OpenMS QPX enrichment and MuData export support #204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f3c7545
feat(mudata): add MuData extras, Docker image, and per-table label de…
Shen-YuFei a98668c
feat(converters): add OpenMS QPX converter for -out_qpx enrichment
Shen-YuFei c99da01
fix(pg_adapter): support non-mzML extensions in pg_matrix column dete…
Shen-YuFei 1ca82f2
Merge branch 'dev' of https://github.com/Shen-YuFei/qpx into dev
Shen-YuFei 69c378f
feat(diann): auto-detect DIA-NN version from summary log
Shen-YuFei 3becbc7
fix(mudata): stem-based run matching and NaN serialization in h5mu
Shen-YuFei eacb586
fix(codacy): pin versions and resolve codacy warnings
Shen-YuFei 1832f32
fix(codacy): NumPy docstring style and eliminate SQL string construction
Shen-YuFei File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Exclude non-essential content from the Docker build context. | ||
| # Keep only what ``pip install .`` needs: pyproject.toml, README.md, LICENSE, qpx/. | ||
|
|
||
| .git/ | ||
| .github/ | ||
| .pytest_cache/ | ||
| .hypothesis/ | ||
| .ruff_cache/ | ||
| .tmp/ | ||
| .vscode/ | ||
| .windsurf/ | ||
| .idea/ | ||
| __pycache__/ | ||
| *.pyc | ||
| *.pyo | ||
| *.egg-info/ | ||
| build/ | ||
| dist/ | ||
| .coverage | ||
| coverage.xml | ||
| .DS_Store | ||
| .venv/ | ||
| venv/ | ||
| env/ | ||
|
|
||
| # Project-specific large/non-essential dirs | ||
| tests/ | ||
| docs/ | ||
| site/ | ||
| benchmarks/ | ||
| scripts/ | ||
| data/ | ||
|
|
||
| # Docker-related files are not needed inside the image | ||
| Dockerfile | ||
| .dockerignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| # Build and publish the QPX container image to GitHub Container Registry (GHCR). | ||
| # | ||
| # Triggers: | ||
| # - push to main -> publishes the `dev` tag (floating) | ||
| # - push tag v*.*.* -> publishes semantic version tags + `latest` | ||
| # - pull_request to main -> build only (smoke-test the Dockerfile) | ||
| # - workflow_dispatch -> manual run | ||
| # | ||
| # Image: ghcr.io/${owner}/qpx (expands to ghcr.io/bigbio/qpx) | ||
| # Platform: linux/amd64 (multi-arch can be added later) | ||
| # | ||
| # Repo settings required: | ||
| # Settings -> Actions -> General -> Workflow permissions -> "Read and write permissions" | ||
| # (the default GITHUB_TOKEN is used to authenticate against GHCR) | ||
|
|
||
| name: Publish Docker image | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| tags: ["v*.*.*"] | ||
| pull_request: | ||
| branches: [main] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| id-token: write | ||
|
|
||
| jobs: | ||
| docker: | ||
| name: Build and push to GHCR | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| fetch-tags: true | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Log in to GHCR | ||
| if: github.event_name != 'pull_request' | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.actor }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Resolve QPX version for build-arg | ||
| id: ver | ||
| run: | | ||
| if [[ "${GITHUB_REF}" == refs/tags/v* ]]; then | ||
| echo "qpx_version=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "qpx_version=0.0.0.dev0+$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| - name: Extract image metadata | ||
| id: meta | ||
| uses: docker/metadata-action@v5 | ||
| with: | ||
| images: ghcr.io/${{ github.repository_owner }}/qpx | ||
| tags: | | ||
| type=semver,pattern={{version}} | ||
| type=semver,pattern={{major}}.{{minor}} | ||
| type=ref,event=pr | ||
| type=raw,value=dev,enable=${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }} | ||
| type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }} | ||
| type=sha,format=short | ||
|
|
||
| - name: Build and push | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| context: . | ||
| platforms: linux/amd64 | ||
| push: ${{ github.event_name != 'pull_request' }} | ||
| tags: ${{ steps.meta.outputs.tags }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
| build-args: | | ||
| QPX_VERSION=${{ steps.ver.outputs.qpx_version }} | ||
| provenance: true | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # syntax=docker/dockerfile:1.6 | ||
| # | ||
| # QPX container image | ||
| # ------------------- | ||
| # Provides the ``qpxc`` CLI built from this repository's source, with the | ||
| # optional ``[mudata]`` extras pre-installed for MuData export. | ||
| # | ||
| # Build: | ||
| # docker build -t ghcr.io/bigbio/qpx:dev . | ||
| # | ||
| # Run: | ||
| # docker run --rm -v $(pwd):/data ghcr.io/bigbio/qpx:dev convert diann --help | ||
|
|
||
| FROM python:3.11-slim-bookworm | ||
|
|
||
| # Runtime system deps required by pyOpenMS (see environment.yml). | ||
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends libglib2.0-0=2.74.6-2+deb12u8 procps=2:4.0.2-3 \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # hatch-vcs derives the version from git history; when the build context lacks | ||
| # a .git directory (typical Docker builds), fall back to this placeholder. | ||
| ARG QPX_VERSION=0.0.0.dev0 | ||
| ENV SETUPTOOLS_SCM_PRETEND_VERSION=${QPX_VERSION} | ||
|
|
||
| # Minimal build inputs required by ``pip install .`` under hatchling. | ||
| WORKDIR /src | ||
| COPY pyproject.toml README.md LICENSE ./ | ||
| COPY qpx ./qpx | ||
|
|
||
| RUN pip install --no-cache-dir --upgrade pip==24.0 \ | ||
| && pip install --no-cache-dir ".[mudata]" \ | ||
| && rm -rf /src | ||
|
|
||
| LABEL org.opencontainers.image.source="https://github.com/bigbio/qpx" | ||
| LABEL org.opencontainers.image.description="QPX: Quantitative Proteomics Parquet toolkit (qpxc CLI) with MuData export" | ||
| LABEL org.opencontainers.image.licenses="Apache-2.0" | ||
|
|
||
| WORKDIR /data | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
openmsCLI command requires--sdrf-file, butOpenMSConvertersupports running without SDRF (and there’s a test asserting sample/run are skipped when SDRF is absent). Either make--sdrf-fileoptional (and update help/examples accordingly), or remove the no-SDRF codepath/tests so the CLI and converter behavior stay consistent.