pymzml / pymzML

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

run.Reader fails to read mzML written by OpenMS #61

Closed infusini closed 5 years ago

infusini commented 7 years ago

Hi,

run.Reader gives an error while attempting to read a mzML file written by OpenMS tools. I found that the issue is due to the fact that the file generated by OpenMS tools do not explicitly write the version attribute in the Element cv (http://www.peptideatlas.org/tmp/mzML1.1.0.html#cv (for id="MS" and id="UO").

Here is an example:

<?xml version="1.0" encoding="ISO-8859-1"?>
<indexedmzML xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0_idx.xsd">
<mzML xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0.xsd" accession="" version="1.1.0">
    <cvList count="5">
        <cv id="MS" fullName="Proteomics Standards Initiative Mass Spectrometry Ontology" URI="http://psidev.cvs.sourceforge.net/*checkout*/psidev/psi/psi-ms/mzML/controlledVocabulary/psi-ms.obo"/>
        <cv id="UO" fullName="Unit Ontology" URI="http://obo.cvs.sourceforge.net/obo/obo/ontology/phenotype/unit.obo"/>
        <cv id="BTO" fullName="BrendaTissue545" version="unknown" URI="http://www.brenda-enzymes.info/ontology/tissue/tree/update/update_files/BrendaTissueOBO"/>
        <cv id="GO" fullName="Gene Ontology - Slim Versions" version="unknown" URI="http://www.geneontology.org/GO_slims/goslim_goa.obo"/>
        <cv id="PATO" fullName="Quality ontology" version="unknown" URI="http://obo.cvs.sourceforge.net/*checkout*/obo/obo/ontology/phenotype/quality.obo"/>
    </cvList>

by manually adding the version info to the above, the run.Reader works perfectly.

Thank you,

Peppe

JB-MS commented 7 years ago

Hi Peppe,

thanks for the valuable input. This should clearly be handled in the new release of pymzml.

Cheers, Johannes

fu commented 7 years ago

Hi Peppe,

where did you add the version information in order to make it work ? Into the tag ? Not sure if it would make more sense to contact the OpenMS people. I guess it would depends if they forgot it or if the version is ought to be at another position now ...

infusini commented 7 years ago

Hi,

I added the version info like this here:

<cv id="MS" version="4.0.1" fullName="Proteomics Standards Initiative Mass Spectrometry Ontology" URI="http://psidev.cvs.sourceforge.net/*checkout*/psidev/psi/psi-ms/mzML/controlledVocabulary/psi-ms.obo"/>

And also the id="UO" version="12:10:2011" I'm have not tested if both are needed, I just added the missing bits from a working mzML generated by msconvert.

I contacted the OpenMS people first in fact, @hroest told me that they have always been writing the cv element without the version info as it seems that it's optional from http://www.peptideatlas.org/tmp/mzML1.1.0.html#cv , but clearly it's needed for pymzML to work properly for now.

So far I've been using the github version of pymzml, butI'll be keeping an eye out for the new release.

Cheers,

Peppe

hroest commented 7 years ago

@fu the attribute is clearly optional, so if pymzml requires it then things break.

fu commented 7 years ago

Oh yes, if it is optional, then we should definitely adapt pymzml so everything stays compatible! Thanks for the clarification Hannes! :)

On 11. Apr 2017, 04:21 +0200, Hannes Roest notifications@github.com, wrote:

@fu (https://github.com/fu) the attribute is clearly optional, so if pymzml requires it then things break.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub (https://github.com/pymzml/pymzML/issues/61#issuecomment-293130962), or mute the thread (https://github.com/notifications/unsubscribe-auth/AAOVWrm66fldmIBRJyIlQKuZzy0Zt4pMks5ruuOlgaJpZM4M4mOT).

JB-MS commented 6 years ago

@infusini Same here, do you still need help on this?

MKoesters commented 5 years ago

This issue was fixed with a previous commit (just tested), but not closed, so I'm doing it now