MetaInfoRegistry#
- class pyopenms.MetaInfoRegistry#
Bases:
object
Cython implementation of _MetaInfoRegistry
Original C++ documentation is available here
Registry which assigns unique integer indices to strings
When registering a new name an index >= 1024 is assigned. Indices from 1 to 1023 are reserved for fast access and will never change: 1 - isotopic_range 2 - cluster_id 3 - label 4 - icon 5 - color 6 - RT 7 - MZ 8 - predicted_RT 9 - predicted_RT_p_value 10 - spectrum_reference 11 - ID 12 - low_quality 13 - charge
- __init__()#
Overload:
- __init__(self) None
Overload:
- __init__(self, in_0: MetaInfoRegistry) None
Methods
Overload:
Overload:
getIndex
(self, name)Returns the integer index corresponding to a string.
getName
(self, index)Returns the corresponding name to an index
Overload:
registerName
(self, name, description, unit)Registers a string, stores its description and unit, and returns the corresponding index.
Overload:
Overload:
- getDescription()#
Overload:
- getDescription(self, index: int) bytes | str | String
Returns the description of an index
Overload:
Returns the description of a name
- getIndex(self, name: bytes | str | String) int #
Returns the integer index corresponding to a string. If the string is not registered, returns UInt(-1) (= UINT_MAX)
- getUnit()#
Overload:
- getUnit(self, index: int) bytes | str | String
Returns the unit of an index
Overload:
Returns the unit of a name
- registerName(self, name: bytes | str | String, description: bytes | str | String, unit: bytes | str | String) int #
Registers a string, stores its description and unit, and returns the corresponding index. If the string is already registered, it returns the index of the string