You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I will add a minimal working example. small.raw and small.data are the same binary file, however, the latter cannot be opened by RawFileReaderFactory
usingSystem.Security.Cryptography;usingThermoFisher.CommonCore.Data;usingThermoFisher.CommonCore.Data.Business;namespaceTestApp{classTestApp{staticvoidMain(){TryOpen("small.raw");TryOpen("small.data");}staticvoidTryOpen(stringpath){Console.WriteLine($"Working on {path}");using(varmd5=MD5.Create()){usingvarstream=File.OpenRead(path);varhash=BitConverter.ToString(md5.ComputeHash(stream)).Replace("-","");Console.WriteLine($"MD5: {hash}");}usingvarrawFile=RawFileReaderFactory.ReadFile(path);if(rawFile.IsOpen){rawFile.SelectMsData();Console.WriteLine($"Opened, {rawFile.RunHeaderEx.SpectraCount} spectra in the file");}else{Console.WriteLine("Cannot be openned");}}}}
Output:
Working on small.raw
MD5: 1B12C93735A9EAECD072031B2184D2ED
Opened, 48 spectra in the file
Working on small.data
MD5: 1B12C93735A9EAECD072031B2184D2ED
Cannot be openned
It seems that raw files can not be processed if they have a different file extension, e.g. compomics/ThermoRawFileParser#180.
Since there are use cases that could benefit from this we are wondering if it is possible to read raw files even if they have a different extension.
The text was updated successfully, but these errors were encountered: