Set AlignmentChromPeakFeature quant mass in gap filling#717
Set AlignmentChromPeakFeature quant mass in gap filling#717YukiMatsuzawa merged 3 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR ensures GC-MS gap filling keeps AlignmentChromPeakFeature.Mass synchronized with the spot’s quant mass during gap filling and quant-mass update flows, preventing persistent NeedsGapFill mismatches.
Changes:
- Set
target.Massfrom the computed chromatogram center (chromXCenter.Mz.Value) before runningGapFillCore()inGapFill(). - Set
target.Masssimilarly inUpdateQuantMass()before runningGapFillCore().
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Introduced GcmsGapFillerTests with a test verifying that UpdateQuantMass sets the target peak's Mass to the spot's QuantMass. Includes a stubbed GcmsGapFiller implementation and necessary setup.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR ensures GCMS gap filling updates AlignmentChromPeakFeature.Mass (used as the GCMS quant mass) to match the spot’s quant mass, and adds a regression test around the quant-mass update behavior.
Changes:
- Set
target.Massfrom the computed center m/z duringGapFill(...)andUpdateQuantMass(...). - Add an MSTest verifying
UpdateQuantMass(...)updates the target peak’sMass. - Remove an unnecessary
<Folder Include=...>entry from the GCMS API test project file.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/MSDIAL5/MsdialGcMsApiTests/MsdialGcMsApiTests.csproj | Removes an explicit folder entry now that the folder contains code. |
| tests/MSDIAL5/MsdialGcMsApiTests/Algorithm/Alignment/GcmsGapFillerTests.cs | Adds a regression test for UpdateQuantMass updating AlignmentChromPeakFeature.Mass. |
| src/MSDIAL5/MsdialGcMsApi/Algorithm/Alignment/GcmsGapFiller.cs | Updates GCMS gap filling to set the target peak’s quant mass (Mass) from the computed center. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| var peaklist = GetPeaks(rawSpectra, chromXCenter, peakWidth, fileID, _smoothingMethod, _smoothingLevel); | ||
| target.Mass = spot.QuantMass; | ||
| GapFillCore(peaklist, chromXCenter, AxTol, target); |
Set AlignmentChromPeakFeature quant mass in gap filling