Skip to content

Add acquisition type for product ion acquiring#540

Merged
YukiMatsuzawa merged 5 commits intomasterfrom
bugFix_productIonChrom
Apr 23, 2025
Merged

Add acquisition type for product ion acquiring#540
YukiMatsuzawa merged 5 commits intomasterfrom
bugFix_productIonChrom

Conversation

@Bujee415
Copy link
Copy Markdown
Collaborator

No description provided.

@Bujee415 Bujee415 requested a review from YukiMatsuzawa April 22, 2025 10:45
@YukiMatsuzawa YukiMatsuzawa requested a review from Copilot April 22, 2025 10:48
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 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

Bujee415 and others added 4 commits April 22, 2025 19:49
@YukiMatsuzawa YukiMatsuzawa requested a review from Copilot April 23, 2025 02:52
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 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;

@YukiMatsuzawa YukiMatsuzawa merged commit 9d36b0f into master Apr 23, 2025
9 checks passed
@YukiMatsuzawa YukiMatsuzawa deleted the bugFix_productIonChrom branch April 23, 2025 04:19
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