get_relation
- pyobo.get_relation(prefix, source_identifier, relation, target_prefix, *, use_tqdm=False, force=False)[source]
Get the target identifier corresponding to the given relationship from the source prefix/identifier pair. :rtype:
Optional
[str
]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')