Skip to content

Fix MS-DIAL Console lcimms crash in alignment export (drift spots had no deconvolution result) - #838

Merged
YukiMatsuzawa merged 1 commit into
masterfrom
claude/fix-lcimms-console-export-08feca
Oct 18, 2026
Merged

YukiMatsuzawa merged 1 commit into
masterfrom
claude/fix-lcimms-console-export-08feca

Conversation

@YukiMatsuzawa

Copy link
Copy Markdown
Contributor

Problem

MSDIALCUI lcimms crashed with ArgumentOutOfRangeException in AlignmentCSVExporter.Export after peak picking and alignment had finished, so no .mdalign / .mdmsp / .mzTab was written. This was already broken in console release 5.5.260820. It is not a regression from the release/msdial-5.5 merge.

Cause

LcimmsProcess.LoadRepresentativeDeconvolutions loaded one MSDecResult per top-level (RT) alignment spot. LcimmsAlignmentRefiner numbers MasterAlignmentID across each RT spot followed by its drift spots. AlignmentCSVExporter and MztabFormatExporter index the results by driftSpot.MasterAlignmentID, so the list ran out at the first drift spot. AlignmentMspExporter.BatchExport only indexes RT spots by MasterAlignmentID, so it works once the list is complete.

Fix (console only)

The loader now returns each RT spot followed by its drift spots, in the order the refiner numbers them. The GUI's AlignmentFileBeanModel.LoadMSDecResultsFromEachFiles reads them in the same order. Results are read through RepresentativeDeconvolutionReader, as LcmsProcess already does. The shared exporters are not changed.

Verification

  • New unit test LcimmsProcessTests.EveryRtAndDriftSpotHasItsResultAtItsMasterAlignmentId. It passes, together with the existing RepresentativeDeconvolutionReaderTests (13/13).
  • Real data, using the Windows net48 Release publish: 4D-Lipidmics_pos_5times_2uL-inj (kidney1_5tims_pos_P2-E-2_1_15262.d and plasma1_5tims_pos_P2-F-2_1_15252.d). The method came from MSDIALCUI template lcimms, with Target omics: Lipidomics and 8 threads. MSDIALCUI lcimms -i … -o … -m method.txt -p exits 0 and writes:
    • .mdalign: 14,673 rows (6,174 RT spots and 8,499 drift spots)
    • .mdmsp: 6,174 spectra
    • .mzTab: 14,673 SML rows
    • the project file and the per-file .mdpeak/.mdmsp

🤖 Generated with Claude Code

The lcimms command crashed with ArgumentOutOfRangeException in
AlignmentCSVExporter.Export once alignment finished. The exporter (and
MztabFormatExporter) index the deconvolution results by MasterAlignmentID
for the drift spots as well as the RT spots, but the console loaded one
result per RT spot only, so the first drift spot overflowed the list.

Read each RT spot followed by its drift spots, the order
LcimmsAlignmentRefiner numbers them in and the GUI's
AlignmentFileBeanModel.LoadMSDecResultsFromEachFiles reads them in, through
RepresentativeDeconvolutionReader as LcmsProcess does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@YukiMatsuzawa
YukiMatsuzawa merged commit 349d7ef into master Oct 18, 2026
1 check passed
@YukiMatsuzawa
YukiMatsuzawa deleted the claude/fix-lcimms-console-export-08feca branch October 18, 2026 08:36
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.

1 participant