get_has_canonical

get_has_canonical(prefix: str) str | None[source]

Get the canonical prefix.

If two (or more) stand-alone resources both provide for the same semantic space, but none of them have a first-party claim to the semantic space, then the has_canonical relationship is used to choose a preferred prefix. This is different than the provides, relationship, which is appropriate when it’s obvious that one resource has a full claim to the semantic space.

Parameters:

prefix – The prefix to lookup.

Returns:

The canonical prefix for this one, if one is annotated. This is the inverse of get_canonical_for().

>>> get_has_canonical("refseq")
'ncbiprotein'
>>> get_has_canonical("chebi")
None