-
Notifications
You must be signed in to change notification settings - Fork 3
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
synth node mrca labels not returned #111
Comments
I seem to remember this bug showing up once (at least) before. @bredelings do you recall that? |
I just logged on to the server and checked the raw otcetera call and the call through ws_wrapper. The bug is present in both, so I think this is an otcetera issue not a ws_wrapper issue. |
or perhaps those labels are from propinquity. That is another possibility... |
Or possibly those labels are only added to the tree if you ask for arguson? |
They are in the newick example of the docs https://github.com/OpenTreeOfLife/germinator/wiki/Synthetic-tree-API-v3#subtree_tree |
Looking at the source code, this functionality is disabled by default but you can get the internal node labels by adding
See Line 354 in 2b5ff72
Also, we have this fun comment:
|
Perhaps the least intrusive change would be to document the |
Here's a previous discussion of this: OpenTreeOfLife/treemachine#205 |
And here is the code in ws-tests that checks that we do NOT include internal node labels by default. https://github.com/OpenTreeOfLife/treemachine/blob/master/ws-tests/test_subtree.py |
Ah super helpful! Thanks. Should we change the default to True, or update the docs to show argument and default is False and correct the example output? |
hmm. I'd say that we should definitely pass the |
I have a guess that it was changed to not include internal node labels because when label_format = 'name' a bunch of internal node labels have parens in them. Which, as discussed in various other issues I can't find right now, is legal newick, but that many treeviewers cannot cope with. (e.g. https://tree.opentreeoflife.org/taxonomy/browse?id=996421 for a label with several characters that can cause issues) .There are a few tips with that issue as well, but way fewer. |
Which is to say, I think setting the default to False and updating the docs makes sense. I have been contemplating suggesting that we don't include parens in taxon labels, but that seems like a whole PITA. Any they should be allowed anyways! It is the tree viewers who are wrong! |
I think my theory is wrong anyhow - because even when include_all_node_labels = False, named taxa are still included in internal node labels, just the mrca labels are not So the label string problems are not solved anyhow. Edited to add: Example from user issue https://gitter.im/OpenTreeOfLife/public?at=61ca3aafe1a1264f0a2adde9 |
We could also switch the default for v4. It seems like switching the default for v3 basically depends on whether we think any existing software that isn't expecting internal node names would break if we added them. I have no reason to think there are newick parsers that can't handle internal node names... and yet the badness of newick parsers seems to be unbounded below. It kind of seems like a judgement call. |
I put it on the agenda to discuss at our next dev meeting! |
I will update documentation to reflect current behavior. |
OK, new branch with 1-line fix: default-include-node-labels |
https://github.com/OpenTreeOfLife/germinator/wiki/Synthetic-tree-API-v3#subtree-tree-of-life
The expected return of this call
curl -X POST https://api.opentreeoflife.org/v3/tree_of_life/subtree -H "content-type:application/json" -d '{"node_id":"ott803675"}'
shows the synth mrca node labels - but those don't seem to be returned anymore.
I was planning to use them to link dates from studies to synth subtrees.
The text was updated successfully, but these errors were encountered: