OpenMS / OpenMS

The codebase of the OpenMS project
https://www.openms.de
Other
478 stars 318 forks source link

"nan" mz values after reading mzXML file on Windows #1603

Closed uweschmitt closed 9 years ago

uweschmitt commented 9 years ago

I have a mzXML file which I can read with pyopenms 2.0 on Mac OS X but not on Windows: https://polybox.ethz.ch/public.php?service=files&t=f05ca09ff41a5aad86167bffa38b4530 (The file is shortened and contains only one spectrum).

If I run the following script the output is 101.05.... but on Windows it is nan. Maybe this happens because the mz-values in the file are stored as 64 bit float.

from pyopenms import MSExperiment, FileHandler

ee = MSExperiment()
fh = FileHandler()
fh.loadExperiment("problematic.mzXML", ee)

spec = ee[0]
peak = spec[0]
print(peak.getMZ())
hroest commented 9 years ago

what happens when you convert the file to another format, e.g. dta2d using the FileConverter utility?

cbielow commented 9 years ago

well.. one gets things like

#SEC    MZ  INT
0.324   nan 342
0.324   nan 683
0.324   107.079302345185    342
0.324   nan 342
0.324   118.083886151854    342
cbielow commented 9 years ago

found the bug: Base64:endianize64() is broken. Fix incoming...

cbielow commented 9 years ago

fixed in #1604

The weird thing is, that any current MacOSX should be LittleEndian as well since they run on Intel X86. So I don't quite understand why MacOSX was not affected.

cbielow commented 9 years ago

The fix is merged. @uweschmitt Can you confirm this fixes your problem on Windows?