matchms.filtering.metadata_processing.interpret_pepmass module
- matchms.filtering.metadata_processing.interpret_pepmass.interpret_pepmass(spectrum_in, clone: bool | None = True) Spectrum | None
Reads pepmass field, if present, and adds values to correct fields.
The field
pepmassorPEPMASSis often used to describe the precursor ion. This function interprets the values as(mz, intensity, charge)and stores them inprecursor_mz,precursor_intensity, andcharge.- Parameters:
spectrum_in – Input spectrum.
clone – Optionally clone the Spectrum.
- Returns:
Spectrum with interpreted pepmass metadata, or
Noneif not present.- Return type:
Spectrum or None