get_relation

get_relation(prefix, source_identifier, relation, target_prefix, **kwargs)[source]

Get the target identifier corresponding to the given relationship from the source prefix/identifier pair.

Warning

Assumes there’s only one version of the property for each term.

Example usage: get homology between MAPT in HGNC and MGI:

>>> import pyobo
>>> human_mapt_hgnc_id = "6893"
>>> mouse_mapt_mgi_id = "97180"
>>> assert mouse_mapt_mgi_id == pyobo.get_relation(
...     "hgnc", human_mapt_hgnc_id, "ro:HOM0000017", "mgi"
... )
Parameters:
Return type:

str | None