MannLabs / alphabase

Infrastructure of AlphaX ecosystem
https://alphabase.readthedocs.io
Apache License 2.0
28 stars 8 forks source link

Ion mobility column of spectronaut report not being read in by psm_reader #215

Open mlorenz49 opened 1 month ago

mlorenz49 commented 1 month ago

When trying to read in the output of spectronaut_report file, the column called "FG.ApexIonMobility" is not being imported with the rest of the data (the column seems to be dropped). Trying out the following seems to read in the information into self._psm_df.

from alphabase.psm_reader.dia_psm_reader import psm_reader_yaml
psm_reader_yaml["spectronaut_report"]["column_mapping"]["mobility"]="FG.ApexIonMobility"

However, the data type of the entries in the "mobility" column are strings and not floats. This leads to a downstream error in the alphabase.peptide.mobility.mobility_to_ccs_bruker function, as here the strings are multiplied with a float value (CCS_IM_COEF). Ive attached a screenshot with the issue.

Is there a way to import the column correctly?

Screenshots image

Version:

jalew188 commented 1 month ago

@mlorenz49 Please checkout #216 for testing