get_n2t_prefix

get_n2t_prefix(prefix)[source]

Get the name-to-thing prefix if available.

Parameters

prefix (str) – The prefix to lookup.

Return type

Optional[str]

Returns

The Name-to-Thing prefix corresponding to the prefix, if mappable.

>>> import bioregistry
>>> bioregistry.get_n2t_prefix('chebi')
'chebi'
>>> bioregistry.get_n2t_prefix('ncbitaxon')
'taxonomy'
>>> assert bioregistry.get_n2t_prefix('MONDO') is None