Closed gaurav closed 2 years ago
Kara found a nice test query for this at https://github.com/NCATSTranslator/testing/issues/233#issuecomment-1281649816
It might be useful to also have it report any RDF predicates that exist for that node, but don't have adequate Biolink mappings. Then we'll know where we need to work on mappings.
When debugging a query (e.g. #284), it can be difficult to figure out whether there is an error in CAM-KP-API itself or in the underlying database. It would be helpful to add an API endpoint for identifier-based lookups. I'm imagining a simple RESTful API such as:
/lookup/?subject=http://identifiers.org/ncbigene/1956&predicate=https://w3id.org/biolink/vocab/decreases_amount_or_activity_of&object_category=https://w3id.org/biolink/vocab/ChemicalSubstance
: return everything we know about NCBIGene:1956 biolink:decreases_amount_or_activity_of of any biolink:ChemicalSubstance./lookup/NCBIGene:1956
: return everything we know about NCBIGene:1956/lookup/NCBIGene:1956/biolink:decreases_amount_or_activity_of
: return everything we know NCBIGene:1956 decreases amount or activity of.Since this API will side-step the TRAPI processing code, we can use it to determine exactly what the backend triplestore knows about the queried identifier in a way that is easier to use than querying the triplestore directly.