get_banana
- get_banana(prefix: str) str | None [source]
Get the optional redundant prefix to go before an identifier.
A “banana” is an embedded prefix that isn’t actually part of the identifier. Usually this corresponds to the prefix itself, with some specific stylization such as in the case of FBbt. The banana does NOT include a colon “:” at the end
- Parameters:
prefix – The name of the prefix (possibly unnormalized)
- Returns:
The banana, if the prefix is valid and has an associated banana.
Explicitly annotated banana >>> assert “GO_REF” == get_banana(‘go.ref’)
Banana imported through OBO Foundry >>> assert “GO” == get_banana(‘go’) >>> assert “VariO” == get_banana(‘vario’)
Banana inferred for OBO Foundry ontology >>> get_banana(‘chebi’) ‘CHEBI’
No banana, no namespace in LUI >>> assert get_banana(‘pdb’) is None