auspice icon indicating copy to clipboard operation
auspice copied to clipboard

Narratives cannot zoom to selected (tree panel)

Open jameshadfield opened this issue 4 years ago • 4 comments

Context

Auspice 2.21.0 introduced a "zoom to selected" button (via PR 1257. This allows filtered trees to be zoomed to the subtree containing all the selected ("visible") tips. This zooming requires user-interaction by clicking the "zoom to selected" button above the tree.

Clicking this button does not currently update the URL, however it should. Because it does not modify the URL query, narratives cannot use this functionality.

Description
A test narrative has been added on branch bug-narratives-zoom-to-selected which introduces the problem and proposes a solution. To view this narrative:

git fetch && git checkout bug-narratives-zoom-to-selected
npm run get-data
auspice develop --narrativeDir narratives
# open http://localhost:4000/narratives/test/zoom-to-selected

Possible solution

Add ?treeZoom=selected to URL query. See narrative above for more details.

jameshadfield avatar Feb 11 '21 02:02 jameshadfield

I have a use case for this functionality. I was able to get it to work on a local auspice install using the feature branch. Is there any way to get it to work on a community build/when might the feature be merged into master?

poisedleft avatar Jun 18 '21 03:06 poisedleft

@poisedleft absolutely! PR #1321 solves this, but it's not perfect (and hasn't been merged) so I would be interested in seeing your solution. It would be nice to get this functionality in.

jameshadfield avatar Jun 18 '21 04:06 jameshadfield

Ok, this was working.. and now it's broken again (doesn't zoom). I think that's an issue with me running different auspice installs in different conda environments on the same box.. making a new environment worked before. But the narrative/data should be fine (though side question.. is this bugfix associated with a particular version number, so I can verify this?)

I ran from this branch.. it basically just has the narrative narratives/haiti_narrative.md and the data in haiti_data/ . Or if it's easier the same files are attached.

It would be great if this change can be merged into master. It's definitely not perfect.. notably, in order to zoom into a particular clade I had to manually define the relevant mutations. But I'm not sure how I would have done the presentation without it. I'm sharing some of this with people sooner rather than later, so the best way in the meantime is to spin up and expose my own server?

I've got other questions about both the data and the pipeline, but I'll ask them on the discussion board. Thanks for the bug-fix!

ncov_haiti_build_tip-frequencies.json.gz haiti_narrative.md.gz ncov_haiti_build.json.gz ncov_haiti_build_root-sequence.json.gz

poisedleft avatar Jun 18 '21 23:06 poisedleft

Ah.. so I did figure out how to zoom into a clade (instead of just selecting it).. that makes things useable, though the zoom is still better for some situations.

poisedleft avatar Jun 19 '21 07:06 poisedleft