Entering edit mode
17 months ago
soerendip
▴
10
I can download information from ChEBI if I know the corresponding ChEBI ID:
from libchebipy import ChebiEntity
chebi_entity = ChebiEntity("15903")
And then look at all the synonyms that the compound has:
chebi_entity.get_names()
> [{'_Name__name': 'beta-D-Glucose', '_Name__typ': 'SYNONYM', '_Name__source': 'KEGG COMPOUND', '_Name__adapted': False, '_Name__language': 'en'},
{'_Name__name': 'beta-D-glucose', '_Name__typ': 'NAME', '_Name__source': 'UniProt', '_Name__adapted': False, '_Name__language': 'en'},
{'_Name__name': 'beta-D-glucopyranose', '_Name__typ': 'IUPAC NAME', '_Name__source': 'IUPAC', '_Name__adapted': False, '_Name__language': 'en'},
{'_Name__name': 'BETA-D-GLUCOSE', '_Name__typ': 'SYNONYM', '_Name__source': 'PDBeChem', '_Name__adapted': False, '_Name__language': 'en'},
{'_Name__name': 'WURCS=2.0/1,1,0/[a2122h-1b_1-5]/1/', '_Name__typ': 'SYNONYM', '_Name__source': 'GlyTouCan', '_Name__adapted': False, '_Name__language': 'en'}]
Is there a way to get the ChEBI ID with one of the synonyms?
beta-D-glucose -> 15903