Repository navigation
TMT/itraq visualization in TOPPView - #9466
Conversation
…TMT method becomes available.
|
@cbielow The following names might be missing from the
Please consider applying the following patch: --- AUTHORS 2026-06-09 21:20:48.748111734 +0000
+++ AUTHORS.new 2026-06-09 21:20:54.653040780 +0000
@@ -22,8 +22,8 @@
- Chirag Dave
- Chris Bauer
- Chris Bielow
- - Christie Mathews
- Christian Ehrlich
+ - Christie Mathews
- Clemens Groepl
- Cornelia Friedle
- Daniel Jameson |
📝 WalkthroughWalkthroughThis PR refactors isobaric quantitation to use a central MethodType enum and compile-time registry with a factory, migrates concrete iTRAQ/TMT classes to this model, updates consumers/tests to use the factory, and adds TMT/iTRAQ reporter-ion annotation and layout in the 1D Plot1DCanvas plus annotation-container move/remove APIs. ChangesIsobaric registry migration and GUI annotation flow
Sequence DiagramsequenceDiagram
participant User
participant Plot1DCanvas
participant ContextMenu as Context Menu
participant IsobaricQuantitationMethod
participant Annotations1DContainer
User->>ContextMenu: Right-click, select TMT method
ContextMenu->>Plot1DCanvas: setTMTAnnotationMethod(MethodType)
Plot1DCanvas->>Annotations1DContainer: removeItems(old TMT items)
Plot1DCanvas->>IsobaricQuantitationMethod: create(MethodType)
IsobaricQuantitationMethod-->>Plot1DCanvas: unique_ptr<quantitation_method>
Plot1DCanvas->>Plot1DCanvas: updateTMTAnnotations_()
Plot1DCanvas->>Plot1DCanvas: match channels to spectrum peaks
Plot1DCanvas->>Annotations1DContainer: add matched/unmatched items
Plot1DCanvas->>Plot1DCanvas: layoutTMTLabels_()
Possibly Related PRs
Suggested Reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (1)
src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricQuantitationMethod.h (1)
54-73: ⚡ Quick winUse
@brief-style Doxygen blocks for the new public API docs.The new method docs are in plain triple-slash prose, but this header rule requires
@briefblocks (with blank-line-separated details) for public declarations.As per coding guidelines,
**/*.{h,.doxygen}: "Use Doxygen documentation with@brief(required), plus blank line, then details", andsrc/openms/include/OpenMS/**/*.h: "Add Doxygen comments for new public methods and classes".Also applies to: 120-121
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricQuantitationMethod.h` around lines 54 - 73, Replace the plain triple-slash prose comments above the public static methods with Doxygen `@brief-style` blocks: for each of methodTypeName(MethodType), methodDisplayName(MethodType), methodTypeFromName(std::string_view) and create(MethodType) add a leading /** `@brief` ... */ comment that contains a short summary line, then a blank line followed by the detailed description (including the examples like "tmt6plex" / "TMT 6-plex", the return values such as MethodType::UNKNOWN or nullptr, and the `@throws` notes referencing Exception::IllegalArgument and out-of-range/MethodType::SIZE_OF_METHODTYPE). Ensure the `@brief` block replaces the triple-slash lines and documents the same symbols (methodTypeName, methodDisplayName, methodTypeFromName, create) so the public API follows the project's Doxygen style.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/openms_gui/include/OpenMS/VISUAL/ANNOTATION/Annotations1DContainer.h`:
- Around line 87-88: The header declares removeItems(const
std::vector<Annotation1DItem*>&) but does not include the <vector> header; make
the header self-contained by adding `#include` <vector> to
OpenMS/VISUAL/ANNOTATION/Annotations1DContainer.h (so removeItems and any other
references to std::vector compile when this header is included), keeping the
include near other standard-library includes.
In `@src/openms_gui/source/VISUAL/Plot1DCanvas.cpp`:
- Around line 190-193: When disabling/resetting TMT state, currently only
tmt_annotation_items_.clear() and tmt_method_type_ =
IsobaricQuantitationMethod::MethodType::UNKNOWN are called which leaves
previously injected annotation QGraphicsItems and peak-color overrides attached
to the old layer; before clearing tmt_annotation_items_ iterate the stored items
and remove them from their parent/container/scene (or call the layer's
removeItem/delete method) and also clear any peak color override maps applied to
the layer (the same cleanup must be applied at the other reset site mentioned
around the 567-570 block); update the code paths that set tmt_annotation_items_
and tmt_method_type_ so they perform explicit removal from the old layer
container and clear peak-color overrides prior to clearing the vector and
resetting the method enum.
- Around line 1058-1076: The isobaric-method submenu (iso_menu) is being added
to the wrong menu: the block constructs iso_menu and then calls
context_menu->addMenu(iso_menu) while it should attach to settings_menu; change
the attachment to settings_menu->addMenu(iso_menu) and adjust the separator
placement so the settings_menu separators remain sensible (move or remove the
settings_menu->addSeparator() if it was intended to separate entries inside
settings_menu). Locate the block that creates iso_menu and the subsequent
context_menu->addMenu call (look for iso_menu, context_menu, settings_menu,
setTMTAnnotationMethod, and tmt_method_type_) and replace the addMenu target
accordingly and tidy separators.
- Around line 1702-1705: The early return when tmt_to_centroid is empty prevents
the first pass that draws all theoretical TMT channel reference lines; remove
the immediate return after aligner.getSpectrumAlignment and allow the routine to
continue so pass-1 (the logic that draws expected m/z positions regardless of
matches) still executes even when tmt_to_centroid.empty() is true; keep/adjust
the update_(OPENMS_PRETTY_FUNCTION) behavior so that only the parts that require
matches (pass-2) consult tmt_to_centroid, while pass-1 always draws theoretical
channels, and ensure any cleanup or UI update still occurs at the end of the
function.
In `@src/openms/source/ANALYSIS/QUANTITATION/IsobaricQuantitationMethod.cpp`:
- Around line 123-126: Validate the incoming enum value in the
IsobaricQuantitationMethod constructor before assigning to iso_method_; check
that the provided method_type is within the valid range of the enum (e.g.,
between the first and last defined enum values) and if not, either set
iso_method_ to a safe default or throw an exception; update the constructor so
any subsequent indexing by iso_method_ (used later around the lookup at line
referencing iso_method_) cannot produce out-of-bounds access.
In
`@src/openms/source/ANALYSIS/QUANTITATION/ItraqEightPlexQuantitationMethod.cpp`:
- Around line 18-21: The constructor
ItraqEightPlexQuantitationMethod::ItraqEightPlexQuantitationMethod currently
calls setName("ItraqFourPlexQuantitationMethod") which is stale; update the call
in the ItraqEightPlexQuantitationMethod constructor to
setName("ItraqEightPlexQuantitationMethod") so the runtime name matches the
MethodType::ITRAQ_8PLEX and the class identity (modify the string passed to
setName in that constructor).
---
Nitpick comments:
In
`@src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricQuantitationMethod.h`:
- Around line 54-73: Replace the plain triple-slash prose comments above the
public static methods with Doxygen `@brief-style` blocks: for each of
methodTypeName(MethodType), methodDisplayName(MethodType),
methodTypeFromName(std::string_view) and create(MethodType) add a leading /**
`@brief` ... */ comment that contains a short summary line, then a blank line
followed by the detailed description (including the examples like "tmt6plex" /
"TMT 6-plex", the return values such as MethodType::UNKNOWN or nullptr, and the
`@throws` notes referencing Exception::IllegalArgument and
out-of-range/MethodType::SIZE_OF_METHODTYPE). Ensure the `@brief` block replaces
the triple-slash lines and documents the same symbols (methodTypeName,
methodDisplayName, methodTypeFromName, create) so the public API follows the
project's Doxygen style.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 70474dd7-5d1b-4799-827c-4349df0fe30e
📒 Files selected for processing (30)
contribsrc/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricQuantitationMethod.hsrc/openms/include/OpenMS/ANALYSIS/QUANTITATION/ItraqEightPlexQuantitationMethod.hsrc/openms/include/OpenMS/ANALYSIS/QUANTITATION/ItraqFourPlexQuantitationMethod.hsrc/openms/include/OpenMS/ANALYSIS/QUANTITATION/TMTEighteenPlexQuantitationMethod.hsrc/openms/include/OpenMS/ANALYSIS/QUANTITATION/TMTElevenPlexQuantitationMethod.hsrc/openms/include/OpenMS/ANALYSIS/QUANTITATION/TMTSixPlexQuantitationMethod.hsrc/openms/include/OpenMS/ANALYSIS/QUANTITATION/TMTSixteenPlexQuantitationMethod.hsrc/openms/include/OpenMS/ANALYSIS/QUANTITATION/TMTTenPlexQuantitationMethod.hsrc/openms/include/OpenMS/ANALYSIS/QUANTITATION/TMTThirtyFivePlexQuantitationMethod.hsrc/openms/include/OpenMS/ANALYSIS/QUANTITATION/TMTThirtyTwoPlexQuantitationMethod.hsrc/openms/include/OpenMS/ANALYSIS/TOPDOWN/TopDownIsobaricQuantification.hsrc/openms/source/ANALYSIS/QUANTITATION/IsobaricQuantitationMethod.cppsrc/openms/source/ANALYSIS/QUANTITATION/ItraqEightPlexQuantitationMethod.cppsrc/openms/source/ANALYSIS/QUANTITATION/ItraqFourPlexQuantitationMethod.cppsrc/openms/source/ANALYSIS/QUANTITATION/TMTEighteenPlexQuantitationMethod.cppsrc/openms/source/ANALYSIS/QUANTITATION/TMTElevenPlexQuantitationMethod.cppsrc/openms/source/ANALYSIS/QUANTITATION/TMTSixPlexQuantitationMethod.cppsrc/openms/source/ANALYSIS/QUANTITATION/TMTSixteenPlexQuantitationMethod.cppsrc/openms/source/ANALYSIS/QUANTITATION/TMTTenPlexQuantitationMethod.cppsrc/openms/source/ANALYSIS/QUANTITATION/TMTThirtyFivePlexQuantitationMethod.cppsrc/openms/source/ANALYSIS/QUANTITATION/TMTThirtyTwoPlexQuantitationMethod.cppsrc/openms/source/ANALYSIS/TOPDOWN/TopDownIsobaricQuantification.cppsrc/openms_gui/include/OpenMS/VISUAL/ANNOTATION/Annotations1DContainer.hsrc/openms_gui/include/OpenMS/VISUAL/Plot1DCanvas.hsrc/openms_gui/source/VISUAL/ANNOTATION/Annotations1DContainer.cppsrc/openms_gui/source/VISUAL/Plot1DCanvas.cppsrc/tests/class_tests/openms/source/IsobaricQuantitationMethod_test.cppsrc/topp/IsobaricAnalyzer.cppsrc/topp/IsobaricWorkflow.cpp
💤 Files with no reviewable changes (7)
- src/openms/include/OpenMS/ANALYSIS/QUANTITATION/ItraqEightPlexQuantitationMethod.h
- src/openms/include/OpenMS/ANALYSIS/QUANTITATION/TMTElevenPlexQuantitationMethod.h
- src/openms/include/OpenMS/ANALYSIS/QUANTITATION/TMTTenPlexQuantitationMethod.h
- src/openms/include/OpenMS/ANALYSIS/QUANTITATION/TMTSixteenPlexQuantitationMethod.h
- src/openms/include/OpenMS/ANALYSIS/QUANTITATION/TMTEighteenPlexQuantitationMethod.h
- src/openms/include/OpenMS/ANALYSIS/QUANTITATION/TMTSixPlexQuantitationMethod.h
- src/openms/include/OpenMS/ANALYSIS/TOPDOWN/TopDownIsobaricQuantification.h
# Conflicts: # src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsobaricQuantitationMethod.h # src/openms/include/OpenMS/ANALYSIS/QUANTITATION/ItraqEightPlexQuantitationMethod.h # src/openms/include/OpenMS/ANALYSIS/QUANTITATION/ItraqFourPlexQuantitationMethod.h # src/openms/include/OpenMS/ANALYSIS/QUANTITATION/TMTEighteenPlexQuantitationMethod.h # src/openms/include/OpenMS/ANALYSIS/QUANTITATION/TMTElevenPlexQuantitationMethod.h # src/openms/include/OpenMS/ANALYSIS/QUANTITATION/TMTSixPlexQuantitationMethod.h # src/openms/include/OpenMS/ANALYSIS/QUANTITATION/TMTSixteenPlexQuantitationMethod.h # src/openms/include/OpenMS/ANALYSIS/QUANTITATION/TMTTenPlexQuantitationMethod.h # src/openms/include/OpenMS/ANALYSIS/QUANTITATION/TMTThirtyFivePlexQuantitationMethod.h # src/openms/include/OpenMS/ANALYSIS/QUANTITATION/TMTThirtyTwoPlexQuantitationMethod.h # src/openms/include/OpenMS/ANALYSIS/TOPDOWN/TopDownIsobaricQuantification.h # src/openms/source/ANALYSIS/QUANTITATION/ItraqEightPlexQuantitationMethod.cpp # src/openms/source/ANALYSIS/QUANTITATION/ItraqFourPlexQuantitationMethod.cpp # src/openms/source/ANALYSIS/QUANTITATION/TMTEighteenPlexQuantitationMethod.cpp # src/openms/source/ANALYSIS/QUANTITATION/TMTElevenPlexQuantitationMethod.cpp # src/openms/source/ANALYSIS/QUANTITATION/TMTSixPlexQuantitationMethod.cpp # src/openms/source/ANALYSIS/QUANTITATION/TMTSixteenPlexQuantitationMethod.cpp # src/openms/source/ANALYSIS/QUANTITATION/TMTTenPlexQuantitationMethod.cpp # src/openms/source/ANALYSIS/QUANTITATION/TMTThirtyFivePlexQuantitationMethod.cpp # src/openms/source/ANALYSIS/QUANTITATION/TMTThirtyTwoPlexQuantitationMethod.cpp # src/tests/class_tests/openms/source/IsobaricQuantitationMethod_test.cpp
|
Note Unit test generation is a public access feature. Expect some limitations and changes as we gather feedback and continue to improve it. Generating unit tests... This may take up to 20 minutes. |
|
13 INTERNAL: Received RST_STREAM with code 2 (Internal server error) |
The ppm shift is computed as the delta between the theoretical and the picked peak (in case of profile data, as in this example). The picked peak is not shown to reduce clutter. If the data is already picked, the reported ppm value would be exactly the one you could measure manually.
yes. |

Description
Annotates TMT/iTRAQ reporter ions in MS2 spectra for all supported TMT/iTRAQ multiplexiing types.
Adds delta ppm values and expected m/z positions.
Supports both profile and centroided data and uses smart layout for missing tmt label annotations
Access by right-clicking the spectrum canvas in 1D mode.
side effects:
Checklist
How can I get additional information on failed tests during CI
Click to expand
If your PR is failing you can check outIf you click in the column that lists the failed tests you will get detailed error messages.
Advanced commands (admins / reviewer only)
Click to expand
/reformat(experimental) applies the clang-format style changes as additional commit. Note: your branch must have a different name (e.g., yourrepo:feature/XYZ) than the receiving branch (e.g., OpenMS:develop). Otherwise, reformat fails to push.rebuild jenkinswill retrigger Jenkins-based CI buildsSummary by CodeRabbit
New Features
Refactor