matchms.filtering.metadata_processing.clean_compound_name module

matchms.filtering.metadata_processing.clean_compound_name.clean_compound_name(spectrum_in: Spectrum, clone: bool | None = True) Spectrum | None[source]

Clean compound name.

A list of frequently seen name additions that do not belong to the compound name will be removed.

Parameters:
  • spectrum_in – Matchms Spectrum object.

  • clone – Optionally clone the Spectrum.

Returns:

Spectrum with cleaned compound name, or None if not present.

Return type:

Spectrum or None