ISA-tools / mzml2isa

Parser to get meta information from mzML file and parse relevant information to a ISA-Tab structure
GNU General Public License v3.0
12 stars 6 forks source link

KeyError: 'Spectrum representation' when using imzml files #36

Closed khaug closed 5 years ago

khaug commented 5 years ago
./python3.4/site-packages/mzml2isa/utils.py:274: UserWarning: Could not use latest online IMS ontology, using local (version ['0.9.1'])
  "using local (version {})".format(obo.meta['version']))
./python3.4/site-packages/mzml2isa/mzml.py:427: UserWarning: Instrument ? does not have a software tag.
  else '?'))
./python3.4/site-packages/mzml2isa/mzml.py:481: UserWarning: Could not find any metadata about Raw Spectral Data File.
  warnings.warn("Could not find any metadata about Raw Spectral Data File.")
Traceback (most recent call last):
  File "mzml2isa", line 11, in <module>
    sys.exit(main())
  File "./python3.4/site-packages/mzml2isa/parsing.py", line 214, in main
    jobs=args.jobs, template_directory=args.template_dir
  File "./python3.4/site-packages/mzml2isa/parsing.py", line 156, in convert
    metalist = [_parse_file([mzml_file, ontology, parser, pbar]) for mzml_file in sorted(mzml_files)]
  File "./python3.4/site-packages/mzml2isa/parsing.py", line 156, in <listcomp>
    metalist = [_parse_file([mzml_file, ontology, parser, pbar]) for mzml_file in sorted(mzml_files)]
  File "./python3.4/site-packages/mzml2isa/utils.py", line 245, in new_func
    return func(*args[0])
  File "./python3.4/site-packages/mzml2isa/parsing.py", line 77, in _parse_file
    meta = parser(filepath, ontology).meta
  File "./python3.4/site-packages/mzml2isa/mzml.py", line 947, in __init__
    self.link_files()
  File "./python3.4/site-packages/mzml2isa/mzml.py", line 965, in link_files
    self.meta['Spectrum representation'] = {'entry_list': [ self.meta['Spectrum representation'] ] }
KeyError: 'Spectrum representation'
althonos commented 5 years ago

I'll try on the new (not yet merged) version, hopefully this should not happen.

khaug commented 5 years ago

Great to see this progressing. I will test as soon as this is ready

althonos commented 5 years ago

v1.0.0 successfully parses MTBLS273 files.