added quant mass property to masscenter#714
Conversation
There was a problem hiding this comment.
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 setspot.QuantMasswhen using libraryreference.QuantMass, and consistently mirrorMassCentertoQuantMass. - Update
DataObjConverter.SetRepresentativeProperty()to overwriteMassCenterwithQuantMasswhen 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.
| if (spot.QuantMass > 0) { | ||
| spot.MassCenter = spot.QuantMass; | ||
| } |
There was a problem hiding this comment.
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).
No description provided.