MzMLSpectrumDecoder#
- class pyopenms.MzMLSpectrumDecoder#
Bases:
objectA class to decode input strings that contain an mzML chromatogram or spectrum tag
It uses libxml2 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__(skip_xml_checks: bool = False) None#
Methods
__init__([skip_xml_checks])domParseChromatogram(in, c)Overloaded function.
domParseSpectrum(in, sptr)Overloaded function.
setSkipXMLChecks(only)Whether to skip some XML checks (e.g. removing whitespace inside base64 arrays) and be fast instead.
- domParseChromatogram(in: str, c: pyopenms.MSChromatogram) None#
- domParseChromatogram(in: str, cptr: pyopenms.Chromatogram) None
Overloaded function.
domParseChromatogram(in: str, c: pyopenms.MSChromatogram) -> 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
c – Resulting chromatogram
domParseChromatogram(in: str, cptr: pyopenms.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(in: str, sptr: pyopenms.Spectrum) None#
- domParseSpectrum(in: str, s: pyopenms.MSSpectrum) None
Overloaded function.
domParseSpectrum(in: str, sptr: pyopenms.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
sptr – Resulting spectrum
domParseSpectrum(in: str, s: pyopenms.MSSpectrum) -> 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
s – Resulting spectrum
- setSkipXMLChecks(only: bool) None#
Whether to skip some XML checks (e.g. removing whitespace inside base64 arrays) and be fast instead