get_mappings_df

get_mappings_df(prefix, **kwargs)[source]

Get semantic mappings from a source as an SSSOM dataframe.

Parameters:
Returns:

A SSSOM-compliant dataframe of xrefs

Return type:

DataFrame

For example, if you want to get UMLS as an SSSOM dataframe, you can do

import pyobo

df = pyobo.get_mappings_df("umls")
df.to_csv("umls.sssom.tsv", sep="\t", index=False)

If you don’t want to get all of the many resources required to add names, you can pass names=False

import pyobo

df = pyobo.get_mappings_df("umls", names=False)
df.to_csv("umls.sssom.tsv", sep="\t", index=False)

Note

This assumes the Bioregistry as the prefix map