Skip to content
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

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

Closed
lpalbou opened this issue Mar 18, 2020 · 9 comments
Closed

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

lpalbou opened this issue Mar 18, 2020 · 9 comments
Assignees

Comments

@lpalbou
Copy link
Contributor

lpalbou commented Mar 18, 2020

Task requirement from Noctua Landing Page Project

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

@goodb
Copy link
Contributor

goodb commented Mar 21, 2020

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

goodb added a commit that referenced this issue Mar 22, 2020
e.g. :6800/taxa/

returns {"taxa":["NCBITaxon:9606","NCBITaxon:7955","NCBITaxon:6239","NCBITaxon:559292"]}

note its a different root from /search/  its /taxa/
@goodb
Copy link
Contributor

goodb commented Mar 25, 2020

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

@lpalbou
Copy link
Contributor Author

lpalbou commented Mar 26, 2020

@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
Copy link
Contributor Author

lpalbou commented Mar 26, 2020

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
Copy link
Contributor

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

goodb added a commit that referenced this issue Mar 28, 2020
{
  "taxa": [
    {
      "id": "NCBITaxon:559292",
      "label": "Saccharomyces cerevisiae S288C"
    },
    {
      "id": "NCBITaxon:7955",
      "label": "Danio rerio"
    },
    {
      "id": "NCBITaxon:9606",
      "label": "Homo sapiens"
    },
    {
      "id": "NCBITaxon:6239",
      "label": "Caenorhabditis elegans"
    }
  ]
}
@goodb goodb closed this as completed Apr 18, 2020
@tmushayahama
Copy link
Contributor

@goodb lovely, thanx

@tmushayahama
Copy link
Contributor

tmushayahama commented Apr 22, 2020

@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 tmushayahama reopened this Apr 22, 2020
@tmushayahama
Copy link
Contributor

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
Copy link
Member

kltm commented Apr 22, 2020

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants