-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add general api endpoint for mapping taxon labels to ids? #391
Comments
I suppose it'd the opposite of the {
"NCBITaxon:10090": "Mus musculus",
"ECO:0000304": "author statement supported by traceable reference used in manual assertion"
} That endpoint is currently GET-only, but I could also have a POST endpoint so that you can submit a larger amount of text to it. I assume the POST version would take a list of strings and return a label->ID dict. Maybe we could call it Also, sure, I can remove the |
Right, it seems like it would be the opposite of that endpoint. And yeah I'd probably need a POST endpoint, because the amount of text could be quite long. So far I've seen cases where I'd need to submit a dozen taxon labels, but I don't know if that's the true max.
The mapping could go the other way too, as long as all the info is there.
I like the clarity of that name. Another option could be to just keep the same
Regarding this, that's your call. But I'd say that if you implement this new endpoint, I'd use it everywhere. I wouldn't want to have extra code that uses |
I prefer to have a separate endpoint, even though I agree that they're pretty complementary functions, so we're not changing too much of the existing interface. On a side note, while looking at the
I ask because it raises a few questions for the new endpoint:
FWIW, the |
Regarding your 3 questions. I dont think it matters to me whether it's Maybe we need someone from TISLab to weigh in, but I'm pretty sure if you give me an exact (but perhaps case insensitive) match, the results will be as expected. Regarding the Another thing to note, one of our stated/agreed-upon goals of this rewrite was to avoid hard-coded and one-off exceptions, because the 2.0 UI is full of them and causes much difficulty. |
Full-text matches it is. Also, I agree that returning the full set of ID results per label is more useful; if you want to match the behavior of the existing
Ah, right, then yeah, I'd be fine dropping it in that case. |
Hmm that is really slow. I kinda threw out that "case-insensitively" very causally, I hope you didn't feel like you had to spend time on it. Case sensitive should be fine, assuming there's no funny business, like the |
In a similar fashion to #386 , the associations endpoints, for example this one, returns taxon facets in terms of labels, but takes taxons facets in terms of ids.
Instead of adding a
_taxon_map
facet to all these different endpoints like in biolink/ontobio#618, perhaps it's better to create a generic endpoint that allows me to map an array of taxon labels to taxon ids in a single query. (I'm sure there's an existing endpoint to map a single label to id, but I'd need to hit that possibly dozens of times at once).I suppose this would also allow us to undo the work in #386 for cleanliness, if that's what you want to do.
The text was updated successfully, but these errors were encountered: