get_obofoundry_iri

get_obofoundry_iri(prefix: str, identifier: str) str | None[source]

Get the OBO Foundry URL if possible.

Parameters:
  • prefix – The prefix

  • identifier – The identifier

Returns:

The OBO Foundry URL if the prefix can be mapped to an OBO Foundry entry

>>> get_obofoundry_iri('chebi', '24431')
'http://purl.obolibrary.org/obo/CHEBI_24431'

For entries where there’s a preferred prefix, it is respected.

>>> get_obofoundry_iri('fbbt', '00007294')
'http://purl.obolibrary.org/obo/FBbt_00007294'