Repository navigation
Fix MS-DIAL Console lcimms crash in alignment export (drift spots had no deconvolution result) - #838
Merged
Conversation
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>
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.
Problem
MSDIALCUI lcimmscrashed withArgumentOutOfRangeExceptioninAlignmentCSVExporter.Exportafter peak picking and alignment had finished, so no.mdalign/.mdmsp/.mzTabwas 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.LoadRepresentativeDeconvolutionsloaded oneMSDecResultper top-level (RT) alignment spot.LcimmsAlignmentRefinernumbersMasterAlignmentIDacross each RT spot followed by its drift spots.AlignmentCSVExporterandMztabFormatExporterindex the results bydriftSpot.MasterAlignmentID, so the list ran out at the first drift spot.AlignmentMspExporter.BatchExportonly indexes RT spots byMasterAlignmentID, 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.LoadMSDecResultsFromEachFilesreads them in the same order. Results are read throughRepresentativeDeconvolutionReader, asLcmsProcessalready does. The shared exporters are not changed.Verification
LcimmsProcessTests.EveryRtAndDriftSpotHasItsResultAtItsMasterAlignmentId. It passes, together with the existingRepresentativeDeconvolutionReaderTests(13/13).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 fromMSDIALCUI template lcimms, withTarget omics: Lipidomicsand 8 threads.MSDIALCUI lcimms -i … -o … -m method.txt -pexits 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.mdpeak/.mdmsp🤖 Generated with Claude Code