matchms.exporting package
Functions for exporting mass spectral data
Individual Spectrum(), or lists of Spectrum()
can be exported to json, mgf, or msp files.
- matchms.exporting.save_as_mzspeclib(spectra: List[Spectrum], filename: str) None[source]
Save a list of spectra to a file in mzSpecLib format.
Parameters: spectra (List[Spectrum]): List of Spectrum objects to save. filename (str): The name of the file to save the spectra to.