-
Notifications
You must be signed in to change notification settings - Fork 162
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
Add button to zoom tree to visible tips #1132
Comments
I like this proposal very much! Non-monophyletic is our generic use-case: after selecting all samples in some location + time window, we get groups scattered around the tree whose common ancestor is usually the root. If the accordion is compressed enough, we may get much of the benefit of exploded trees showing all the groups at once without having to fully hide the contextual nodes. It will be important to be able to select nodes with option+rectangle, so we can zoom to a group of nodes which is currently difficult to select on the Here's an example of a selection which might be an interesting test case: select all CA and then ZOOM. Notice afterwards a group of samples in the bottom I want to see closer, and ZOOM again (orange rectangle). Terminology: might ZOOM TO SELECTED by more accurate? (The branches without terminal nodes still look visible to me, but this may not comport with the terminology in use on the backend.) |
I think most people are familiar with the "select to zoom" interaction (ie, plotly). It's simple and intuitive. |
Why was the If the idea is to start with zoom-to-filtered-items, and then use that code to handle a zoom-to-selection, that makes sense to me. They can be separate issues, with one dependent on the other. I think you could use the "zoom-to-selected" terminology for both of these operations; the mouse-drag selection, in that case, is really just a custom "filter" where the criteria for filter are "had x and y positions inside this bounding box." |
I am trying out a few things along these lines. First, I need to make a simplified build with only the tree running in React. Auspice is a big complicated project. If I can improve the tree on its own, then we can find a way to fit the changes into the complete build. @jameshadfield James, do you have a trimmed build for when you are working on the tree? I am several steps down this path already. |
@trvrb blab/sars-like-cov seems a bit more usable at first glance. Is this mostly due to having a smaller amount of data? I would like an overview of the differences compared with the Auspice project please |
Thanks for looking into things @rleir. The tree at https://nextstrain.org/groups/blab/sars-like-cov / https://nextstrain-blab.s3.amazonaws.com/sars-like-cov.json is pretty small, though I often work with https://nextstrain.org/zika / http://data.nextstrain.org/zika.json if I want a smaller test case to experiment with. |
Should this issue be closed now? Zoom to selected seems to be implemented now in the way @trvrb intended with this issue. |
Perhaps the issue can be closed and we can make a new more targeted issue. The current implementation is 80% of the way there. We do have issues with zooming into some clades and an "accordion-style" zoom would be really nice for situations where tips from multiple clades are selected. I'll close this issue and plan to make a new one that addresses the updated needs. |
Context
Currently, there are two primary ways to interact with the tree:
There is often a user desire to filter (or otherwise subset) to a portion of the available samples and "zoom" into this subset in the tree.
Description
I propose adding a button to the tree panel titled "ZOOM TO VISIBLE". Clicking this button acts to find the common ancestor of visible tips and initiate a clade zoom for this node.
However, there will situations where a filter subsets to a non-monophyletic (discontinuous) group of tips. In this case, I'd recommend that this "zoom" also compress y-values surrounding non-visible tips. @jameshadfield previously implemented this "accordion" style zoom in the branch
js-y-vals
. Here's an example of this compression:Here, I'd still take the minimum and maximum y values as the min/max of the selected tips, but in between this min/max non-visible tips would be compressed.
The entire tree would be restored by clicking on "RESET LAYOUT" as is behavior for clade zoom.
This direction sets us up to have a box-selection option (say hold down option while dragging over the tree) that could select a user-specified region and followed with "ZOOM TO VISIBLE". I believe this would solve @batson's original issue, but would add significant flexibility by interacting through visible nodes rather than a direct tree operation.
What do folks think about this proprosal?
The text was updated successfully, but these errors were encountered: