ms2pip.spectrum_input
Read MS2 spectra.
- ms2pip.spectrum_input.read_spectrum_file(spectrum_file)[source]
Read MS2 spectra from a supported file format; inferring the type from the filename extension.
- Parameters:
spectrum_file (str) – Path to MGF or mzML file.
- Yields:
ObservedSpectrum
- Raises:
UnsupportedSpectrumFiletypeError – If the file extension is not supported.
- Return type:
Generator[ObservedSpectrum, None, None]