Closed pyeguy closed 4 years ago
Hi pyeguy,
I guess a quick fix would be that the @property functions like ms_level don't fail, but return None or similar, would that work?
Cheers
.c
Hi pyeguy,
please have look at branch: feature/manage_missing_ms_level_information
Cheers
.c
Describe the bug
Can't read a mzML file that contains UV data, will throw an AttributeError when looking to get
ms_level
.This is because MS:1000511 doesn't exist for these scans and instead the following child is in the element tree:
This is related to #119 but a slightly different flavor.
To Reproduce
pymzml.run.Reader(<some_uv_containing_chromatagram.mzML>).next()
Expected behavior In the past
ms_level
was set to 0 which I think is sane enough.Desktop (please complete the following information):
Additional Context I can work on a PR when I get a chance but what I've done as a work around is modify the
ms_level
property here to include a try except block if MS:1000511 doesn't exist but MS:1000804 does.