get_sssom_df
- pyobo.get_sssom_df(prefix, *, predicate_id='oboinowl:hasDbXref', justification='sempav:UnspecifiedMatching', **kwargs)[source]
Get xrefs from a source as an SSSOM dataframe.
- Parameters:
prefix (
str
) – The ontology to look in for xrefspredicate_id (
str
) – The predicate used in the SSSOM document. By default, ontologies don’t typically ascribe semantics to xrefs sooboinowl:hasDbXref
is usedjustification (
str
) – The justification for the mapping. By default, ontologies don’t typically ascribe semantics, so this is left with sempav:UnspecifiedMatching
- Return type:
DataFrame
- Returns:
A SSSOM-compliant dataframe of xrefs
For example, if you want to get UMLS as an SSSOM dataframe, you can do
>>> import pyobo >>> df = pyobo.get_sssom_df("umls") >>> df.to_csv("umls.sssom.tsv", sep="\t", index=False)
Note
This assumes the Bioregistry as the prefix map