Hello Everyone,
I'm trying to map compound name to SabioCompoundID.
I tried the example script provided
here .
The following example returns ["Name","ChebiID","PubChemID","InChI","SabioCompoundID","KeggCompoundID"] using SabioCompoundID":"36" as input.
#
Example SABIO-RK script 3 - returns compound details
# ------------------------------------------------------------------------------
import requests
QUERY_URL = '
http://sabiork.h-its.org/sabioRestWebServices/searchCompoundDetails'
# input: SabioCompoundID
# valid output fields: "fields[]":["Name","ChebiID","PubChemID","InChI","SabioCompoundID","KeggCompoundID"]
# example
query = {"SabioCompoundID":"36", "fields[]":["Name","ChebiID","PubChemID"]}
request =
requests.post(QUERY_URL, params = query)
request.raise_for_status()
# results
print(request.text)
Outtput:
Name ChebiID PubChemID
Phosphate 35780 26078 18367 3311
I'd like to modify the script to query information using the field "Name" (name of the compound). I made the following change to the variable "query",
query = {"Name":"Phosphate", "fields[]":["SabioCOmpoundID","ChebiID","PubChemID"]}
Output:
SabioCompoundID ChebiID PubChemID
null null null
I'm not sure what's the right way to map compound name to sabio compound id.
Could someone help me with this?
Many thanks,
Deepa