OpenTreeOfLife / taxomachine

taxonomy graphdb
Other
7 stars 4 forks source link

list_terminal_descendants not working #89

Closed mtholder closed 8 years ago

mtholder commented 9 years ago

I get the the same response from:

curl -X POST -H "Content-Type":"application/json" -H "Accept":"application/json" http://devapi.opentreeoflife.org/v2/taxonomy/taxon --data '{"include_lineage": true, "list_terminal_descendants": true, "ott_id": 5554385}' 

and

curl -X POST -H "Content-Type":"application/json" -H "Accept":"application/json" http://devapi.opentreeoflife.org/v2/taxonomy/taxon --data '{"include_lineage": true, "list_terminal_descendants": false, "ott_id": 5554385}'

Neither includes a terminal descendant. Note that this ott ID is the parent of the species 5556774

mtholder commented 9 years ago

note that the check for the setting is a null op: https://github.com/OpenTreeOfLife/taxomachine/blob/master/src/main/java/org/opentree/taxonomy/plugins/taxonomy.java#L184-L186

so it looks like this was never implemented

snacktavish commented 9 years ago

Ah, I just ran into this as well, and went to open an issue, but instead I'll nudge this one. It would be quite useful functionality to have, but if it isn't going to be implemented we should remove it from https://github.com/OpenTreeOfLife/opentree/wiki/Open-Tree-of-Life-APIs#taxon

pmidford commented 9 years ago

Should be resolved with pull request 103. Note that the particular taxon in @mtholder's example is not in ott2.9, but these work for the child species (5556774), it lists itself as terminal.

chinchliff commented 8 years ago

I just tried this and it worked for me... Has it been fixed?

curl -X POST https://api.opentreeoflife.org/v2/taxonomy/taxon -H 'content-type:application/json' -d '{"ott_id":515698,"list_terminal_descendants":true}'

produces:

{
  "tax_sources" : [ "ncbi:4237", "gbif:3105285", "irmng:1046392" ],
  "unique_name" : "",
  "ot:ottId" : 515698,
  "synonyms" : [ "Barnadesia", "Barnadesia Mutis" ],
  "flags" : [ ],
  "terminal_descendants" : [ 13308, 124782, 503045, 503043, 503052, 503062, 1084322, 1084324, 503058, 503056, 503066, 503064, 515696, 825484 ],
  "rank" : "genus",
  "ot:ottTaxonName" : "Barnadesia",
  "node_id" : 3472412
}
jar398 commented 8 years ago

Peter said previously it had been fixed, and I will take your comment as confirmation and close the issue. Thanks