ConsensusFeature#
- class pyopenms.ConsensusFeature#
Bases:
object
Cython implementation of _ConsensusFeature
- Original C++ documentation is available here
– Inherits from [‘UniqueIdInterface’, ‘BaseFeature’]
A consensus feature spanning multiple LC-MS/MS experiments.
A ConsensusFeature represents analytes that have been quantified across multiple LC-MS/MS experiments. Each analyte in a ConsensusFeature is linked to its original LC-MS/MS run through a unique identifier.
Get access to the underlying features through getFeatureList()
- __init__()#
Overload:
- __init__(self) None
Overload:
- __init__(self, in_0: ConsensusFeature) None
Overload:
- __init__(self, in_0: int, in_1: Peak2D, in_2: int) None
Overload:
- __init__(self, in_0: int, in_1: BaseFeature) None
Overload:
- __init__(self, in_0: int, in_1: ConsensusFeature) None
Methods
Overload:
addRatio
(self, r)Connects a ratio to the ConsensusFeature.
clear
(self)clearMetaInfo
(self)Removes all meta values
clearUniqueId
(self)Clear the unique id.
computeConsensus
(self)Computes and updates the consensus position, intensity, and charge
computeDechargeConsensus
(self, in_0, in_1)Computes the uncharged parent RT & mass, assuming the handles are charge variants
Computes and updates the consensus position, intensity, and charge
empty
(self)ensureUniqueId
(self)Assigns a valid unique id, but only if the present one is invalid.
getAnnotationState
(self)State of peptide identifications attached to this feature.
getCharge
(self)Returns the charge state
getFeatureList
(self)getIntensity
(self)Returns the data point intensity (height)
getKeys
(self, keys)Fills the given vector with a list of all keys for which a value is set
getMZ
(self)Returns the m/z coordinate (index 1)
getMetaValue
(self, in_0)Returns the value corresponding to a string, or
Returns the PeptideIdentification vector
getQuality
(self)Returns the overall quality
getRT
(self)Returns the RT coordinate (index 0)
getRatios
(self)Get the ratio vector.
getUniqueId
(self)Returns the unique id
getWidth
(self)Returns the features width (full width at half max, FWHM)
hasInvalidUniqueId
(self)Returns whether the unique id is invalid.
hasValidUniqueId
(self)Returns whether the unique id is valid.
Overload:
isMetaEmpty
(self)Returns if the MetaInfo is empty
isValid
(self, unique_id)Returns true if the unique_id is valid, false otherwise
metaRegistry
(self)Returns a reference to the MetaInfoRegistry
metaValueExists
(self, in_0)Returns whether an entry with the given name exists
removeMetaValue
(self, in_0)Removes the DataValue corresponding to name if it exists
setCharge
(self, q)Sets the charge state
setIntensity
(self, in_0)Returns the data point intensity (height)
setMZ
(self, in_0)Returns the m/z coordinate (index 1)
setMetaValue
(self, in_0, in_1)Sets the DataValue corresponding to a name
setPeptideIdentifications
(self, peptides)Sets the PeptideIdentification vector
setQuality
(self, q)Sets the overall quality
setRT
(self, in_0)Returns the RT coordinate (index 0)
setRatios
(self, rs)Connects the ratios to the ConsensusFeature.
setUniqueId
(self, rhs)Assigns a new, valid unique id.
setWidth
(self, q)Sets the width of the feature (FWHM)
size
(self)- clear(self) None #
- clearMetaInfo(self) None #
Removes all meta values
- clearUniqueId(self) int #
Clear the unique id. The new unique id will be invalid. Returns 1 if the unique id was changed, 0 otherwise
- computeConsensus(self) None #
Computes and updates the consensus position, intensity, and charge
- computeDechargeConsensus(self, in_0: FeatureMap, in_1: bool) None #
Computes the uncharged parent RT & mass, assuming the handles are charge variants
- computeMonoisotopicConsensus(self) None #
Computes and updates the consensus position, intensity, and charge
- empty(self) bool #
- ensureUniqueId(self) int #
Assigns a valid unique id, but only if the present one is invalid. Returns 1 if the unique id was changed, 0 otherwise
- getAnnotationState(self) int #
State of peptide identifications attached to this feature. If one ID has multiple hits, the output depends on the top-hit only
- getCharge(self) int #
Returns the charge state
- getFeatureList(self) List[FeatureHandle] #
- getIntensity(self) float #
Returns the data point intensity (height)
- getKeys(self, keys: List[bytes]) None #
Fills the given vector with a list of all keys for which a value is set
- getMZ(self) float #
Returns the m/z coordinate (index 1)
- getMetaValue(self, in_0: bytes | str | String) int | float | bytes | str | List[int] | List[float] | List[bytes] #
Returns the value corresponding to a string, or
- getPeptideIdentifications(self) List[PeptideIdentification] #
Returns the PeptideIdentification vector
- getQuality(self) float #
Returns the overall quality
- getRT(self) float #
Returns the RT coordinate (index 0)
- getUniqueId(self) int #
Returns the unique id
- getWidth(self) float #
Returns the features width (full width at half max, FWHM)
- hasInvalidUniqueId(self) int #
Returns whether the unique id is invalid. Returns 1 if the unique id is invalid, 0 otherwise
- hasValidUniqueId(self) int #
Returns whether the unique id is valid. Returns 1 if the unique id is valid, 0 otherwise
- insert()#
Overload:
- insert(self, map_idx: int, in_1: Peak2D, element_idx: int) None
Overload:
- insert(self, map_idx: int, in_1: BaseFeature) None
Overload:
- insert(self, map_idx: int, in_1: ConsensusFeature) None
- isMetaEmpty(self) bool #
Returns if the MetaInfo is empty
- isValid(self, unique_id: int) bool #
Returns true if the unique_id is valid, false otherwise
- metaRegistry(self) MetaInfoRegistry #
Returns a reference to the MetaInfoRegistry
- metaValueExists(self, in_0: bytes | str | String) bool #
Returns whether an entry with the given name exists
- removeMetaValue(self, in_0: bytes | str | String) None #
Removes the DataValue corresponding to name if it exists
- setCharge(self, q: int) None #
Sets the charge state
- setIntensity(self, in_0: float) None #
Returns the data point intensity (height)
- setMZ(self, in_0: float) None #
Returns the m/z coordinate (index 1)
- setMetaValue(self, in_0: bytes | str | String, in_1: int | float | bytes | str | List[int] | List[float] | List[bytes]) None #
Sets the DataValue corresponding to a name
- setPeptideIdentifications(self, peptides: List[PeptideIdentification]) None #
Sets the PeptideIdentification vector
- setQuality(self, q: float) None #
Sets the overall quality
- setRT(self, in_0: float) None #
Returns the RT coordinate (index 0)
- setUniqueId(self, rhs: int) None #
Assigns a new, valid unique id. Always returns 1
- setWidth(self, q: float) None #
Sets the width of the feature (FWHM)
- size(self) int #