Closed andrewsu closed 6 months ago
Repo is here at https://github.com/yichuanma95/foodb_json.git
The repo I provided contains info about the data's mapping.
While working on the API, I have noticed inconsistencies between the downloaded data and the browsable data on the FooDB website.
-The FooDB website stated there were 70926 compounds, but the compound.json file had 70477 entries, so several hundred entries are missing in the json file. -The website also stated 797 foods, but there were 992 foods in Food.json file
Deployed to https://biothings.ncats.io/foodb.
Example record https://biothings.ncats.io/foodb/food/FOOD00914
Noting that the next step is writing a SmartAPI yaml for this API. An intern can try to do this, or I'll stick it in my to-do list...
Per 2022-08-24 meeting, tagging @yihangx to work on writing the SmartAPI annotation file. See instructions linked in step 3 of https://github.com/biothings/BioThings_Explorer_TRAPI/blob/main/docs/README-contributing-new-data-source.md
@andrewsu I submitted pull request here: https://github.com/NCATS-Tangerine/translator-api-registry/pull/100. Since this is my first try, it may need some improvements. I am willing to talk to reviewer and make some changes.
@andrewsu I tested the annotation file with local BTE instance, and I did not see a problem. You can find my yaml file here: https://github.com/yihangx/translator-api-registry/blob/master/foodb/smartapi.yaml
Great, for completeness, can you post an example query and a snippet of the result showing successful incorporation? Exactly what that snippet should look like isn't precisely defined, but examples can be found in these two comments for other data sources:
(also, did you mean to close this PR https://github.com/NCATS-Tangerine/translator-api-registry/pull/100?)
@andrewsu I had problem finding a valid graph to test. I will coordinate with Colleen to test it this week.
Yes. I temporally closed the PR. Once I finish the test, I will reopen it.
The status is that This resource still needs SmartAPI/BTE annotation
Related infores stuff is ready:
Here's the SmartAPI yaml w/ x-bte annotation for BioThings FooDB. This yaml is registered in SmartAPI Registry.
I haven't made a PR to add this to BTE's regular use (for the config file, API_LIST variable
): I'm waiting until we're closer to the next release cycle to make a PR with all the KPs we want to add.
send a POST request to the api-specific endpoint, BioThings FooDB only. Like `http://localhost:3000/v1/smartapi/f1b8f64c316a01d1722f0fb842499fe5/query`. This works even when the KP isn't included in BTE's config Put this in the request body: It's querying with Soybean oil (aka `foodb.food:FOOD00914`) ``` { "message": { "query_graph": { "nodes": { "n0": { "ids": ["foodb.food:FOOD00914"], "categories": ["biolink:Food"] }, "n1": { "categories": ["biolink:SmallMolecule"] } }, "edges": { "e01": { "subject": "n0", "object": "n1" } } } } } ``` You should get a response with this edge (from this [record in the BioThings API](https://biothings.ncats.io/foodb/food/FOOD00914), based on this [operation's example](https://github.com/NCATS-Tangerine/translator-api-registry/blob/408b5b92a6fb20c5586ae8864b8b4d083bd57473/biothings_foodb/smartapi.yaml#L601): * object: beta-Sitosterol (primary ID in SRI NodeNorm `PUBCHEM.COMPOUND:222284`, INCHIKEY in BioThings API is `KZJWDPNRJALLNS-VJSFXXLFSA-N`) ``` "c0f056b0b902447b3142cb16bb592081": { "predicate": "biolink:has_food_component", "subject": "foodb.food:FOOD00914", "object": "PUBCHEM.COMPOUND:222284", "attributes": [], "sources": [ { "resource_id": "infores:fooddb", "resource_role": "primary_knowledge_source" }, { "resource_id": "infores:biothings-foodb", "resource_role": "aggregator_knowledge_source", "upstream_resource_ids": [ "infores:fooddb" ] }, { "resource_id": "infores:service-provider-trapi", "resource_role": "aggregator_knowledge_source", "upstream_resource_ids": [ "infores:biothings-foodb" ] } ] }, ```
And some small notes:
compounds.klass
, compounds.subklass
, compounds.superklass
Added to the PR linked above to add this to BTE's regular use (for the config file, API_LIST variable).
We'll try to get it into Translator's Lobster release (dev/CI -> Test this Friday)
@colleenXu Should this issue be closed?
Yep, confirmed that it's live by posting the example query to https://bte.transltr.io/v1/query
(Prod instance).
From their website (https://foodb.ca/):
This resource could provide edges between foods (indexed by FooDB IDs), and chemical compounds (indexed by CAS number, InChI Key, PubChem, ChEMBL, etc.). For example, https://foodb.ca/foods/FOOD00914 shows the link between soybean oil and beta-sitosterol. Unfortunately, it doesn't look like the FooDB IDs are linked to external IDs that are well used within Translator (so FooDB just might be the canonical ID here?).
FooDB does have an API but it requires an API key, so not (currently) workable for Translator...
Downloadable file is available at https://foodb.ca/downloads, provided under CC-BY-NC license. As of now, the last update was April 2020.