pymzml / pymzML

pymzML - an interface between Python and mzML Mass spectrometry Files
https://pymzml.readthedocs.io/en/latest/
MIT License
162 stars 92 forks source link

problem with pymzml.run.Reader #46

Closed naimrashid closed 7 years ago

naimrashid commented 8 years ago

Hello,

I am currently trying to read mzML files created by the openMS function PeakPickerHiRes and am encountering the following error. Would you be able to help me resolve this? My script is entirely dependent on this function. Thank you! I am pasting some hopefully helpful output from my file below.
speciter = pymzml.run.Reader("/netscr/nur2/MPE150716_PDX13.centroided.hires.mzML") File "/nas02/home/n/u/nur2/.local/lib/python2.7/site-packages/pymzml/run.py", line 262, in __init__ nativeID = int(bytes.decode(match_sim.group('nativeID'))) ValueError: invalid literal for int() with base 10: 'TIC' The mzML file is version 1.1.0. When I grep the file for nativeID, I find the following entry <cvParam cvRef="MS" accession="MS:1000768" name="Thermo nativeID format" />

When I grep the file for NativeID, I find the following entries (one example of many) <cvParam cvRef="MS" accession="MS:1000796" name="spectrum title" value="mpe150716_LFQ_PDX_13.1.1. File:&quot;mpe150716_LFQ_PDX_13.raw&quot;, NativeID:&quot;controllerType=0 controllerNumber=1 scan=1&quot;"/>

When I grep the file for offset , I find the following entries (one example of many) <offset idRef="controllerType=0 controllerNumber=1 scan=1">8338</offset>

MKoesters commented 8 years ago

Hello,

which pymzML version are you using? When I had a look into the current github source code, I was not able to locate the line throwing the error. Did you install pymzml using pip?

Manuel

AdamSorrel commented 8 years ago

Hi naimrashid,

I had the same issue and upgrading to the latest version of pymzml resolved it. I have used the following command:

pip install --upgrade pymzml

Good luck!

Adam