MzMLSpectrumDecoder#
- class pyopenms.MzMLSpectrumDecoder#
Bases:
object
Cython implementation of _MzMLSpectrumDecoder
Original C++ documentation is available here
A class to decode input strings that contain an mzML chromatogram or spectrum tag
It uses xercesc to parse a string containing either a exactly one mzML spectrum or chromatogram (from <chromatogram> to </chromatogram> or <spectrum> to </spectrum> tag). It returns the data contained in the binaryDataArray for Intensity / mass-to-charge or Intensity / time
- __init__()#
Overload:
- __init__(self) None
Overload:
- __init__(self, in_0: MzMLSpectrumDecoder) None
Methods
Overload:
domParseChromatogram
(self, in_, cptr)Extract data from a string which contains a full mzML chromatogram
domParseSpectrum
(self, in_, cptr)Extract data from a string which contains a full mzML spectrum
setSkipXMLChecks
(self, only)Whether to skip some XML checks (e.g.
- domParseChromatogram(self, in_: bytes | str | String, cptr: _Interfaces_Chromatogram) None #
Extract data from a string which contains a full mzML chromatogram
Extracts data from the input string which is expected to contain exactly one <chromatogram> tag (from <chromatogram> to </chromatogram>). This function will extract the contained binaryDataArray and provide the result as Chromatogram
- Parameters:
in – Input string containing the raw XML
cptr – Resulting chromatogram
- domParseSpectrum(self, in_: bytes | str | String, cptr: _Interfaces_Spectrum) None #
Extract data from a string which contains a full mzML spectrum
Extracts data from the input string which is expected to contain exactly one <spectrum> tag (from <spectrum> to </spectrum>). This function will extract the contained binaryDataArray and provide the result as Spectrum
- Parameters:
in – Input string containing the raw XML
cptr – Resulting spectrum
- setSkipXMLChecks(self, only: bool) None #
Whether to skip some XML checks (e.g. removing whitespace inside base64 arrays) and be fast instead