Closed colleenXu closed 1 year ago
Note that COHD's dev instance seems to be on TRAPI 1.4 (we can access it through the registration we currently use, but they also registered a separate yaml for TRAPI 1.4)
However, I haven't checked their /query
responses to see if they are providing provenance as we expect, and whether we can use it to develop and test our code for this issue...
From my post here: https://github.com/biothings/biothings_explorer/issues/597#issuecomment-1502686927
For the multiomics / text-mining KP stuff:
I'm wondering, do we always want to add the resource ID as infores:biothings-explorer
? That makes sense for the ARA-endpoints. but for the team-specific / api-specific endpoints, maybe it makes sense to add the resource ID as infores:service-provider-trapi
...
Note that the post above is related to this, and it looks like we haven't done the infores:service-provider-trapi
handling yet
Pasting my Translator Slack message to Multiomics / Text-Mining KPs below
BTE's dev instance now has support for TRAPI 1.4 provenance (aka the sources section on Edges).
If your BioThings API includes TRAPI 1.4 sources data, the following is needed to hook this up with BTE:
make a branch or fork of the SmartAPI yaml registered for your API
edit each operation:
- In the
parameters.fields
: the JSON-notation-paths listed here (string that's comma-delimited) should cover the sources data field. This part of the query to BioThings APIs specifies what parts of the record to return in the response- Ex: if the sources data was in
association.sources
, this would workparameters: fields: object.MONDO,association.edge_attributes,association.sources
edit each entry in the
x-bte-response-mapping
section: add a key-value pair. The key istrapi_sources
and the value is the JSON-notation-path to the sources data. BTE will recognize this key and handle the data in the field specified appropriately
- Ex:
x-bte-response-mapping: mondo-object: MONDO: object.MONDO edge-attributes: association.edge_attributes trapi_sources: association.sources
let me know. I'll be writing a SmartAPI-overrides file so BTE will use these TRAPI 1.4-specific files to retrieve the sources data and handle it appropriately. Once this SmartAPI-overrides file is deployed on BTE's dev instance, the changes will go live <=10 min later
[Update in progress 2023-06-01 evening]
We'll be using temporary SmartAPI overrides (currently on main) to direct BTE to query for and ingest the TRAPI 1.4 sources data from Multiomics/Text-Mining KPs.
The override now contains links for all 4 KPs.
However, these KPs' x-bte annotation are at different states, for their registered yamls (staying at TRAPI 1.3 and used by BTE prod) and the override yamls (with the changes for TRAPI 1.4 sources data and used by all other BTE instances).
Recording info on hooking BTE up to TRAPI 1.4 KPs in https://github.com/biothings/biothings_explorer/issues/614#issuecomment-1543422889
Other notes:
upstream_resource_ids
field from the TRAPI spec[as of 2023-07-13 evening]
We're preparing to move all BTE instances to TRAPI 1.4, which will involve removing the SmartAPI overrides and updating the registered yamls.
Closing as complete. Any future problems with provenance (further/alternate support for KPs, bugs, etc.) can be tracked in future issues.
Background
Overview
Text-Mining KP and some Multiomics KPs
We will expect Text-Mining KP and some Multiomics KPs (ClinicalTrials, BIGGIM-drug-response) BioThings KP APIs to...
edge.sources
data in a separate fieldassociation.sources
of each record (likeassociation.edge-attributes
and edge-attribute data...)Then we will...
trapi_sources: association.sources
example:
TRAPI KPs
We will expect TRAPI KP edges to have a
sources
property on their edges already. We'll then add an element for BTE that references their KP API infores...example: