get_ols_uri_prefix

get_ols_uri_prefix(prefix: str) str | None[source]

Get the URI format for an OLS entry.

Parameters:

prefix – The prefix to lookup.

Returns:

The OLS format string, if available.

Warning

This doesn’t have a normal form, so it only works for OBO Foundry at the moment.

>>> import bioregistry
>>> bioregistry.get_ols_uri_prefix('go')  # standard
'https://www.ebi.ac.uk/ols/ontologies/go/terms?iri=http://purl.obolibrary.org/obo/GO_'
>>> bioregistry.get_ols_uri_prefix('ncbitaxon')  # mixed case
'https://www.ebi.ac.uk/ols/ontologies/ncbitaxon/terms?iri=http://purl.obolibrary.org/obo/NCBITaxon_'
>>> assert bioregistry.get_ols_uri_prefix('sty') is None