Skip to content

Revert MS1AlignmentTolerance default change and limit 0.5 tolerance to GCMS#719

Merged
YukiMatsuzawa merged 2 commits intomasterfrom
bugfix/revert-default-ms1-tolerance
Mar 23, 2026
Merged

Revert MS1AlignmentTolerance default change and limit 0.5 tolerance to GCMS#719
YukiMatsuzawa merged 2 commits intomasterfrom
bugfix/revert-default-ms1-tolerance

Conversation

@YukiMatsuzawa
Copy link
Copy Markdown
Contributor

PR Classification

Bug fix / Parameter correction

PR Summary

This PR reverts an unintended change to the default MS1 alignment tolerance and scopes the relaxed tolerance specifically to GCMS workflows.

  • ParameterBase.cs
    • Reverted Ms1AlignmentTolerance default value from 0.5F back to 0.015F.
  • MsdialGcmsParameter.cs
    • Explicitly sets AlignmentBaseParam.Ms1AlignmentTolerance = 0.5F for GCMS workflows only.

Background

In a previous PR, the default value of ParameterBase.Ms1AlignmentTolerance was unintentionally changed from 0.015 to 0.5. This broader tolerance negatively impacts non-GCMS workflows where stricter alignment is expected.

Purpose of this PR

  • Restore the original default behavior (0.015) for general workflows
  • Apply the wider tolerance (0.5) only where appropriate (GCMS)

Impact

  • Non-GCMS workflows regain intended alignment sensitivity
  • GCMS behavior remains unchanged from the previous state

GcmsPeakJoiner now always initializes _msMatchParam with default tolerances for MS1 and MS2, and MsdialGcmsParameter sets AlignmentBaseParam.Ms1AlignmentTolerance to 0.5f by default. This ensures consistent and appropriate default values for GCMS alignment and spectral matching.
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 restores the original default MS1 alignment tolerance across the core parameter model and ensures the previously relaxed tolerance is applied only to GCMS-specific parameter instances.

Changes:

  • Revert AlignmentBaseParameter.Ms1AlignmentTolerance default from 0.5F back to 0.015F.
  • Set AlignmentBaseParam.Ms1AlignmentTolerance = 0.5f in MsdialGcmsParameter constructor to scope the relaxed tolerance to GCMS.
  • Minor cleanup of an object initializer in GcmsPeakJoiner (no behavioral change intended).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/MSDIAL5/MsdialGcMsApi/Parameter/MsdialGcmsParameter.cs Applies GCMS-specific override for MS1 alignment tolerance.
src/MSDIAL5/MsdialGcMsApi/Algorithm/Alignment/GcmsPeakJoiner.cs Formatting/style-only update to MsRefSearchParameterBase initializer.
src/MSDIAL5/MsdialCore/Parameter/ParameterBase.cs Restores core default MS1 alignment tolerance for non-GCMS workflows.

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

@YukiMatsuzawa YukiMatsuzawa merged commit 043045c into master Mar 23, 2026
13 checks passed
@YukiMatsuzawa YukiMatsuzawa deleted the bugfix/revert-default-ms1-tolerance branch March 23, 2026 06:25
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.

2 participants