mobiusklein / ms_deisotope

A library for deisotoping and charge state deconvolution of complex mass spectra
https://mobiusklein.github.io/ms_deisotope
Apache License 2.0
33 stars 14 forks source link

componentList is an optional element in mzML #2

Closed heckendorfc closed 6 years ago

heckendorfc commented 6 years ago

As titled. I ran into a case where it didn't exist in the mzML file.

mobiusklein commented 6 years ago

_convert_component_groups does more than it should, building the InstrumentInformation instance. We either need to break the method up, or move the check into _convert_component_groups.

If that is done, the InstrumentInformation object is never built, which means that it's never registered or retrievable. The MzMLDataInterface._instrument_configuration method will swallow the error, but the MzMLLoader won't know it had any kind of InstrumentConfiguration.

heckendorfc commented 6 years ago

I see that now; I'll move the check inside. I'm not sure if there's any reason to break the method up further but maybe renaming it would make sense.

mobiusklein commented 6 years ago

Sounds good. How about something like _pack_instrument_information?

mobiusklein commented 6 years ago

Fixed the naming issue in commit ce9f915f200093058baddf6ffa74656e6e1006c6