Skip to content

Commit

Permalink
id_types provides resource labels
Browse files Browse the repository at this point in the history
  • Loading branch information
for-hyde committed Nov 14, 2024
1 parent e975962 commit 9a50189
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions omnipath_metabo/data/resource-labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ HMDB:
kegg_id: KEGG
bigg_id: BIGG
pbd_id: PBD
wikipedia: WikiPedia
chemspiter: ChemSpider
fbonto: FBOnto
chebi: ChEBI
wikipedia_id: WikiPedia
chemspider_id: ChemSpider
fbonto_id: FBOnto
chebi_id: ChEBI
biocyc_id: BioCyc
drugbank_id: DrugBank
foodb_id: FoodDB
Expand Down
6 changes: 6 additions & 0 deletions omnipath_metabo/schema/_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,9 @@ def __iter__(self):
'structure': (row[0], row[3], row[6]),
'properties':(row[7], row[8], None, row[10])
}

def _id_types():
if 'ID_TYPES' not in globals():
globals()['ID_TYPES'] = _data.load('resource-labels')

return globals()['ID_TYPES']

0 comments on commit 9a50189

Please sign in to comment.