matchms.importing.load_from_mzxml module¶
- matchms.importing.load_from_mzxml.load_from_mzxml(filename: str, ms_level: int = 2, metadata_harmonization: bool = True) Generator[Spectrum, None, None] [source]¶
Load spectrum(s) from mzml file.
This function will create ~matchms.Spectrum for every spectrum of desired ms_level found in a given MzXML file. For more extensive parsing options consider using the pyteomics package.
Example:
from matchms.importing import load_from_mzxml file_mzxml = "testdata.mzxml" spectrums = list(load_from_mzml(file_mzxml))
- Parameters:
filename – Filename for mzXML file to import.
ms_level – Specify which ms level to import. Default is 2.
metadata_harmonization (bool, optional) – Set to False if metadata harmonization to default keys is not desired. The default is True.