Repository navigation
deprecate qpxc convert openms (-out_qpx parquet) in favour of openms-consensus - #237
Conversation
…d Features OpenMS -out_qpx (and other producers) can emit data that trips the mandatory-id close-validation and crashes qpxc convert: - Duplicate primary key -> now a WARNING, not a raise (e.g. per-protein PSM rows collapsing on [peptidoform,charge,run,scan]). Null id stays a hard error. - Unidentified Feature (null peptidoform) with no producer id -> derive feature_id from the composite (null peptidoform + measured charge/run/rt) instead of raising. A producer id, when present, is still namespaced by run and stashed as a cv_param. Aligns with the agreed design (clashes reported as warnings during conversion). Tests updated; full suite 870 passed.
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
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: Pro Plus 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 |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 12 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Did you investigate this further? sounds weird to have multiple annotations of the same peptidoform per scan. |
|
@jpfeuffer Im trying to find out why; but remember this is OpenMS ;) |
…ble path too The earlier fix only relaxed the whole-file close check; write_table validates with strict=True, under which duplicate_pk is an error, so OpenMS -out_qpx multi-engine PSM rows (same [peptidoform,charge,run,scan], different engine score/mz — the #229 merged- engine case) still crashed qpxc convert openms. write_table now warns on duplicate_pk while keeping null/type issues as hard errors. Adds a write_table dup-PK test; suite 871.
The openms converter re-validates staged core files (_validate_core, strict=True) and raised on duplicate_pk — a THIRD gate (after write_table and the close check) that still crashed qpxc convert openms on OpenMS -out_qpx multi-engine PSM rows. It now warns on duplicate_pk while keeping null/type issues as hard failures, and no longer blocks installation of the converted file. Test updated to assert the tolerant behavior (duplicate identity warns + converts). Suite 871.
OpenMS -out_qpx emits one PSM row per search engine (Comet + MS-GF+): same spectrum+peptidoform, differing only in the per-engine score (OpenMS#9871). Dedup these on the identity composite — keep the lowest-PEP row and fold the other engines' additional_scores into it, so psm_id is unique and no engine's score is lost.
OpenMS -out_qpx stamps every PSM with the first run's file (map_index dropped, OpenMS#9872) — ~half the PSMs get the wrong run on multi-run designs. Read the authoritative per-PSM run from the companion consensusXML (psm_refs.py) and restore run_file_name, matched on the exact (plain_sequence, charge, scan) key; chemistry stays from the parquet. Also collapse OpenMS's assigned+unassigned duplicate PSMs (OpenMS#9871), preferring the feature-attached row. Verified on real phospho output: 496 all-rep1 -> 254 rep1 / 238 rep2, 240 corrected, 4 merged, zero duplicate identities.
|
This is due to an issue with the OpenMS QPX export. The current consensusXML is fine. Check for updates to the quantms PR |
Extract _collapse_duplicate_psms/_fold_additional_scores/_relabel_psm_runs so the merge and run-repair paths share one collapse implementation (cuts _repair_psm_run_files complexity 17->low, removes the loop-closure warnings). Suppress the PsmRef too-many-attributes notice (it's a reference-field record) and the unused iterparse event var. Behavior unchanged (real phospho: 492 rows, 240 relabeled, 4 merged, 0 dup identities).
Reviewed Dai's openms_consensus converter: it reads the consensusXML natively (pyopenms), resolves run_file_name per PSM via map_index/id_merge_index/feature-element runs (handles multi-run isobaric), derives peptidoform via to_proforma, and dedups on [peptidoform,charge,run,scan]. It is strictly cleaner and more correct than the -out_qpx parquet path, so the run_file_name repair I prototyped (psm_refs.py + _repair_psm_run_files) is redundant — reverted. The -out_qpx parquet path is fundamentally broken upstream: it mis-assigns every PSM's run to the first run (OpenMS#9872) and duplicates PSMs (OpenMS#9871). Mark 'qpxc convert openms' deprecated (Click deprecated flag + docstring + a runtime warning) and steer to 'qpxc convert openms-consensus'. Keep the writer-level duplicate-PK warning so the deprecated path degrades gracefully.
Summary
qpxc convert openmsreads the OpenMSProteomicsLFQ -out_qpxparquet folder, which is broken upstream:run_file_nameis stamped with the first run (the per-PSMmap_indexis dropped). On any multi-run / multi-fraction / multi-replicate design ~half the PSMs carry the wrong run. Filed OpenMS#9872.PeptideIdentification+ oneUnassignedPeptideIdentification). Filed OpenMS#9871.qpxc convert openms-consensusalready reads the consensusXML directly and resolves the correct run per PSM (map_index/id_merge_index/ feature-element runs, incl. multi-run isobaric), derives the peptidoform natively (to_proforma), and dedups on[peptidoform, charge, run_file_name, scan]. quantms (bigbio/quantms#725) has switched itsQPX_CONVERTmodule to it and all pipeline CI passes across every profile.So the fix is not to patch the parquet path — it's to deprecate it and steer everyone to the consensusXML path.
Changes
qpxc convert openms: Clickdeprecated=True, a[DEPRECATED]docstring pointing toopenms-consensus, and a runtime warning naming OpenMS#9871/#9872. The command still runs (it will be reconsidered once OpenMS ships an-out_qpxwith the correct per-PSM run).Deprecatedsection added.Note
An earlier iteration of this branch prototyped a consensusXML-based run-file repair of the parquet path (
psm_refs.py+_repair_psm_run_files). On review,openms-consensusalready does this natively and more correctly (isobaric run resolution, native peptidoform), so that prototype was reverted as redundant.Related: OpenMS#9871, OpenMS#9872, bigbio/quantms#725, #229.