Console: write method-file templates, and read relative paths from the method file in every mode - #819
Open
YukiMatsuzawa wants to merge 3 commits into
Open
Console: write method-file templates, and read relative paths from the method file in every mode#819YukiMatsuzawa wants to merge 3 commits into
YukiMatsuzawa wants to merge 3 commits into
Conversation
Add `template <mode>` to write a method file holding the built-in defaults, resolve relative method-file paths against the method file in every mode, and fix method-file keys the key report misreported. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…meter-template-gen-0da387 # Conflicts: # tests/MSDIAL5/MsdialCoreTestApp/Parser/ConfigParser.cs
- Accept only Positive or Negative for --ionmode, and any case for the mode. - Name both files when a relative path finds different files beside the method file and in the working directory, without reading a file that is the same one reached by two spellings. - Leave out keys no process reads, and put the alignment-only annotation switch in the GC-MS template, the only mode that reads it. - Describe the annotator settings tables as the reader treats them. - Write numbers in round-trip form, and fail the template round-trip test on a property the snapshot cannot read instead of skipping it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
YukiMatsuzawa
marked this pull request as ready for review
September 30, 2026 06:23
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.
Summary
Adds a
templatecommand to the MS-DIAL 5 Console that writes a method file for one processing mode, holding the built-in defaults. It also makes relative file paths in method files resolve the same way in every mode.template <gcms|lcms|dims|imms|lcimms>Options
-o/--output: write to a file. Without it the template goes to standard output.-f/--force: replace an existing file. Without it an existing file is not replaced.--ionmode Positive|Negative: choose the ion mode.Where the values come from. Every value is taken from a freshly constructed parameter object for the mode, not typed by hand. Two exceptions state what a run actually uses:
Acquisition typeis written asDDA. The parameter starts asNone, andCommonProcessturns that into DDA.Searched adduct ionsis[M+H]+or[M-H]-, following the ion mode. This is thePeakCharacterEstimatorfallback, and works now that Make "Searched adduct ions" in a console method file take effect #815 has landed.How keys are chosen
Target CEandSample average / blank averageare kept deliberately, because they are about to be made to work. A code comment marks each.Tests (
MethodFileTemplateTests) cover all five modes and both ion modes:Relative paths: one rule for every mode
Before: only GC-MS resolved method-file paths against the method file's folder. That behaviour came with #779 (
ResolveGcmsFilePaths). LC-MS, DIMS, IMMS and LC-IM-MS opened a relative path from the working directory, while the annotator settings tables in the same file were already read relative to the method file.Now: every reader resolves these keys against the method file's folder, and environment variables are expanded:
Transition behaviour
Also
accumulated rt rangeas the correct spelling of the LC-IM-MS keyaccumulated rt ragne. The old spelling still reads.tests/MSDIAL5/MsdialCoreTestApp/CONTEXT.md.Behaviour changes for existing method files
Annotation methodexport field. This was judged acceptable.Test plan
dotnet test tests/MSDIAL5/MsdialCoreTestAppTests: 115 passed.MsdialCoreTestAppbuilds for net472, net48 and net8.-m, gives 0 unrecognised and 0 unusable keys in.keys.json.--ionmode Bothis refused, andtemplate LCMS --ionmode negativeworks.🤖 Generated with Claude Code