@@ -71,29 +71,29 @@ mapping = Mapping(
7171
7272### Assembly
7373
74- Mappings can be assembled from many source formats using functions in the
75- ` semra.io ` submodule:
74+ Mappings can be assembled from many source formats using I/O functions exposed
75+ through the top-level ` semra ` submodule:
7676
7777``` python
78- import semra.io
78+ import semra
7979
8080# load mappings from any standardized SSSOM file as a file path or URL, via `pandas.read_csv`
8181sssom_url = " https://w3id.org/biopragmatics/biomappings/sssom/biomappings.sssom.tsv"
82- mappings = semra.io. from_sssom(
82+ mappings = semra.from_sssom(
8383 sssom_url, license = " spdx:CC0-1.0" , mapping_set_title = " biomappings" ,
8484)
8585
8686# alternatively, metadata can be passed via a file/URL
87- mappings_alt = semra.io. from_sssom(
87+ mappings_alt = semra.from_sssom(
8888 sssom_url,
8989 metadata = " https://w3id.org/biopragmatics/biomappings/sssom/biomappings.sssom.yml"
9090)
9191
9292# load mappings from the Gene Ontology (via OBO format)
93- go_mappings = semra.io. from_pyobo(" go" )
93+ go_mappings = semra.from_pyobo(" go" )
9494
9595# load mappings from the Uber Anatomy Ontology (via OWL format)
96- uberon_mappings = semra.io. from_bioontologies(" uberon" )
96+ uberon_mappings = semra.from_bioontologies(" uberon" )
9797```
9898
9999SeMRA also implements custom importers in the ` semra.sources ` submodule. It's
@@ -281,7 +281,7 @@ these references can be standardized in a deterministic and principled way.
281281
282282``` python
283283import chembl_downloader
284- import semra.io
284+ import semra
285285from semra.api import prioritize_df
286286
287287# A dataframe of indication-disease pairs, where the
@@ -291,7 +291,7 @@ df = chembl_downloader.query("SELECT DISTINCT drugind_id, efo_id FROM DRUG_INDIC
291291# a pre-calculated prioritization of diseases and phenotypes from MONDO, DOID,
292292# HPO, ICD, GARD, and more.
293293url = " https://zenodo.org/records/15164180/files/priority.sssom.tsv?download=1"
294- mappings = semra.io. from_sssom(url)
294+ mappings = semra.from_sssom(url)
295295
296296# the dataframe will now have a new column with standardized references
297297prioritize_df(mappings, df, column = " efo_id" , target_column = " priority_indication_curie" )
0 commit comments