Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/bigbio/qpx/openmsconsensus/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ dependencies:
# publishes it.
- pip
- pip:
- qpx==1.1.3
- qpx==1.1.4
30 changes: 21 additions & 9 deletions modules/bigbio/qpx/openmsconsensus/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ process QPX_OPENMSCONSENSUS {
// a single image serves Docker (native) and Singularity (via docker://).
// 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"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

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


input:
path(consensusxml)
Expand All @@ -17,7 +17,9 @@ process QPX_OPENMSCONSENSUS {

output:
path "qpx_output/*", emit: qpx_dataset
path "*.h5mu" , emit: mudata
// 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
Comment on lines +20 to +22

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

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

path "versions.yml", emit: versions

when:
Expand All @@ -39,14 +41,24 @@ process QPX_OPENMSCONSENSUS {
${args}

python - <<'PY'
from qpx.dataset import Dataset
from qpx.mudata import build_mudata
import shutil
from pathlib import Path

ds = Dataset("qpx_output")
mdata = build_mudata(ds)
mdata.write("${prefix}.h5mu")
ds.close()
print(f"MuData: {mdata.n_obs} obs x {mdata.n_vars} vars -> ${prefix}.h5mu")
from qpx.mudata import write_dataset_mudata

# Use qpx's own writer rather than build_mudata + mdata.write. It refuses a
# MuData that is missing a required quantification modality, writes via a
# temporary file, and drops a stale view if the build fails. Calling
# build_mudata directly bypassed that check: a modality that failed to build
# was logged and skipped, so an INCOMPLETE h5mu was written and the task
# exited 0 (bigbio/qpx#316 - MSV000085836 shipped proteins with no precursors).
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.")
Comment on lines +55 to +58

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

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

else:
shutil.move(str(written), "${prefix}.h5mu")
print(f"MuData -> ${prefix}.h5mu")
PY

cat <<-END_VERSIONS > versions.yml
Expand Down
Loading