MetaInfoRegistry#

class pyopenms.MetaInfoRegistry#

Bases: object

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__() → None#
__init__(arg: pyopenms.MetaInfoRegistry, /) → None

Methods

__init__()

getDescription(index)

Overloaded function.

getIndex(name)

Returns the integer index corresponding to a string.

getName(index)

Returns the corresponding name to an index

getUnit(index)

Overloaded function.

registerName(name[, description, unit])

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

setDescription(index, description)

Overloaded function.

setUnit(index, unit)

Overloaded function.

getDescription(index: int) → str#
getDescription(name: str) → str

Overloaded function.

  1. getDescription(index: int) -> str

Returns the description of an index

  1. getDescription(name: str) -> str

Returns the description of a name

getIndex(name: str) → int#

Returns the integer index corresponding to a string. If the string is not registered, returns UInt(-1) (= UINT_MAX)

getName(index: int) → str#

Returns the corresponding name to an index

getUnit(index: int) → str#
getUnit(name: str) → str

Overloaded function.

  1. getUnit(index: int) -> str

Returns the unit of an index

  1. getUnit(name: str) -> str

Returns the unit of a name

registerName(name: str, description: str = '', unit: str = '') → 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(index: int, description: str) → None#
setDescription(name: str, description: str) → None

Overloaded function.

  1. setDescription(index: int, description: str) -> None

Sets the description (String), corresponding to an index

  1. setDescription(name: str, description: str) -> None

Sets the description (String), corresponding to a name

setUnit(index: int, unit: str) → None#
setUnit(name: str, unit: str) → None

Overloaded function.

  1. setUnit(index: int, unit: str) -> None

Sets the unit (String), corresponding to an index

  1. setUnit(name: str, unit: str) -> None

Sets the unit (String), corresponding to a name