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 theprovides
, 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