From ad6736a68889aa89e4c9a1f7e610d7cd31f611dc Mon Sep 17 00:00:00 2001 From: Colleen Xu Date: Tue, 23 Mar 2021 16:21:58 -0700 Subject: [PATCH 1/4] using BTE TRAPI endpoint for JSON tests --- onehop/test_triples/KP/Service_Provider/MyChem.info_API.json | 5 +++-- onehop/test_triples/KP/Service_Provider/MyGene.info_API.json | 5 +++-- .../KP/Service_Provider/Ontology_Lookup_Service_API.json | 5 +++-- onehop/test_triples/KP/Service_Provider/OpenTarget_API.json | 5 +++-- onehop/test_triples/KP/Service_Provider/README.md | 4 +--- .../test_triples/KP/Service_Provider/mydisease.info_API.json | 5 +++-- 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/onehop/test_triples/KP/Service_Provider/MyChem.info_API.json b/onehop/test_triples/KP/Service_Provider/MyChem.info_API.json index f1754ce..3aff9b7 100644 --- a/onehop/test_triples/KP/Service_Provider/MyChem.info_API.json +++ b/onehop/test_triples/KP/Service_Provider/MyChem.info_API.json @@ -1,6 +1,7 @@ { - "url": "https://smart-api.info/ui/8f08d1446e0bb9c2b323713ce83e2bd3", - "TRAPI": false, + "url": "https://smart-api.info/ui/dc91716f44207d2e1287c727f281d339#/1.0.0/querySmartAPI", + "myChem_smartAPI_ID": "8f08d1446e0bb9c2b323713ce83e2bd3", + "TRAPI": true, "edges": [ { "subject_category": "biolink:ChemicalSubstance", diff --git a/onehop/test_triples/KP/Service_Provider/MyGene.info_API.json b/onehop/test_triples/KP/Service_Provider/MyGene.info_API.json index ba408ad..f07f637 100644 --- a/onehop/test_triples/KP/Service_Provider/MyGene.info_API.json +++ b/onehop/test_triples/KP/Service_Provider/MyGene.info_API.json @@ -1,6 +1,7 @@ { - "url": "https://smart-api.info/ui/59dce17363dce279d389100834e43648", - "TRAPI": false, + "url": "https://smart-api.info/ui/dc91716f44207d2e1287c727f281d339#/1.0.0/querySmartAPI", + "myChem_smartAPI_ID": "59dce17363dce279d389100834e43648", + "TRAPI": true, "edges": [ { "subject_category": "biolink:Gene", diff --git a/onehop/test_triples/KP/Service_Provider/Ontology_Lookup_Service_API.json b/onehop/test_triples/KP/Service_Provider/Ontology_Lookup_Service_API.json index d8dd2f3..279a3cf 100644 --- a/onehop/test_triples/KP/Service_Provider/Ontology_Lookup_Service_API.json +++ b/onehop/test_triples/KP/Service_Provider/Ontology_Lookup_Service_API.json @@ -1,6 +1,7 @@ { - "url": "https://smart-api.info/ui/1c056ffc7ed0dd1229e71c4752239465", - "TRAPI": false, + "url": "https://smart-api.info/ui/dc91716f44207d2e1287c727f281d339#/1.0.0/querySmartAPI", + "myChem_smartAPI_ID": "1c056ffc7ed0dd1229e71c4752239465", + "TRAPI": true, "edges": [ { "subject_category": "biolink:Disease", diff --git a/onehop/test_triples/KP/Service_Provider/OpenTarget_API.json b/onehop/test_triples/KP/Service_Provider/OpenTarget_API.json index 020dcfb..e6f3b9f 100644 --- a/onehop/test_triples/KP/Service_Provider/OpenTarget_API.json +++ b/onehop/test_triples/KP/Service_Provider/OpenTarget_API.json @@ -1,6 +1,7 @@ { - "url": "https://smart-api.info/ui/542ba165e1b4227854cf7c0a8addcc79", - "TRAPI": false, + "url": "https://smart-api.info/ui/dc91716f44207d2e1287c727f281d339#/1.0.0/querySmartAPI", + "myChem_smartAPI_ID": "542ba165e1b4227854cf7c0a8addcc79", + "TRAPI": true, "edges": [ { "subject_category": "biolink:Gene", diff --git a/onehop/test_triples/KP/Service_Provider/README.md b/onehop/test_triples/KP/Service_Provider/README.md index b5395fd..cb4d429 100644 --- a/onehop/test_triples/KP/Service_Provider/README.md +++ b/onehop/test_triples/KP/Service_Provider/README.md @@ -1,6 +1,4 @@ -These KPs are not TRAPI APIs. - -The tests described in the JSON files are written as-if these are TRAPI APIs. The expectation there is that a TRAPI query is made through BTE (the endpoint /v1/smartapi/{smartapi_id}/query) using the info in the JSON files. The edge to the "answer" node should have an attribute with the name "api" and value as the name of the API. +The JSON files assume that these APIs will be queried through BTE's TRAPI endpoint for querying individual SmartAPIs. They therefore include the url for the BTE endpoint, and the SmartAPI ID for the actual SmartAPI. The edge to the answer/object node should have an "api" attribute, with the name of the SmartAPI as the value. Notes: - tests are also described as queries that can be made directly to the API, in the additional README files. Notice that many API endpoints do not handle curies (ID prefixes) or predicates. The format of these queries is specified by the x-bte-annotated endpoint in the SmartAPI registry file. diff --git a/onehop/test_triples/KP/Service_Provider/mydisease.info_API.json b/onehop/test_triples/KP/Service_Provider/mydisease.info_API.json index 3e3dae5..3410659 100644 --- a/onehop/test_triples/KP/Service_Provider/mydisease.info_API.json +++ b/onehop/test_triples/KP/Service_Provider/mydisease.info_API.json @@ -1,6 +1,7 @@ { - "url": "https://smart-api.info/ui/671b45c0301c8624abbd26ae78449ca2", - "TRAPI": false, + "url": "https://smart-api.info/ui/dc91716f44207d2e1287c727f281d339#/1.0.0/querySmartAPI", + "myChem_smartAPI_ID": "671b45c0301c8624abbd26ae78449ca2", + "TRAPI": true, "edges": [ { "subject_category": "biolink:Disease", From 28348da84f11802e37ed1112512824bef9bb4014 Mon Sep 17 00:00:00 2001 From: Colleen Xu Date: Thu, 25 Mar 2021 18:44:56 -0700 Subject: [PATCH 2/4] correct smartapi key --- onehop/test_triples/KP/Service_Provider/MyChem.info_API.json | 2 +- onehop/test_triples/KP/Service_Provider/MyGene.info_API.json | 2 +- .../KP/Service_Provider/Ontology_Lookup_Service_API.json | 2 +- onehop/test_triples/KP/Service_Provider/OpenTarget_API.json | 2 +- onehop/test_triples/KP/Service_Provider/mydisease.info_API.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/onehop/test_triples/KP/Service_Provider/MyChem.info_API.json b/onehop/test_triples/KP/Service_Provider/MyChem.info_API.json index 3aff9b7..659ae64 100644 --- a/onehop/test_triples/KP/Service_Provider/MyChem.info_API.json +++ b/onehop/test_triples/KP/Service_Provider/MyChem.info_API.json @@ -1,6 +1,6 @@ { "url": "https://smart-api.info/ui/dc91716f44207d2e1287c727f281d339#/1.0.0/querySmartAPI", - "myChem_smartAPI_ID": "8f08d1446e0bb9c2b323713ce83e2bd3", + "smartAPI_ID": "8f08d1446e0bb9c2b323713ce83e2bd3", "TRAPI": true, "edges": [ { diff --git a/onehop/test_triples/KP/Service_Provider/MyGene.info_API.json b/onehop/test_triples/KP/Service_Provider/MyGene.info_API.json index f07f637..d302405 100644 --- a/onehop/test_triples/KP/Service_Provider/MyGene.info_API.json +++ b/onehop/test_triples/KP/Service_Provider/MyGene.info_API.json @@ -1,6 +1,6 @@ { "url": "https://smart-api.info/ui/dc91716f44207d2e1287c727f281d339#/1.0.0/querySmartAPI", - "myChem_smartAPI_ID": "59dce17363dce279d389100834e43648", + "smartAPI_ID": "59dce17363dce279d389100834e43648", "TRAPI": true, "edges": [ { diff --git a/onehop/test_triples/KP/Service_Provider/Ontology_Lookup_Service_API.json b/onehop/test_triples/KP/Service_Provider/Ontology_Lookup_Service_API.json index 279a3cf..0976871 100644 --- a/onehop/test_triples/KP/Service_Provider/Ontology_Lookup_Service_API.json +++ b/onehop/test_triples/KP/Service_Provider/Ontology_Lookup_Service_API.json @@ -1,6 +1,6 @@ { "url": "https://smart-api.info/ui/dc91716f44207d2e1287c727f281d339#/1.0.0/querySmartAPI", - "myChem_smartAPI_ID": "1c056ffc7ed0dd1229e71c4752239465", + "smartAPI_ID": "1c056ffc7ed0dd1229e71c4752239465", "TRAPI": true, "edges": [ { diff --git a/onehop/test_triples/KP/Service_Provider/OpenTarget_API.json b/onehop/test_triples/KP/Service_Provider/OpenTarget_API.json index e6f3b9f..9bff47c 100644 --- a/onehop/test_triples/KP/Service_Provider/OpenTarget_API.json +++ b/onehop/test_triples/KP/Service_Provider/OpenTarget_API.json @@ -1,6 +1,6 @@ { "url": "https://smart-api.info/ui/dc91716f44207d2e1287c727f281d339#/1.0.0/querySmartAPI", - "myChem_smartAPI_ID": "542ba165e1b4227854cf7c0a8addcc79", + "smartAPI_ID": "542ba165e1b4227854cf7c0a8addcc79", "TRAPI": true, "edges": [ { diff --git a/onehop/test_triples/KP/Service_Provider/mydisease.info_API.json b/onehop/test_triples/KP/Service_Provider/mydisease.info_API.json index 3410659..55ad58f 100644 --- a/onehop/test_triples/KP/Service_Provider/mydisease.info_API.json +++ b/onehop/test_triples/KP/Service_Provider/mydisease.info_API.json @@ -1,6 +1,6 @@ { "url": "https://smart-api.info/ui/dc91716f44207d2e1287c727f281d339#/1.0.0/querySmartAPI", - "myChem_smartAPI_ID": "671b45c0301c8624abbd26ae78449ca2", + "smartAPI_ID": "671b45c0301c8624abbd26ae78449ca2", "TRAPI": true, "edges": [ { From 5ebac82c3dffbcdbb51c1854673cdf05b37d5339 Mon Sep 17 00:00:00 2001 From: Colleen Xu Date: Thu, 25 Mar 2021 22:13:51 -0700 Subject: [PATCH 3/4] add changes, notes on current BTE TRAPI behavior with MyGene --- .../KP/Service_Provider/MyGene.info_API.json | 12 +++---- .../KP/Service_Provider/mygene_README.md | 33 +++++++++---------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/onehop/test_triples/KP/Service_Provider/MyGene.info_API.json b/onehop/test_triples/KP/Service_Provider/MyGene.info_API.json index ba408ad..4ad66dc 100644 --- a/onehop/test_triples/KP/Service_Provider/MyGene.info_API.json +++ b/onehop/test_triples/KP/Service_Provider/MyGene.info_API.json @@ -13,8 +13,8 @@ "subject_category": "biolink:MolecularActivity", "object_category": "biolink:Gene", "predicate": "biolink:enabled_by", - "subject": "GO:0046872", - "object": "NCBIGENE:10101" + "subject": "GO:0008147", + "object": "NCBIGENE:4256" }, { "subject_category": "biolink:Gene", @@ -27,8 +27,8 @@ "subject_category": "biolink:BiologicalProcess", "object_category": "biolink:Gene", "predicate": "biolink:has_participant", - "subject": "GO:0002098", - "object": "NCBIGENE:285381" + "subject": "GO:0043610", + "object": "NCBIGENE:2475" }, { "subject_category": "biolink:Gene", @@ -41,8 +41,8 @@ "subject_category": "biolink:CellularComponent", "object_category": "biolink:Gene", "predicate": "biolink:expresses", - "subject": "GO:0005654", - "object": "NCBIGENE:285381" + "subject": "GO:0033268", + "object": "NCBIGENE:6326" }, { "subject_category": "biolink:Gene", diff --git a/onehop/test_triples/KP/Service_Provider/mygene_README.md b/onehop/test_triples/KP/Service_Provider/mygene_README.md index f286ed9..bc1061a 100644 --- a/onehop/test_triples/KP/Service_Provider/mygene_README.md +++ b/onehop/test_triples/KP/Service_Provider/mygene_README.md @@ -12,18 +12,18 @@ go.MF.id: "GO:0046872" ``` -2. For MolecularActivity -> Gene: Use the following info to query using the GO ID for metal ion binding +2. For MolecularActivity -> Gene: Use the following info to query using the GO ID for structural constituent of bone ``` fields: entrezgene species: human requestBody: - q: "GO:0046872" + q: "GO:0008147" scopes: go.MF.id size: 1000 ``` -One of the answers should be NUBP2, which has +One of the answers should be MGP, which has ``` -entrezgene: 10101 +entrezgene: 4256 ``` @@ -41,18 +41,18 @@ go.BP.id: "GO:0002098" ``` -4. For BiologicalProcess -> Gene: Use the following info to query using the GO ID for tRNA wobble uridine modification +4. For BiologicalProcess -> Gene: Use the following info to query using the GO ID for regulation of carbohydrate utilization ``` fields: entrezgene species: human requestBody: - q: "GO:0002098" + q: "GO:0043610" scopes: go.BP.id size: 1000 ``` -One of the answers should be DPH3, which has +One of the answers should be MTOR, which has ``` -entrezgene: 285381 +entrezgene: 2475 ``` @@ -70,18 +70,18 @@ go.CC.id: "GO:0005654" ``` -6. For CellularComponent -> Gene: Use the following info to query using the GO ID for nucleoplasm +6. For CellularComponent -> Gene: Use the following info to query using the GO ID for node of Ranvier ``` fields: entrezgene species: human requestBody: - q: "GO:0005654" + q: "GO:0033268" scopes: go.CC.id size: 1000 ``` -One of the answers should be DPH3, which has +One of the answers should be SCN2A, which has ``` -entrezgene: 285381 +entrezgene: 6326 ``` @@ -100,7 +100,6 @@ pathway.reactome.id: "R-HSA-5358493" 8. For Pathway -> Gene: Use the following info to query using the REACT ID for Branched-chain amino acid catabolism -Note: The BTE TRAPI interface seems to have issues getting this result. ``` fields: entrezgene species: human @@ -115,7 +114,7 @@ entrezgene: 9673 ``` -9. For Gene -> Transcript: Use the following info to query using the ENSEMBL ID for KPNA5 +9. For Gene -> Transcript: Use the following info to query using the ENSEMBL ID for KPNA5. Note BTE TRAPI endpoint for one API seems to have issues returning all of the expected results. ``` fields: ensembl.transcript species: human @@ -129,7 +128,7 @@ ensembl.transcript: ENST00000413340 ``` -9. For Gene -> Protein: Use the following info to query using the ENSEMBL ID for KPNA5 +9. For Gene -> Protein: Use the following info to query using the ENSEMBL ID for KPNA5. Note BTE TRAPI endpoint for one API seems to have issues returning all of the expected results. ``` fields: ensembl.protein species: human @@ -144,7 +143,7 @@ ensembl.protein: ENSP00000396791 10. For Protein -> Gene: Use the following info to query using the UNIPROTKB ID for KPNA5 -Note: The BTE TRAPI interface seems to have issues getting this result. +Note: The BTE TRAPI endpoint for one API is currently having issues successfully returning results. ``` fields: ensembl.gene species: human @@ -158,7 +157,7 @@ ensembl.gene: ENSG00000196911 ``` -11. For Gene -(homologous_to)-> Gene: Use the following info to query using the NCBIGENE ID for KCMF1 +11. For Gene -(homologous_to)-> Gene: Use the following info to query using the NCBIGENE ID for KCMF1. The x-bte extension currently isn't written to do the inverse operation (MGI in mice -> NCBIGENE in humans). ``` fields: pantherdb.ortholog requestBody: From ee84805bdf529f5de1b76ccc2070b887d61d3cd8 Mon Sep 17 00:00:00 2001 From: Colleen Xu Date: Tue, 6 Apr 2021 15:28:22 -0700 Subject: [PATCH 4/4] update urls, phenotype_of predicate for mydisease phenotypicFeature -> Disease --- onehop/test_triples/KP/Service_Provider/MyChem.info_API.json | 3 +-- onehop/test_triples/KP/Service_Provider/MyGene.info_API.json | 3 +-- .../KP/Service_Provider/Ontology_Lookup_Service_API.json | 3 +-- onehop/test_triples/KP/Service_Provider/OpenTarget_API.json | 3 +-- onehop/test_triples/KP/Service_Provider/OpenTarget_README.md | 4 +++- onehop/test_triples/KP/Service_Provider/README.md | 2 +- .../test_triples/KP/Service_Provider/mydisease.info_API.json | 5 ++--- 7 files changed, 10 insertions(+), 13 deletions(-) diff --git a/onehop/test_triples/KP/Service_Provider/MyChem.info_API.json b/onehop/test_triples/KP/Service_Provider/MyChem.info_API.json index 659ae64..2e802ed 100644 --- a/onehop/test_triples/KP/Service_Provider/MyChem.info_API.json +++ b/onehop/test_triples/KP/Service_Provider/MyChem.info_API.json @@ -1,6 +1,5 @@ { - "url": "https://smart-api.info/ui/dc91716f44207d2e1287c727f281d339#/1.0.0/querySmartAPI", - "smartAPI_ID": "8f08d1446e0bb9c2b323713ce83e2bd3", + "url": "https://api.bte.ncats.io/v1/smartapi/8f08d1446e0bb9c2b323713ce83e2bd3/query", "TRAPI": true, "edges": [ { diff --git a/onehop/test_triples/KP/Service_Provider/MyGene.info_API.json b/onehop/test_triples/KP/Service_Provider/MyGene.info_API.json index e72107a..5f75e7f 100644 --- a/onehop/test_triples/KP/Service_Provider/MyGene.info_API.json +++ b/onehop/test_triples/KP/Service_Provider/MyGene.info_API.json @@ -1,6 +1,5 @@ { - "url": "https://smart-api.info/ui/dc91716f44207d2e1287c727f281d339#/1.0.0/querySmartAPI", - "smartAPI_ID": "59dce17363dce279d389100834e43648", + "url": "https://api.bte.ncats.io/v1/smartapi/59dce17363dce279d389100834e43648/query", "TRAPI": true, "edges": [ { diff --git a/onehop/test_triples/KP/Service_Provider/Ontology_Lookup_Service_API.json b/onehop/test_triples/KP/Service_Provider/Ontology_Lookup_Service_API.json index 0976871..1f86de7 100644 --- a/onehop/test_triples/KP/Service_Provider/Ontology_Lookup_Service_API.json +++ b/onehop/test_triples/KP/Service_Provider/Ontology_Lookup_Service_API.json @@ -1,6 +1,5 @@ { - "url": "https://smart-api.info/ui/dc91716f44207d2e1287c727f281d339#/1.0.0/querySmartAPI", - "smartAPI_ID": "1c056ffc7ed0dd1229e71c4752239465", + "url": "https://api.bte.ncats.io/v1/smartapi/1c056ffc7ed0dd1229e71c4752239465/query", "TRAPI": true, "edges": [ { diff --git a/onehop/test_triples/KP/Service_Provider/OpenTarget_API.json b/onehop/test_triples/KP/Service_Provider/OpenTarget_API.json index 9bff47c..0229717 100644 --- a/onehop/test_triples/KP/Service_Provider/OpenTarget_API.json +++ b/onehop/test_triples/KP/Service_Provider/OpenTarget_API.json @@ -1,6 +1,5 @@ { - "url": "https://smart-api.info/ui/dc91716f44207d2e1287c727f281d339#/1.0.0/querySmartAPI", - "smartAPI_ID": "542ba165e1b4227854cf7c0a8addcc79", + "url": "https://api.bte.ncats.io/v1/smartapi/542ba165e1b4227854cf7c0a8addcc79/query", "TRAPI": true, "edges": [ { diff --git a/onehop/test_triples/KP/Service_Provider/OpenTarget_README.md b/onehop/test_triples/KP/Service_Provider/OpenTarget_README.md index cd8442c..a7248b9 100644 --- a/onehop/test_triples/KP/Service_Provider/OpenTarget_README.md +++ b/onehop/test_triples/KP/Service_Provider/OpenTarget_README.md @@ -10,4 +10,6 @@ parameters: One of the answers should be EVEROLIMUS, which has ``` data.drug.id: "http://identifiers.org/chembl.compound/CHEMBL1908360" -``` \ No newline at end of file +``` + +Note: BTE TRAPI is currently having an issue. The raw output of this API is very redundant, and it seems that this is causing issues with the results section of the response (nodes and edges are fine). \ No newline at end of file diff --git a/onehop/test_triples/KP/Service_Provider/README.md b/onehop/test_triples/KP/Service_Provider/README.md index cb4d429..88ec2d7 100644 --- a/onehop/test_triples/KP/Service_Provider/README.md +++ b/onehop/test_triples/KP/Service_Provider/README.md @@ -1,4 +1,4 @@ -The JSON files assume that these APIs will be queried through BTE's TRAPI endpoint for querying individual SmartAPIs. They therefore include the url for the BTE endpoint, and the SmartAPI ID for the actual SmartAPI. The edge to the answer/object node should have an "api" attribute, with the name of the SmartAPI as the value. +The JSON files assume that these APIs will be queried through BTE's TRAPI endpoint for querying individual SmartAPIs (accessible through the URLs provided). Notes: - tests are also described as queries that can be made directly to the API, in the additional README files. Notice that many API endpoints do not handle curies (ID prefixes) or predicates. The format of these queries is specified by the x-bte-annotated endpoint in the SmartAPI registry file. diff --git a/onehop/test_triples/KP/Service_Provider/mydisease.info_API.json b/onehop/test_triples/KP/Service_Provider/mydisease.info_API.json index 55ad58f..c004cca 100644 --- a/onehop/test_triples/KP/Service_Provider/mydisease.info_API.json +++ b/onehop/test_triples/KP/Service_Provider/mydisease.info_API.json @@ -1,6 +1,5 @@ { - "url": "https://smart-api.info/ui/dc91716f44207d2e1287c727f281d339#/1.0.0/querySmartAPI", - "smartAPI_ID": "671b45c0301c8624abbd26ae78449ca2", + "url": "https://api.bte.ncats.io/v1/smartapi/671b45c0301c8624abbd26ae78449ca2/query", "TRAPI": true, "edges": [ { @@ -48,7 +47,7 @@ { "subject_category": "biolink:PhenotypicFeature", "object_category": "biolink:Disease", - "predicate": "biolink:related_to", + "predicate": "biolink:phenotype_of", "subject": "HP:0000224", "object": "MONDO:0012107" },