Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to retrieve 'inverse reduced ion mobility' info? #343

Open
patrick-willems opened this issue Oct 15, 2023 · 3 comments
Open

How to retrieve 'inverse reduced ion mobility' info? #343

patrick-willems opened this issue Oct 15, 2023 · 3 comments

Comments

@patrick-willems
Copy link

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:

      <scanList count="1">
        <scan>
          <cvParam cvRef="MS" accession="MS:1000016" name="scan start time" value="0.01271000038832426" unitCvRef="UO" unitAccession="UO:0000031" unitName="minute"/>
          <cvParam cvRef="MS" accession="MS:1002815" name="inverse reduced ion mobility" value="1.0686218738555908"/>

How can I extract this when looping over the spectra (i.e. 'for index, spectrum in enumerate(data):' ) ?

Many thanks in advance,
Patrick

@MKoesters
Copy link
Contributor

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

@StSchulze
Copy link
Contributor

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.

@patrick-willems
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants