pymzml / pymzML

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

MZXML files #272

Closed liquidcarbon closed 2 years ago

liquidcarbon commented 3 years ago

Hi, I'm not sure if pymzml is intended to read mzxml's. You get this error when trying to read MZXML (Converting mzxml to mzml through MzMine doesn't help)

.../site-packages/pymzml/run.py in _init_iter(self)
    363         while True:
    364             event, element = next(mzml_iter, ("END", "END"))
--> 365             if element.tag.endswith("}mzML"):
    366                 if "version" in element.attrib and len(element.attrib["version"]) > 0:
    367                     self.info["mzml_version"] = element.attrib["version"]

The file in question is MM14_20um.mzxml file from this dataset: https://www.ebi.ac.uk/metabolights/MTBLS1430/files

fu commented 3 years ago

Hi there,

sorry, pymzML is not meant to read mzxml :(

In the beginning there were two dominante formats, mzData and mzXML which got merged into one format, that is mzML. That's why we have limited pymzML to mzML only.

Hope that helps

.c