Open LachlanStuart opened 4 years ago
@sergii-mamedov To help you get started on this: we don't currently check this metadata at all in METASPACE so you'll need to look at the interface for pyimzml. It splits the metadata into two parts: ImzMLParser.metadata
for the global metadata, and ImzMLParser.spectrum_metadata_fields
for per-spectrum metadata. For the per-spectrum metadata you need to specify which accession numbers to read when constructing the ImzMLParser
(example from the tests).
There are lists mapping accession numbers to field names in these files: ims.py and ms.py
The analysis showed that there are just over a hundred datasets that fit this task. We decided that it is necessary:
Polarity information is usually present in imzML files, either in the
<referenceableParamGroupList>
, e.g.or per-spectrum, e.g.
If the polarity is present and conflicts with the user's selected polarity, warn the user.
Because we don't already have any real-time imzML validation, the easiest way to warn them is probably to send an email during or after annotation.