Repository navigation
Conversation
QPX_OPENMSCONSENSUS called build_mudata() + mdata.write() directly. That
bypasses qpx's own writer, which checks
missing = required_modalities - set(mdata.mod)
and refuses a MuData missing a required quantification modality.
build_mudata catches per-modality failures, logs them and continues, so a
modality that failed to build was simply absent: the module wrote an
INCOMPLETE h5mu and the task exited 0. On MSV000085836 (TMT) that shipped
a view with proteins and no precursors, from a pyarrow offset overflow
(bigbio/qpx#316).
Also make *.h5mu an optional output. It was made required, which inverted
qpx's contract: the parquet views are the dataset's source of truth and
the MuData view is best-effort, so a view that cannot be built must not
destroy an otherwise complete run. Combined with the writer's guard the
behaviour is now: complete view, or no view and a warning - never a
silently partial one.
write_dataset_mudata also writes via a temporary file and removes a stale
h5mu when the build fails, which the inline heredoc did not.
Requires qpx 1.1.4: write_dataset_mudata was extracted in bigbio/qpx#312
and the overflow fixed in bigbio/qpx#316. Container and conda pins bumped.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
qpx 1.1.4 is released: It carries the two fixes this module needs:
|
PR Summary by QodoPrevent partial MuData output from QPX OpenMS consensus conversion
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1. Module tests cannot pull the image
|
| // BioContainers/Galaxy-depot lag the release, so GHCR is used for containers; | ||
| // -profile conda still resolves the bioconda package in environment.yml. | ||
| container "ghcr.io/bigbio/qpx:1.1.3" | ||
| container "ghcr.io/bigbio/qpx:1.1.4" |
There was a problem hiding this comment.
1. Module tests cannot pull the image 📘 Rule violation ☼ Reliability
The container declaration now selects ghcr.io/bigbio/qpx:1.1.4, which the supplied PR description identifies as unpublished. Any container-based module test or workflow profile reaches this image before executing either the normal or stub script, so the affected automated checks cannot currently pass.
Agent Prompt
## Issue description
The module selects a container image that is not yet available, preventing container-based tests and workflows from starting.
## Fix Focus Areas
- modules/bigbio/qpx/openmsconsensus/main.nf[11-11]
- modules/bigbio/qpx/openmsconsensus/environment.yml[10-10]
## Recommended Fix
Publish and verify the qpx 1.1.4 container before merging, retain matching container and Conda versions, and rerun the affected module and workflow tests against the released artifacts.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| written = write_dataset_mudata(Path("qpx_output"), "${prefix}") | ||
| if written is None: | ||
| print("WARNING: no MuData view was written; see the log above. " | ||
| "The qpx_output parquet views are complete and authoritative.") |
There was a problem hiding this comment.
2. Broken view safeguards go undetected 📘 Rule violation ☼ Reliability
The normal script introduces write_dataset_mudata and its None branch, but the sole nf-test runs with -stub and never executes either path. The stub always creates an .h5mu file and asserts one output, so it cannot detect regressions in partial-view rejection or the optional no-view behavior.
Agent Prompt
## Issue description
The changed MuData writing behavior is covered only by a stub that always creates the output, leaving the new failure guard and optional-output path untested.
## Fix Focus Areas
- modules/bigbio/qpx/openmsconsensus/main.nf[55-60]
- modules/bigbio/qpx/openmsconsensus/tests/main.nf.test[19-40]
## Recommended Fix
Add non-stub automated cases for both a complete MuData build and a modality-build failure. Assert that the complete case emits one `.h5mu`, while the failure case succeeds with complete parquet outputs, emits no `.h5mu`, and records the warning.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| // Optional: the parquet views are the dataset's source of truth, so a MuData | ||
| // view that cannot be built must not destroy an otherwise complete run. | ||
| path "*.h5mu" , emit: mudata, optional: true |
There was a problem hiding this comment.
3. Users expect a sometimes-absent output 📘 Rule violation ⚙ Maintainability
The mudata declaration now makes the .h5mu view optional, while docs/output.md still presents the combined MuData container as an unconditional part of the published QPX artifact. Whenever write_dataset_mudata returns None, the documented output is absent without documentation explaining the failure condition or that the parquet views remain authoritative.
Agent Prompt
## Issue description
The output documentation still describes the MuData container as a guaranteed artifact even though the process now omits it when a complete view cannot be built.
## Fix Focus Areas
- docs/output.md[162-166]
- docs/output.md[242-249]
- modules/bigbio/qpx/openmsconsensus/meta.yml[44-48]
## Recommended Fix
Describe `.h5mu` as an optional best-effort view, explain that it is omitted when required modalities cannot be built, and identify the parquet dataset as the authoritative output. Align the module metadata description with the same contract.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
Correction on process: The fix now lives upstream in bigbio/nf-modules#52 (both modules: Putting this back to draft until then. |
|
Superseded by #733, which does this as a proper |
…abase nf-core modules update bigbio/qpx/openmsconsensus -> bigbio/nf-modules d9e1b05, which brings: - write_dataset_mudata instead of build_mudata + mdata.write(), so a MuData missing a required quantification modality is refused rather than written. The old path shipped an h5mu with proteins and no precursors on MSV000085836 and exited 0 (bigbio/qpx#316). - *.h5mu optional again: the parquet views are the dataset's source of truth, so a best-effort artifact no longer kills an otherwise complete run. MSV000085836 lost a ~1h19 conversion to it three times. - container/conda pinned to qpx 1.1.4. - an optional FASTA input. LFQ and TMT now pass ch_database_wdecoy — the database the search actually used — so qpx fills null pg.sequence_coverage, pg.molecular_weight and feature.pg_positions for target rows. Decoy entries are skipped by the reader, so the with-decoy database is safe to pass, and .first() keeps it a value channel because the same channel already feeds ID and PROTEOMICSLFQ. Supersedes #732, which hand-edited the vendored module.
The problem
QPX_OPENMSCONSENSUScallsbuild_mudata()+mdata.write()directly, which bypasses qpx's own writer.write_dataset_mudatachecks:build_mudatacatches per-modality build failures, logs them, and continues — so a modality that fails to build is simply absent from the result. The module then wrote that incomplete MuData and the task exited 0.This is not theoretical. Validating the 1.1.4 container against MSV000085836 (TMT, 552 runs x 10 channels) produced:
A 451 MB h5mu with no precursors, reported as success. The underlying overflow is fixed in bigbio/qpx#316 (that dataset now yields
['precursors', 'proteins'], 988 MB), but the module would have shipped the partial view for any future modality failure — so the guard matters independently of that bug.Changes
write_dataset_mudata. Gets the modality guard, plus a tmp-file write and removal of a stale h5mu when the build fails — neither of which the inline heredoc did.*.h5muoptional. It had been made a required output, which inverted qpx's contract: the parquet views are the dataset's source of truth and the MuData view is explicitly best-effort. A view that cannot be built should not destroy an otherwise complete run — which is exactly what happened on MSV000085836, where a ~1h19 conversion succeeded and the run died afterwards on the h5mu step.Net behaviour: a complete view, or no view plus a warning — never a silently partial one.
Scope check
out.mudatais consumed only by this module's own nf-test (assert process.out.mudata.size() == 1), which exercises the stub and still passes; no workflow consumes the channel, sooptional: truechanges nothing downstream.