Skip to content

IsobaricWorkflow: give every consensus feature a unique ID - #10201

Merged
timosachsenberg merged 2 commits into
OpenMS:developfrom
ManasBagul23:pr/33-isobaricworkflow-unique-ids
Sep 19, 2026
Merged

timosachsenberg merged 2 commits into
OpenMS:developfrom
ManasBagul23:pr/33-isobaricworkflow-unique-ids

Conversation

@ManasBagul23

@ManasBagul23 ManasBagul23 commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Description

IsobaricWorkflow wrote every consensus feature with id="e_0": the features are created
without a unique ID (the setUniqueId call in fillConsensusFeature_() is commented out)
and cmap.ensureUniqueId() only covers the map itself. consensusElement/@id is xs:ID in
ConsensusXML_1_7.xsd, so the output does not validate as soon as more than one feature is
written. The checked-in references show it: 5 features, 1 distinct ID.

The tool now ensures unique IDs for the map and all its features before storing, the same
treatment the spectra -> consensusXML path of FileConverter gets in #10161.

The two consensusXML references change only in their consensusElement id attributes
(test mode seeds the ID generator, so the IDs are reproducible); the QPX outputs are
unchanged. CHANGELOG entry under Fixes.

Prepared with AI assistance; I reviewed the changes.

Checklist

  • Make sure that you are listed in the AUTHORS file
  • Add relevant changes and new features to the CHANGELOG file
  • I have commented my code, particularly in hard-to-understand areas
  • New and existing unit tests pass locally with my changes
  • Updated or added python bindings for changed or new classes (Tick if no updates were necessary.)

Summary by CodeRabbit

  • Bug Fixes
    • Fixed IsobaricWorkflow output so each consensus feature now receives a unique identifier.
    • Corrected consensusXML generation to comply with identifier requirements, improving compatibility with downstream tools.

The consensus features are created without a unique ID (the setUniqueId call
in fillConsensusFeature_() has been commented out since the tool was added),
and cmap.ensureUniqueId() only covers the map itself. So every feature was
written as id="e_0"; consensusElement/@id is xs:ID in ConsensusXML_1_7.xsd,
so the output did not validate as soon as more than one feature was written.

Ensure unique IDs for the map and all its features before storing.

The two consensusXML references change only in their consensusElement id
attributes (test mode seeds the ID generator, so the IDs are reproducible);
the QPX outputs are unchanged.
Copilot AI lite review requested due to automatic review settings September 19, 2026 06:19

Copilot AI left a comment

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 8756dcb4-649c-4414-9036-89c2dc87349a

📥 Commits

Reviewing files that changed from the base of the PR and between 253a4eb and 73b314a.

📒 Files selected for processing (4)
  • CHANGELOG
  • src/tests/topp/IsobaricWorkflow_1_out.consensusXML
  • src/tests/topp/IsobaricWorkflow_strictly_unique_out.consensusXML
  • src/topp/IsobaricWorkflow.cpp

Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

IsobaricWorkflow now assigns unique IDs to the consensus map and each consensus feature. Two consensusXML test outputs and the release notes reflect this correction.

Changes

IsobaricWorkflow identifier correction

Layer / File(s) Summary
Unique ID assignment
src/topp/IsobaricWorkflow.cpp
The workflow applies UniqueIdInterface::ensureUniqueId to the consensus map and its contained consensus features.
Expected output and release note updates
src/tests/topp/IsobaricWorkflow_1_out.consensusXML, src/tests/topp/IsobaricWorkflow_strictly_unique_out.consensusXML, CHANGELOG
The five consensus elements in each expected output now have distinct IDs. The changelog documents the invalid duplicate-ID output and its correction.

Priority: ⬇️ Low

Change: Bug fix · Severity of issue fixed: Low

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (3 skipped: 3 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: assigning a unique ID to every consensus feature in IsobaricWorkflow.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (3 skipped: 3 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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.

❤️ Share

A rabbit hops through IDs so bright
Each feature gets its own moonlight
No twins remain in the XML field
Five little numbers form a shield
The changelog records the trail
And valid consensus files prevail

Comment @coderabbitai help to get the list of available commands.

@timosachsenberg
timosachsenberg merged commit 78b2c14 into OpenMS:develop Sep 19, 2026
32 checks passed
timosachsenberg added a commit that referenced this pull request Sep 20, 2026
Routine documentation check against recently merged commits:
- TheoreticalSpectrumGeneratorXLMS precursor-isotope fix cited #10148
  (copied from the entry above) instead of its own PR #10194.
- The IsobaricWorkflow unique-ID and FileMerger precursor-spectrumRef
  fixes had no PR citation at all; add #10201 and #10200.
- The new glycan_fragmentation doxygen page (added in #10204) was never
  linked from the mainpage's Documentation list, unlike the other
  feature tutorial pages there.


Claude-Session: https://claude.ai/code/session_01Gzxw7tzAc3wu9kBS6k253g

Co-authored-by: Claude <[email protected]>
@ManasBagul23
ManasBagul23 deleted the pr/33-isobaricworkflow-unique-ids branch September 20, 2026 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants