Open patrick-willems opened 8 months ago
Hi Patrick,
Can you try something like this:
for index, spectrum in enumerate(data):
im = spectrum['inverse reduced ion mobility']
You could also have a look if the get_tims_tof_ion_mobility
or get_array
method of the spectrum class would be helpfull, for this you would need the IM array in the spectrum, I think you can achieve this while converting to mzML.
Best, Manu
Just as a quick addition:
There were some issues with using the GO terms, so if 'inverse reduced ion motility' is not recognized, you might want to try using the accession number, i.e. spectrum['MS:1002815']
to access that information.
Thanks!
Best,
I just started to use pymzml to retrieve spectral info, I find it a great tool!
I only do not manage to easily extract ion mobility from the data, for me this is for instance present as follows in the mzML file:
How can I extract this when looping over the spectra (i.e. 'for index, spectrum in enumerate(data):' ) ?
Many thanks in advance, Patrick