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

__init__

Overload:

getDescription

Overload:

getIndex(self, name)

Returns the integer index corresponding to a string.

getName(self, index)

Returns the corresponding name to an index

getUnit

Overload:

registerName(self, name, description, unit)

Registers a string, stores its description and unit, and returns the corresponding index.

setDescription

Overload:

setUnit

Overload:

getDescription()#

Overload:

getDescription(self, index: int) bytes | str | String

Returns the description of an index

Overload:

getDescription(self, name: bytes | str | String) bytes | str | String

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)

getName(self, index: int) bytes | str | String#

Returns the corresponding name to an index

getUnit()#

Overload:

getUnit(self, index: int) bytes | str | String

Returns the unit of an index

Overload:

getUnit(self, name: bytes | str | String) bytes | str | String

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

setDescription()#

Overload:

setDescription(self, index: int, description: bytes | str | String) None

Sets the description (String), corresponding to an index

Overload:

setDescription(self, name: bytes | str | String, description: bytes | str | String) None

Sets the description (String), corresponding to a name

setUnit()#

Overload:

setUnit(self, index: int, unit: bytes | str | String) None

Sets the unit (String), corresponding to an index

Overload:

setUnit(self, name: bytes | str | String, unit: bytes | str | String) None

Sets the unit (String), corresponding to a name