Feature#
- class pyopenms.Feature#
Bases:
object
Cython implementation of _Feature
- Original C++ documentation is available here
– Inherits from [‘UniqueIdInterface’, ‘RichPeak2D’]
An LC-MS feature
The Feature class is used to describe the two-dimensional signal caused by an analyte. It can store a charge state and a list of peptide identifications (for peptides). The area occupied by the Feature in the LC-MS data set is represented by a list of convex hulls (one for each isotopic peak). There is also a convex hull for the entire Feature. The model description can store the parameters of a two-dimensional theoretical model of the underlying signal in LC-MS. Currently, non-peptide compounds are also represented as features
Methods
Overload:
clearMetaInfo
(self)Removes all meta values
clearUniqueId
(self)Clear the unique id.
encloses
(self, rt, mz)Returns if the mass trace convex hulls of the feature enclose the position specified by rt and mz
ensureUniqueId
(self)Assigns a valid unique id, but only if the present one is invalid.
getAnnotationState
(self)getCharge
(self)getConvexHull
(self)getConvexHulls
(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
getOverallQuality
(self)Model and quality methods
Returns a reference to the PeptideIdentification vector
getQuality
(self, index)Returns the quality in dimension c
getRT
(self)Returns the RT coordinate (index 0)
getSubordinates
(self)Returns the subordinate features
getUniqueId
(self)Returns the unique id
getWidth
(self)hasInvalidUniqueId
(self)Returns whether the unique id is invalid.
hasValidUniqueId
(self)Returns whether the unique id is valid.
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)setConvexHulls
(self, in_0)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
setOverallQuality
(self, q)Sets the overall quality
setPeptideIdentifications
(self, peptides)Sets the PeptideIdentification vector
setQuality
(self, index, q)Sets the quality in dimension c
setRT
(self, in_0)Returns the RT coordinate (index 0)
setSubordinates
(self, in_0)Returns the subordinate features
setUniqueId
(self, rhs)Assigns a new, valid unique id.
setWidth
(self, q)- 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
- encloses(self, rt: float, mz: float) bool #
Returns if the mass trace convex hulls of the feature enclose the position specified by rt and mz
- Parameters:
rt – Sequence to digest
mz – Digestion products
- 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 #
- getCharge(self) int #
- getConvexHull(self) ConvexHull2D #
- getConvexHulls(self) List[ConvexHull2D] #
- 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
- getOverallQuality(self) float #
Model and quality methods
- getPeptideIdentifications(self) List[PeptideIdentification] #
Returns a reference to the PeptideIdentification vector
- getQuality(self, index: int) float #
Returns the quality in dimension c
- getRT(self) float #
Returns the RT coordinate (index 0)
- getUniqueId(self) int #
Returns the unique id
- getWidth(self) float #
- 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
- 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 #
- setConvexHulls(self, in_0: List[ConvexHull2D]) None #
- 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
- setOverallQuality(self, q: float) None #
Sets the overall quality
- setPeptideIdentifications(self, peptides: List[PeptideIdentification]) None #
Sets the PeptideIdentification vector
- setQuality(self, index: int, q: float) None #
Sets the quality in dimension c
- 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 #