"error reading spectrum" of .mzML files from OpenChrom, original data files are Agilent MassHunter .D files which skylines cannot import

support
"error reading spectrum" of .mzML files from OpenChrom, original data files are Agilent MassHunter .D files which skylines cannot import Allison Haase  2021-12-07 10:06
 

Dear Skylines team,

My lab has been using Skylines MS for a variety of purposes, specifically for small molecule analysis using GCMS and GC MS/MS. We have had success with importing and analyzing MS data from Thermo .raw files, but have run into an issue with data from an Agilent instrument from an outside lab. The data is provided in Agilent MassHunter .D files. Skyline does not recognize this file type, so we have attempted to convert the data files using OpenChrom to .mzML and .mzXML formats. The conversion process works, and Skyline can then see the data files for importing. However, we consistently get an importing error of "error reading spectrum". I have attached the full text of the error below, as well as the data files involved, both in .D and .mzML formats.

I would be appreciative of any help that you could give, even if it is just a recommendation for a file converter. My lab lacks Agilent MassHunter software, so I cannot convert it using the native system.

At 10:47 AM:
Failed importing results file 'C:\Users\Allison\Desktop\ExportOC\TMS2047.mzML'.
error reading spectrum
pwiz.Skyline.Model.Results.ChromCacheBuildException: Failed importing results file 'C:\Users\Allison\Desktop\ExportOC\TMS2047.mzML'.
error reading spectrum ---> System.Reflection.TargetInvocationException: error reading spectrum ---> System.Exception: error reading spectrum ---> System.Exception: [IO::HandlerBinaryDataArray] At position 843: encoded lengths differ.
at pwiz.CLI.msdata.SpectrumList.spectrum(Int32 index, DetailLevel detailLevel)
at pwiz.ProteowizardWrapper.MsDataFileImpl.GetCachedSpectrum(Int32 scanIndex, DetailLevel detailLevel) in C:\proj\skyline_21_1_x64\pwiz_tools\Shared\ProteowizardWrapper\MsDataFileImpl.cs:line 1155
at pwiz.ProteowizardWrapper.MsDataFileImpl.GetSpectrum(Int32 spectrumIndex) in C:\proj\skyline_21_1_x64\pwiz_tools\Shared\ProteowizardWrapper\MsDataFileImpl.cs:line 893
at pwiz.Skyline.Model.Results.SpectraChromDataProvider.Spectra.ReadSpectrum(Int32& i) in C:\proj\skyline_21_1_x64\pwiz_tools\Skyline\Model\Results\SpectraChromDataProvider.cs:line 1075
--- End of inner exception stack trace ---
at pwiz.Skyline.Model.Results.SpectraChromDataProvider.Spectra.ReadSpectrum(Int32& i) in C:\proj\skyline_21_1_x64\pwiz_tools\Skyline\Model\Results\SpectraChromDataProvider.cs:line 1126
at pwiz.Skyline.Model.Results.SpectraChromDataProvider.Spectra.Read() in C:\proj\skyline_21_1_x64\pwiz_tools\Skyline\Model\Results\SpectraChromDataProvider.cs:line 953
at pwiz.Skyline.Model.Results.SpectraChromDataProvider.Spectra.<RunAsync>b__33_0() in C:\proj\skyline_21_1_x64\pwiz_tools\Skyline\Model\Results\SpectraChromDataProvider.cs:line 810
--- End of inner exception stack trace ---
at pwiz.Skyline.Util.Helpers.WrapAndThrowException(Exception x) in C:\proj\skyline_21_1_x64\pwiz_tools\Skyline\Util\Util.cs:line 1940
at pwiz.Skyline.Model.Results.SpectraChromDataProvider.Spectra.NextSpectrum() in C:\proj\skyline_21_1_x64\pwiz_tools\Skyline\Model\Results\SpectraChromDataProvider.cs:line 916
at pwiz.Skyline.Model.Results.SpectraChromDataProvider.ExtractChromatogramsLocked() in C:\proj\skyline_21_1_x64\pwiz_tools\Skyline\Model\Results\SpectraChromDataProvider.cs:line 259
at pwiz.Skyline.Model.Results.SpectraChromDataProvider.ExtractChromatograms() in C:\proj\skyline_21_1_x64\pwiz_tools\Skyline\Model\Results\SpectraChromDataProvider.cs:line 239
at pwiz.Skyline.Model.Results.SpectraChromDataProvider.SetRequestOrder(IList`1 chromatogramRequestOrder) in C:\proj\skyline_21_1_x64\pwiz_tools\Skyline\Model\Results\SpectraChromDataProvider.cs:line 592
at pwiz.Skyline.Model.Results.ChromCacheBuilder.Read(ChromDataProvider provider) in C:\proj\skyline_21_1_x64\pwiz_tools\Skyline\Model\Results\ChromCacheBuilder.cs:line 384
at pwiz.Skyline.Model.Results.ChromCacheBuilder.BuildCache() in C:\proj\skyline_21_1_x64\pwiz_tools\Skyline\Model\Results\ChromCacheBuilder.cs:line 252
--- End of inner exception stack trace ---

 
 
Brian Pratt responded:  2021-12-07 11:24

Hi Allison,

I think you'll need to take this to the developers of OpenChrom - that's just a malformed file. Specifically, as the error message says, the declared and actual lengths of the encoded binary data disagree. You'll find that the reference mzML converter tool msconvert shows the same error. The file just doesn't follow the mzML specification.

Sorry I don't have better news.

Thanks for using the Skyline support board!

Brian Pratt

 
Brian Pratt responded:  2021-12-07 11:56

I went ahead and opened an issue on the OpenChrom github project. I provided a tiny snippet of your mzML file but didn't post any other data.

  • Brian
 
Allison Haase responded:  2021-12-07 12:03

I have had some success with using openChrom to convert/ save chromatograms as .mzML or .mgf files, then putting those into MSconvert to become .mzXML . It can be pretty hit or miss, but those files will import into Skyline.

 
Brian Pratt responded:  2021-12-07 12:15

The OpenChrom guys are asking to see your original .D file - may I share that with them?

 
Allison Haase responded:  2021-12-07 12:18

Feel free! I think it was a standard.

 
Brian Pratt responded:  2022-02-02 11:36

Hi Allison,

I think this is all settled now, the OpenChrom team was great about working together to address the problem.

Best regards,

Brian