DeconvolvedSpectrum#
- class pyopenms.DeconvolvedSpectrum#
Bases:
objectCython implementation of _DeconvolvedSpectrum
Original C++ documentation is available here
A class representing a deconvolved spectrum. DeconvolvedSpectrum consists of PeakGroup instances representing masses. For MSn n>1, a PeakGroup representing the precursor mass is also added.
- __init__()#
Overload:
- __init__(self) None
Overload:
- __init__(self, in_0: DeconvolvedSpectrum) None
Overload:
- __init__(self, scan_number: int) None
Constructor with scan number
Methods
clear(self)Clears all peak groups
empty(self)Returns true if no peak groups
getCurrentMaxAbsCharge(self, max_abs_charge)Returns the current max charge
getCurrentMaxMass(self, max_mass)Returns the current max mass
getCurrentMinMass(self, min_mass)Returns the current min mass
getOriginalSpectrum(self)Returns the original spectrum
getPrecursor(self)Returns the precursor peak
getPrecursorCharge(self)Returns the precursor charge
getPrecursorPeakGroup(self)Returns the precursor peak group (MSn, n>1)
getPrecursorScanNumber(self)Returns the precursor scan number
getQuantities(self)Returns isobaric quantities
getScanNumber(self)Returns the scan number
isDecoy(self)Returns true if this is a decoy spectrum
pop_back(self)Removes the last peak group
push_back(self, pg)Adds a peak group
reserve(self, n)Reserves space for n peak groups
setOriginalSpectrum(self, spec)Sets the original spectrum
setPeakGroups(self, x)Sets peak groups
setPrecursor(self, precursor)Sets the precursor
setPrecursorPeakGroup(self, pg)Sets the precursor peak group
setPrecursorScanNumber(self, scan_number)Sets the precursor scan number
setQuantities(self, quantities)Sets isobaric quantities
size(self)Returns number of peak groups
sort(self)Sorts peak groups by monoisotopic mass
sortByQscore(self)Sorts peak groups by Qscore
toSpectrum(self, to_charge, tol, ...)Convert DeconvolvedSpectrum to MSSpectrum.
- clear(self) None#
Clears all peak groups
- empty(self) bool#
Returns true if no peak groups
- getCurrentMaxAbsCharge(self, max_abs_charge: int) int#
Returns the current max charge
- getCurrentMaxMass(self, max_mass: float) float#
Returns the current max mass
- getCurrentMinMass(self, min_mass: float) float#
Returns the current min mass
- getOriginalSpectrum(self) MSSpectrum#
Returns the original spectrum
- getPrecursorCharge(self) int#
Returns the precursor charge
- getPrecursorScanNumber(self) int#
Returns the precursor scan number
- getQuantities(self) IsobaricQuantities#
Returns isobaric quantities
- getScanNumber(self) int#
Returns the scan number
- isDecoy(self) bool#
Returns true if this is a decoy spectrum
- pop_back(self) None#
Removes the last peak group
- reserve(self, n: int) None#
Reserves space for n peak groups
- setOriginalSpectrum(self, spec: MSSpectrum) None#
Sets the original spectrum
- setPrecursorScanNumber(self, scan_number: int) None#
Sets the precursor scan number
- setQuantities(self, quantities: IsobaricQuantities) None#
Sets isobaric quantities
- size(self) int#
Returns number of peak groups
- sort(self) None#
Sorts peak groups by monoisotopic mass
- sortByQscore(self) None#
Sorts peak groups by Qscore
- toSpectrum(self, to_charge: int, tol: float, retain_undeconvolved: bool) MSSpectrum#
Convert DeconvolvedSpectrum to MSSpectrum. :param to_charge: The charge of each peak in output :param tol: The ppm tolerance :param retain_undeconvolved: If true, undeconvolved peaks are included