Skip to content

Conversion of RAW file to mzML fails when "Failed to get reaction when parsing precursor" #147

@mroemer

Description

@mroemer

When converting a Thermo RAW file to indexed mzML with the Docker containers 1.4.0 and 1.4.1 on Ubuntu 18.04, the conversion fails (see output below).
With version 1.3.4, the conversion works.

With 1.4.0 and 1.4.1 I get a valid mzML file that ends with the scan that produced the warning (819 in this case).

It seems like the stream is closed when the warning is reported and then it cannot write to the closed stream which causes the "Stream has been closed" error.

I guess the offending commit was this one: 7b7854d

2022-11-15 07:29:35 INFO Started parsing /data/rawfile.raw
2022-11-15 07:29:38 INFO Processing 5936 MS scans
10% 2022-11-15 07:29:40 WARN Failed to get reaction when parsing precursor 819
2022-11-15 07:29:40 ERROR An unexpected error occured while parsing file:/data/rawfile.raw
2022-11-15 07:29:40 ERROR System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'Stream has been closed'.
  at System.IO.FileStream.Write (System.Byte[] array, System.Int32 offset, System.Int32 count) [0x0000d] in <7cd4deb8302a478d9d393f24754841da>:0
  at System.Security.Cryptography.CryptoStream.FlushFinalBlock () [0x00070] in <7cd4deb8302a478d9d393f24754841da>:0
  at System.Security.Cryptography.CryptoStream.Dispose (System.Boolean disposing) [0x0000b] in <7cd4deb8302a478d9d393f24754841da>:0
  at System.IO.Stream.Close () [0x00000] in <7cd4deb8302a478d9d393f24754841da>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.Write (ThermoFisher.CommonCore.Data.Interfaces.IRawDataPlus rawFile, System.Int32 firstScanNumber, System.Int32 lastScanNumber) [0x00faa] in <7a789c83cb9d4db2bd14ef83a0b964a9>:0
  at ThermoRawFileParser.RawFileParser.ProcessFile (ThermoRawFileParser.ParseInput parseInput) [0x000e9] in <7a789c83cb9d4db2bd14ef83a0b964a9>:0
  at ThermoRawFileParser.RawFileParser.TryProcessFile (ThermoRawFileParser.ParseInput parseInput) [0x00000] in <7a789c83cb9d4db2bd14ef83a0b964a9>:0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions