geneontology / minerva

BSD 3-Clause "New" or "Revised" License
6 stars 8 forks source link

Task 3 - API - add a route to list species #295

Closed lpalbou closed 4 years ago

lpalbou commented 4 years ago

Task requirement from Noctua Landing Page Project

Create a route to list the species currently annotated in the repository.

goodb commented 4 years ago

Confirming that by "currently annotated" you mean "at least one go-cam exists that contains a gene from this species". yes?

goodb commented 4 years ago

https://github.com/geneontology/minerva/wiki/Taxa-list-service

lpalbou commented 4 years ago

@goodb

Confirming that by "currently annotated" you mean "at least one go-cam exists that contains a gene from this species". yes?

Correct. We only want the taxon that have been annotated at least once in a model / go cam

lpalbou commented 4 years ago

The route you provided looks good, could you however provide also the label for each taxon ?

Current response:

{
"taxa":[
"NCBITaxon:4896","NCBITaxon:7227", 
...]
}

Desired:

{
"taxa":[
{ id: "NCBITaxon:4896", label: "Schizosaccharomyces pombe" },
{ id : "NCBITaxon:7227", label: "Drosophila melanogaster" }
...]
}

The idea is that @tmushayahama doesn't need to do a look up to a third party ressource to get that information and display it to the users.

tmushayahama commented 4 years ago

yes @lpalbou the above is correct @goodb will need taxon name to display

Endpoint

api/taxa

Parameters

Parameter Format Comments
no params

Return

A list of Species<taxon_id, taxon_name> and each item has

Parameter Format Comments
taxon_id string A taxon id for search input
taxon_name string A human readable name for searchers
tmushayahama commented 4 years ago

@goodb lovely, thanx

tmushayahama commented 4 years ago

@goodb are we using http://noctua-dev.berkeleybop.org:6800/taxa/ as a permanent url with hard-coded port 6800 in it?

Also, CORS is not enabled on this endpoint, so I am not able to use it. I will go ahead and reopen the issue

tmushayahama commented 4 years ago

Aghh, @goodb my apologies, I just realized eventually, the api will be at http://barista-dev.berkeleybop.org/taxa when dev updated and 6800 was a test server. correct?

kltm commented 4 years ago

@tmushayahama No, there should be no port exposures on production or dev. Whenever somebody is messing around locally, that's something that may happen--it's important to contextualize when somebody shares a URL.