Add acquisition type for product ion acquiring#540
Merged
YukiMatsuzawa merged 5 commits intomasterfrom Apr 23, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds acquisition type handling for product ion acquiring across several components.
- Updated tests to pass an additional acquisition type parameter.
- Modified constructors and helper methods in AccumulateSpectraUsecase and various analysis models to include the acquisition type.
- Enhanced data provider filtering by introducing the acquisition type parameter in PrecursorMzSelectedDataProvider and its extension method.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/MSDIAL5/MsdialCoreTests/Algorithm/Internal/PrecursorMzSelectedDataProviderTests.cs | Updated test instantiation with the new acquisition type parameter |
| src/MSDIAL5/MsdialGuiApp/Model/MsResult/AccumulateSpectraUsecase.cs | Constructor and method updated to accept and use the acquisition type |
| src/MSDIAL5/MsdialGuiApp/Model/Lcms/LcmsAnalysisModel.cs | Updated instantiation of AccumulateSpectraUsecase with acquisition type |
| src/MSDIAL5/MsdialGuiApp/Model/Lcimms/LcimmsAnalysisModel.cs | Updated instantiation of AccumulateSpectraUsecase with acquisition type |
| src/MSDIAL5/MsdialGuiApp/Model/Imms/ImmsAnalysisModel.cs | Updated instantiation of AccumulateSpectraUsecase with acquisition type |
| src/MSDIAL5/MsdialGuiApp/Model/Gcms/GcmsAnalysisModel.cs | Updated instantiation of AccumulateSpectraUsecase with acquisition type |
| src/MSDIAL5/MsdialCore/Algorithm/Internal/PrecursorMzSelectedDataProvider.cs | Added new parameter and logic making use of acquisition type in filtering criteria |
| src/MSDIAL5/MsdialCore/Algorithm/DataProviderExtensions.cs | Added overload for FilterByMz extension that accepts acquisition type parameter |
src/MSDIAL5/MsdialCore/Algorithm/Internal/PrecursorMzSelectedDataProvider.cs
Outdated
Show resolved
Hide resolved
…ataProvider.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces an additional acquisition type parameter to improve product ion acquisition and spectrum filtering.
- Updated constructors and method calls across multiple models (MsResult, Lcms, Lcimms, Imms, Gcms) to propagate the acquisition type.
- Modified PrecursorMzSelectedDataProvider and its extension method to accept and use the acquisition type.
- Adjusted the filtering comparisons in RawMeasurement to use inclusive boundaries for both SWATH and DDA acquisition types.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/MSDIAL5/MsdialCoreTests/Algorithm/Internal/PrecursorMzSelectedDataProviderTests.cs | Updated test instantiation to pass AcquisitionType.DDA. |
| src/MSDIAL5/MsdialGuiApp/Model/MsResult/AccumulateSpectraUsecase.cs | Added acquisitionType parameter and updated filtering logic. |
| src/MSDIAL5/MsdialGuiApp/Model/Lcms/LcmsAnalysisModel.cs | Passed analysisFileModel.AcquisitionType to the use case. |
| src/MSDIAL5/MsdialGuiApp/Model/Lcimms/LcimmsAnalysisModel.cs | Updated constructor call with the acquisition type. |
| src/MSDIAL5/MsdialGuiApp/Model/Imms/ImmsAnalysisModel.cs | Updated constructor call with the acquisition type. |
| src/MSDIAL5/MsdialGuiApp/Model/Gcms/GcmsAnalysisModel.cs | Updated constructor call with the acquisition type. |
| src/MSDIAL5/MsdialCore/Algorithm/Internal/PrecursorMzSelectedDataProvider.cs | Modified to include the acquisitionType parameter and utilize it in filtering. |
| src/MSDIAL5/MsdialCore/Algorithm/DataProviderExtensions.cs | Added an overload for FilterByMz with acquisitionType. |
| src/Common/CommonStandard/DataObj/RawMeasurement.cs | Adjusted boundary comparisons for both SWATH and DDA acquisition types. |
Comments suppressed due to low confidence (2)
src/Common/CommonStandard/DataObj/RawMeasurement.cs:253
- The change to inclusive comparisons for SWATH acquisition might unintentionally include spectra on the boundary; please confirm if this is the intended behavior and ensure that related tests validate this change.
return (double)SelectedIonMz - lowerOffset - tolerance <= mz && (double)mz <= (double)SelectedIonMz + upperOffset + (double)tolerance;
src/Common/CommonStandard/DataObj/RawMeasurement.cs:255
- The inclusive comparison for DDA acquisition could alter the filtering behavior; please verify that this modification aligns with expected spectrum selection and update tests accordingly.
return Math.Abs((double)SelectedIonMz - (double)mz) <= (double)tolerance;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.