Skip to content

added quant mass property to masscenter#714

Merged
YukiMatsuzawa merged 2 commits intomasterfrom
fix_gcmstable_panel_inconsistency
Mar 11, 2026
Merged

added quant mass property to masscenter#714
YukiMatsuzawa merged 2 commits intomasterfrom
fix_gcmstable_panel_inconsistency

Conversation

@htsugawa
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to keep GC-MS alignment spot “m/z” (MassCenter) aligned with the selected quant mass (QuantMass), so downstream consumers treat the quant mass as the spot’s representative mass.

Changes:

  • Update GcmsPeakJoiner.ResetQuantMasses() to set spot.QuantMass when using library reference.QuantMass, and consistently mirror MassCenter to QuantMass.
  • Update DataObjConverter.SetRepresentativeProperty() to overwrite MassCenter with QuantMass when available.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/MSDIAL5/MsdialGcMsApi/Algorithm/Alignment/GcmsPeakJoiner.cs Ensures MassCenter tracks the computed/selected GC-MS QuantMass during joining/reset.
src/MSDIAL5/MsdialCore/Utility/DataObjConverter.cs Forces MassCenter = QuantMass during representative-property calculation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +178 to +180
if (spot.QuantMass > 0) {
spot.MassCenter = spot.QuantMass;
}
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

SetRepresentativeProperty builds spot.TimesCenter (including Mz) using the current spot.MassCenter, but then conditionally overwrites spot.MassCenter with spot.QuantMass. This can leave TimesCenter.Mz inconsistent with MassCenter (and with the value later used as the spot's m/z). Consider moving the QuantMass→MassCenter assignment before constructing TimesCenter, or also updating spot.TimesCenter.Mz when MassCenter is overwritten (and ensure any dependent mass fields stay consistent).

Copilot uses AI. Check for mistakes.
@YukiMatsuzawa YukiMatsuzawa merged commit d06ed9a into master Mar 11, 2026
9 checks passed
@YukiMatsuzawa YukiMatsuzawa deleted the fix_gcmstable_panel_inconsistency branch March 11, 2026 07:02
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