Closed colleenXu closed 1 year ago
My suggestion for biothings APIs is that IDs don't have prefixes whenever possible (use the field/key name to say what kind of ID it is). Because the prefix spellings are different inside and outside of Translator, and Translator changes their desired spellings fairly often...
Hmmm....
For a biothings API (dgidb) and NCBIGene and CHEMBL.COMPOUND IDs, BTE seemed fine when given curies (prefixed-ids)...
EDIT: also seemed fine for another biothings api (idisk) and UMLS IDs
From lab meeting:
@colleenXu I was looking into this issue and it looks like the api-response-transform
module can handle both prefixed and non-prefixed IDs already (https://github.com/biothings/api-respone-transform.js/blob/main/src/utils.ts#L1-L9). Is there something I am misunderstanding or missing?
Hmmm...I think there may be issues when the ID-prefix is not something that BTE recognizes / knows how to process? For example, if the prefix isn't the format that Translator expects (chembl_compound vs CHEMBL.COMPOUND) or a prefix that has been in Translator for a while with consensus on how to use it (HMS_LINCS_ID comes to mind...)
However, I'd be open to closing this issue for now if things are seeming fine so far...
Closing for now, haven't seen issues and if they come up, they can be addressed with the templating method or upcoming jq method
Currently we need to write custom transformers to take the raw api responses from APIs (sub-queried) and get a standard format ("records").
However, there's likely an issue with this process regarding biothings APIs (core MyGene, etc and pending apis).
The request: A dev needs to look into stuff, maybe starting here: https://github.com/biothings/api-respone-transform.js/blob/main/src/transformers/biothings_transformer.ts ....and check that the assumptions below are correct. If the assumptions below are correct, we will want to discuss refactoring to untangle / remove code that's based on these assumptions...
I've been assuming that BTE will not correctly process output IDs when...:
This is causing issues for new developers making biothings apis, because it's unclear whether they need to follow the previous convention of having specific prefix spellings for some IDs and having no prefixes on other IDs