Skip to content

MzML compatibility with Proteome Discoverer #37

Description

@caetera

Hello,

mzML files produced by Monocle cannot be processed with Proteome Discoverer (tested with version 2.5). The apparent reason is unsupported cvTerms used for selectedIon.
Please, consider using MS:1000041 (charge state) and MS:1000744 (selected ion m/z) instead of MS:1000633 (possible charge state) and MS:1000827 (isolation window target). After the change (see the script below), the file can be processed. As a side note it might also improve the compatibility with other tools.

from lxml import etree

def heal_selected_ion(filepath):
    m = etree.parse(filepath)
    
    ns = m.getroot().nsmap
    ns['a'] = ns[None]
    
    for sel_ion in m.findall('//a:selectedIon', namespaces=ns):
        for el in sel_ion.getchildren():
            if el.get('accession') == 'MS:1000633':
                el.set('accession', 'MS:1000041')
                el.set('name', 'charge state')
            elif el.get('accession') == 'MS:1000827':
                el.set('accession', 'MS:1000744')
                el.set('name', 'selected ion m/z')
    
    m.write(filepath, xml_declaration = True, pretty_print = True, encoding = 'UTF-8')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions