OpenTreeOfLife / treemachine

Source tree graph database
Other
16 stars 6 forks source link

Display more than 3 levels if not too many tips #232

Open bredelings opened 7 years ago

bredelings commented 7 years ago

It would be nice to display more levels than 3 in cases like this:

https://tree.opentreeoflife.org/opentree/argus/opentree8.0@mrcaott246ott5272/Phaethontidae--Passeriformes

A simple approach might be to have the depth be equal to max(M, largest depth with < N) children.

M=3, N=0 gives current behavior. It seems like M=3, N=200 would be strictly an improvement on current behavior.

bredelings commented 7 years ago

Concern #1: it could be confusing why different depths are displayed for different nodes. (Thanks to Jim)

bredelings commented 7 years ago

Suggestion #2: "I think we should just fix the number of tips (maybe user controllable) and show trees with that many tips. with sampling and/or ellipses, as needed." (Thanks to JAR)

josephwb commented 7 years ago

I'm waiting for a concrete agreed-upon plan before I move forward with implementing this.

kcranston commented 7 years ago

Also need to think about how this will affect the behaviour and documentation of the public API call for subtree. Current default behaviour:

Before deciding on changes to treemachine, I wonder about testing the effect on the visualization on dev by modifiying the opentree code to:

jimallman commented 7 years ago

Also need to think about how this will affect the behaviour and documentation of the public API call for subtree.

Yes, that's an interesting distinction. If the reason for the new behavior is to increase legibility and manage crowding in the arguson view, maybe we just want the web app to fine-tune its requests. (Do we know of other arguson use cases with different priorities?)

When clicking a node in the current arguson view this should be pretty straightforward, since we now get num_tips for each node in the current arguson view. Hm, I suppose the initial arguson view would need to be use kind of flag to trigger smarter behavior from tree_of_life/subtree.

josephwb commented 7 years ago

Yes, the point about subtree is a good one. Perhaps we should separate these again? It is already a bit clunky to support both with one function.