Skip to content

Fix null RT correction selection path - #771

Merged
YukiMatsuzawa merged 1 commit into
masterfrom
bugfix/retentiontime-correction-parameter-is-null
Aug 17, 2026
Merged

Fix null RT correction selection path#771
YukiMatsuzawa merged 1 commit into
masterfrom
bugfix/retentiontime-correction-parameter-is-null

Conversation

@YukiMatsuzawa

Copy link
Copy Markdown
Contributor

RT correction can fail when the optional peak selection file path is null while ParameterBase.ParametersAsText() serializes parameters. This change makes parameter output null-safe and keeps the path owned by ReferenceBaseParameter instead of exposing another forwarding property on ParameterBase.

The console configuration parser and RT correction process now read and write the path through ReferenceFileParam, preserving the existing behavior for configured selection files.

Validation: dotnet build tests\MSDIAL5\MsdialCoreTestApp\MsdialCoreTestApp.csproj --no-restore --verbosity minimal

Read the RT correction peak selection path from ReferenceBaseParameter and handle missing paths safely when exporting parameters.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 addresses a null-handling bug during RT correction parameter serialization by ensuring the optional “RT correction peak selection file path” can be null without throwing, and by routing read/write access through ReferenceFileParam rather than a ParameterBase forwarding property.

Changes:

  • Updated RT correction pipeline and console config parsing to use parameter.ReferenceFileParam.RtCorrectionPeakSelectionFilePath.
  • Made ParameterBase.ParametersAsText() null-safe when emitting the RT correction peak selection file path.
  • Removed the ParameterBase.RtCorrectionPeakSelectionFilePath forwarding property in favor of ReferenceBaseParameter ownership.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/MSDIAL5/MsdialCoreTestApp/Process/RetentionTimeCorrectionProcess.cs Reads the selection path from ReferenceFileParam and uses a null-safe emptiness check before applying a selection file.
tests/MSDIAL5/MsdialCoreTestApp/Process/EicProcess.cs Writes the selection path to ReferenceFileParam during RT correction setup.
tests/MSDIAL5/MsdialCoreTestApp/Parser/ConfigParser.cs Parses the config key into ReferenceFileParam.RtCorrectionPeakSelectionFilePath to preserve configured behavior.
src/MSDIAL5/MsdialCore/Parameter/ParameterBase.cs Removes the forwarding property and makes parameter text output null-safe for the selection path.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/MSDIAL5/MsdialCore/Parameter/ParameterBase.cs
@YukiMatsuzawa
YukiMatsuzawa merged commit 0a44bfc into master Aug 17, 2026
10 checks passed
@YukiMatsuzawa
YukiMatsuzawa deleted the bugfix/retentiontime-correction-parameter-is-null branch August 17, 2026 07:13
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