PeakGroup#

class pyopenms.PeakGroup#

Bases: object

Class describing a deconvolved mass. A mass contains multiple (LogMz) peaks of different charges and isotope indices. PeakGroup is the set of such peaks representing a single monoisotopic mass.

__init__() → None#
__init__(arg0: int, arg1: int, arg2: bool, /) → None
__init__(arg: pyopenms.PeakGroup, /) → None

Methods

__init__()

empty()

Returns true if no peaks

getAvgDaError()

Returns average Da error

getAvgPPMError()

Returns average ppm error

getChargeIntensity(abs_charge)

Returns intensity for given charge

getChargeIsotopeCosine(abs_charge)

Returns isotope cosine for given charge

getChargeSNR(abs_charge)

Returns SNR for given charge

getChargeScore()

Returns the charge fit score

getFeatureIndex()

Returns the feature index

getIndex()

Returns the peak group index

getIntensity()

Returns the summed intensity

getIsotopeCosine()

Returns the isotope cosine score

getIsotopeDaDistance()

Returns distance between consecutive isotopes

getIsotopeIntensities()

Returns per-isotope intensities

getMassErrors([ppm])

Returns mass errors per isotope

getMinNegativeIsotopeIndex()

Returns minimum negative isotope index

getMonoMass()

Returns the monoisotopic mass

getPeakOccupancy()

Returns peak occupancy (0-1)

getQscore()

Returns the quality score (0-1)

getQscore2D()

Returns the 2D quality score incorporating feature-level information

getQvalue()

Returns the q-value for FDR

getRepAbsCharge()

Returns the representative charge

getSNR()

Returns the signal-to-noise ratio

getScanNumber()

Returns the scan number

getTargetDecoyType()

Returns target/decoy type

isPositive()

Returns true if positive ionization mode

isTargeted()

Returns true if this peak group was targeted

push_back(pg)

Adds a LogMzPeak

reserve(n)

Reserves space for n peaks

setAvgPPMError(error)

Sets average ppm error

setChargeIsotopeCosine(abs_charge, cos)

Sets isotope cosine for given charge

setChargeSNR(abs_charge, c_snr)

Sets SNR for given charge

setChargeScore(charge_score)

Sets the charge fit score

setFeatureIndex(findex)

Sets the feature index

setIndex(i)

Sets the peak group index

setIsotopeCosine(cos)

Sets the isotope cosine score

setIsotopeDaDistance(d)

Sets isotope distance

setMonoisotopicMass(mono_mass)

Sets the monoisotopic mass

setQscore(qscore)

Sets the quality score

setQscore2D(fqscore)

Sets the 2D quality score

setQvalue(q)

Sets the q-value

setRepAbsCharge(max_snr_abs_charge)

Sets the representative charge

setSNR(snr)

Sets the SNR

setScanNumber(scan_number)

Sets the scan number

setTargetDecoyType(index)

Sets the target/decoy type

setTargeted()

Marks this peak group as targeted

size()

Returns number of LogMzPeaks

sort()

Sorts peaks by log m/z

Attributes

class TargetDecoyType(*values)#

Bases: IntEnum

as_integer_ratio()#

Return a pair of integers, whose ratio is equal to the original int.

The ratio is in lowest terms and has a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)
bit_count()#

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3
bit_length()#

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6
conjugate()#

Returns self, the complex conjugate of any int.

denominator#

the denominator of a rational number in lowest terms

classmethod from_bytes(bytes, byteorder='big', *, signed=False)#

Return the integer represented by the given array of bytes.

bytes

Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use sys.byteorder as the byte order value. Default is to use ‘big’.

signed

Indicates whether two’s complement is used to represent the integer.

getMapping()#

Returns a dict mapping int values to enum member name strings.

imag#

the imaginary part of a complex number

is_integer()#

Returns True. Exists for duck type compatibility with float.is_integer.

noise_decoy = 1#
numerator#

the numerator of a rational number in lowest terms

real#

the real part of a complex number

signal_decoy = 2#
target = 0#
to_bytes(length=1, byteorder='big', *, signed=False)#

Return an array of bytes representing an integer.

length

Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes. Default is length 1.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use sys.byteorder as the byte order value. Default is to use ‘big’.

signed

Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.

empty() → bool#

Returns true if no peaks

getAvgDaError() → float#

Returns average Da error

getAvgPPMError() → float#

Returns average ppm error

getChargeIntensity(abs_charge: int) → float#

Returns intensity for given charge

getChargeIsotopeCosine(abs_charge: int) → float#

Returns isotope cosine for given charge

getChargeSNR(abs_charge: int) → float#

Returns SNR for given charge

getChargeScore() → float#

Returns the charge fit score

getFeatureIndex() → int#

Returns the feature index

getIndex() → int#

Returns the peak group index

getIntensity() → float#

Returns the summed intensity

getIsotopeCosine() → float#

Returns the isotope cosine score

getIsotopeDaDistance() → float#

Returns distance between consecutive isotopes

getIsotopeIntensities() → list[float]#

Returns per-isotope intensities

getMassErrors(ppm: bool = True) → list[float]#

Returns mass errors per isotope

getMinNegativeIsotopeIndex() → int#

Returns minimum negative isotope index

getMonoMass() → float#

Returns the monoisotopic mass

getPeakOccupancy() → float#

Returns peak occupancy (0-1)

getQscore() → float#

Returns the quality score (0-1)

getQscore2D() → float#

Returns the 2D quality score incorporating feature-level information

getQvalue() → float#

Returns the q-value for FDR

getRepAbsCharge() → int#

Returns the representative charge

getSNR() → float#

Returns the signal-to-noise ratio

getScanNumber() → int#

Returns the scan number

getTargetDecoyType() → pyopenms.PeakGroup.TargetDecoyType#

Returns target/decoy type

isPositive() → bool#

Returns true if positive ionization mode

isTargeted() → bool#

Returns true if this peak group was targeted

noise_decoy = 1#
push_back(pg: pyopenms.LogMzPeak) → None#

Adds a LogMzPeak

reserve(n: int) → None#

Reserves space for n peaks

setAvgPPMError(error: float) → None#

Sets average ppm error

setChargeIsotopeCosine(abs_charge: int, cos: float) → None#

Sets isotope cosine for given charge

setChargeSNR(abs_charge: int, c_snr: float) → None#

Sets SNR for given charge

setChargeScore(charge_score: float) → None#

Sets the charge fit score

setFeatureIndex(findex: int) → None#

Sets the feature index

setIndex(i: int) → None#

Sets the peak group index

setIsotopeCosine(cos: float) → None#

Sets the isotope cosine score

setIsotopeDaDistance(d: float) → None#

Sets isotope distance

setMonoisotopicMass(mono_mass: float) → None#

Sets the monoisotopic mass

setQscore(qscore: float) → None#

Sets the quality score

setQscore2D(fqscore: float) → None#

Sets the 2D quality score

setQvalue(q: float) → None#

Sets the q-value

setRepAbsCharge(max_snr_abs_charge: int) → None#

Sets the representative charge

setSNR(snr: float) → None#

Sets the SNR

setScanNumber(scan_number: int) → None#

Sets the scan number

setTargetDecoyType(index: pyopenms.PeakGroup.TargetDecoyType) → None#

Sets the target/decoy type

setTargeted() → None#

Marks this peak group as targeted

signal_decoy = 2#
size() → int#

Returns number of LogMzPeaks

sort() → None#

Sorts peaks by log m/z

target = 0#