Precursor#
- class pyopenms.Precursor#
Bases:
CVTermListPrecursor meta information
This class contains precursor information:
isolation window
activation
selected ion (m/z, intensity, charge, possible charge states)
ion mobility drift time
- __init__() None#
- __init__(arg: pyopenms.Precursor, /) None
Methods
__init__()Convert an ActivationMethod enum to its short (abbreviated) name string
Convert an ActivationMethod enum to its full name string
addCVTerm(term)Adds a CV term
Removes all meta values
consumeCVTerms(cv_term_map)Merges the given map into the member map, no duplicate checking
empty()Returns the activation energy (in electronvolt)
Returns the activation methods
Returns the abbreviations (e.g., "CID") of the activation methods set on this instance
Returns the full names (e.g., "Collision-induced dissociation") of the activation methods set on this instance
Returns the full names (e.g., "Collision-induced dissociation") of ALL possible activation methods, not just those set on this instance
Returns the abbreviations (e.g., "CID") of ALL possible activation methods, not just those set on this instance
Returns a copy of the CV terms, keyed by CV accession
Returns the charge
Returns the ion mobility drift time in milliseconds (-1 means it is not set)
Returns the lower offset from the target ion mobility in milliseconds
Returns the upper offset from the target ion mobility in milliseconds
Overloaded function.
Returns the lower offset from the target m/z
Returns the upper offset from the target m/z
getKeys(keys)Overloaded function.
getMZ()Overloaded function.
getMetaValue(name)Returns the value corresponding to a string, or DataValue::EMPTY if not found
getPos()Overloaded function.
Returns the possible charge states
Returns the uncharged mass of the precursor, if charge is unknown, i.e. 0 best guess is its doubly charged.
hasCVTerm(accession)Returns if the MetaInfo is empty
Returns a reference to the MetaInfoRegistry
metaValueExists(name)Returns whether an entry with the given name exists
removeMetaValue(name)Removes the DataValue corresponding to name if it exists
replaceCVTerm(cv_term)Replaces the specified CV term
replaceCVTerms(cv_term_map)setActivationEnergy(activation_energy)Sets the activation energy (in electronvolt)
setActivationMethods(activation_methods)Sets the activation methods
setCVTerms(terms)Sets the CV terms from a vector
setCharge(charge)Sets the charge
setDriftTime(drift_time)Sets the ion mobility drift time in milliseconds
setDriftTimeWindowLowerOffset(drift_time)Sets the lower offset from the target ion mobility
setDriftTimeWindowUpperOffset(drift_time)Sets the upper offset from the target ion mobility
setIntensity(intensity)Overloaded function.
Sets the lower offset from the target m/z
Sets the upper offset from the target m/z
setMZ(mz)Overloaded function.
setMetaValue(name, value)Sets the DataValue corresponding to a name
setPos(pos)Overloaded function.
setPossibleChargeStates(possible_charge_states)Sets the possible charge states
toActivationMethod(name)Convert a string (full name or short name) to an ActivationMethod enum
- class ActivationMethod(*values)#
Bases:
Enum- BIRD = 4#
- CID = 0#
- ECD = 5#
- ETD = 11#
- ETciD = 12#
- EThcD = 13#
- HCD = 16#
- HCID = 8#
- IMD = 6#
- INSOURCE = 17#
- LCID = 9#
- LIFT = 18#
- PD = 2#
- PHD = 10#
- PQD = 14#
- PSD = 1#
- SID = 3#
- SIZE_OF_ACTIVATIONMETHOD = 19#
- SORI = 7#
- TRAP = 15#
- getMapping()#
Returns a dict mapping int values to enum member name strings.
- static activationMethodToShortString(m: pyopenms.Precursor.ActivationMethod) str#
Convert an ActivationMethod enum to its short (abbreviated) name string
- static activationMethodToString(m: pyopenms.Precursor.ActivationMethod) str#
Convert an ActivationMethod enum to its full name string
- addCVTerm(term: pyopenms.CVTerm) None#
Adds a CV term
- clearMetaInfo() None#
Removes all meta values
- consumeCVTerms(cv_term_map: dict[str, collections.abc.Sequence[pyopenms.CVTerm]]) None#
Merges the given map into the member map, no duplicate checking
- empty() bool#
- getActivationEnergy() float#
Returns the activation energy (in electronvolt)
- getActivationMethods() set[pyopenms.Precursor.ActivationMethod]#
Returns the activation methods
- getActivationMethodsAsShortString() list[str]#
Returns the abbreviations (e.g., “CID”) of the activation methods set on this instance
- getActivationMethodsAsString() list[str]#
Returns the full names (e.g., “Collision-induced dissociation”) of the activation methods set on this instance
- static getAllNamesOfActivationMethods() list[str]#
Returns the full names (e.g., “Collision-induced dissociation”) of ALL possible activation methods, not just those set on this instance
- static getAllShortNamesOfActivationMethods() list[str]#
Returns the abbreviations (e.g., “CID”) of ALL possible activation methods, not just those set on this instance
- getCVTerms() dict[str, list[pyopenms.CVTerm]]#
Returns a copy of the CV terms, keyed by CV accession
- getCharge() int#
Returns the charge
- getDriftTime() float#
Returns the ion mobility drift time in milliseconds (-1 means it is not set)
- getDriftTimeWindowLowerOffset() float#
Returns the lower offset from the target ion mobility in milliseconds
- getDriftTimeWindowUpperOffset() float#
Returns the upper offset from the target ion mobility in milliseconds
- getIntensity() float#
- getIntensity() float
Overloaded function.
getIntensity() -> float
Returns the intensity (height) of the peak
getIntensity() -> float
Returns the intensity
- getIsolationWindowLowerOffset() float#
Returns the lower offset from the target m/z
- getIsolationWindowUpperOffset() float#
Returns the upper offset from the target m/z
- getKeys(keys: list) None#
- getKeys() list
Overloaded function.
getKeys(keys: list) -> None
Fills the given list with all meta value keys
getKeys() -> list
Returns all meta value keys as a list
- getMZ() float#
- getMZ() float
Overloaded function.
getMZ() -> float
Returns the m/z (mass-to-charge) value of the peak
getMZ() -> float
Returns the m/z
- getMetaValue(name: str) None | int | float | str | bytes | list[str] | list[int] | list[float]#
Returns the value corresponding to a string, or DataValue::EMPTY if not found
- getPos() float#
- getPos() float
Overloaded function.
getPos() -> float
Returns the position (alias for getMZ)
getPos() -> float
Returns the position (m/z)
- getPossibleChargeStates() list[int]#
Returns the possible charge states
- getUnchargedMass() float#
Returns the uncharged mass of the precursor, if charge is unknown, i.e. 0 best guess is its doubly charged
- hasCVTerm(accession: str) bool#
- isMetaEmpty() bool#
Returns if the MetaInfo is empty
- static metaRegistry() pyopenms.MetaInfoRegistry#
Returns a reference to the MetaInfoRegistry
- metaValueExists(name: str) bool#
Returns whether an entry with the given name exists
- removeMetaValue(name: str) None#
Removes the DataValue corresponding to name if it exists
- replaceCVTerm(cv_term: pyopenms.CVTerm) None#
Replaces the specified CV term
- replaceCVTerms(cv_term_map: dict[str, collections.abc.Sequence[pyopenms.CVTerm]]) None#
- setActivationEnergy(activation_energy: float) None#
Sets the activation energy (in electronvolt)
- setActivationMethods(activation_methods: collections.abc.Set[pyopenms.Precursor.ActivationMethod]) None#
Sets the activation methods
- setCVTerms(terms: collections.abc.Sequence[pyopenms.CVTerm]) None#
Sets the CV terms from a vector
- setCharge(charge: int) None#
Sets the charge
- setDriftTime(drift_time: float) None#
Sets the ion mobility drift time in milliseconds
- setDriftTimeWindowLowerOffset(drift_time: float) None#
Sets the lower offset from the target ion mobility
- setDriftTimeWindowUpperOffset(drift_time: float) None#
Sets the upper offset from the target ion mobility
- setIntensity(intensity: float) None#
- setIntensity(intensity: float) None
Overloaded function.
setIntensity(intensity: float) -> None
Sets the intensity (height) of the peak
setIntensity(intensity: float) -> None
Sets the intensity
- setIsolationWindowLowerOffset(bound: float) None#
Sets the lower offset from the target m/z
- setIsolationWindowUpperOffset(bound: float) None#
Sets the upper offset from the target m/z
- setMZ(mz: float) None#
- setMZ(mz: float) None
Overloaded function.
setMZ(mz: float) -> None
Sets the m/z (mass-to-charge) value of the peak
setMZ(mz: float) -> None
Sets the m/z
- setMetaValue(name: str, value: None | int | float | str | bytes | list[str] | list[int] | list[float]) None#
Sets the DataValue corresponding to a name
- setPos(pos: float) None#
- setPos(pos: float) None
Overloaded function.
setPos(pos: float) -> None
Sets the position (alias for setMZ)
setPos(pos: float) -> None
Sets the position (m/z)
- setPossibleChargeStates(possible_charge_states: collections.abc.Sequence[int]) None#
Sets the possible charge states
- static toActivationMethod(name: str) pyopenms.Precursor.ActivationMethod#
Convert a string (full name or short name) to an ActivationMethod enum