Skip to content
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

be able to select just one condition to show lineplot for #97

Closed
jbloom opened this issue Nov 3, 2024 · 5 comments · Fixed by #98
Closed

be able to select just one condition to show lineplot for #97

jbloom opened this issue Nov 3, 2024 · 5 comments · Fixed by #98

Comments

@jbloom
Copy link

jbloom commented Nov 3, 2024

@WillHannon-MCB, maybe we can discuss this issue in person tomorrow, but briefly:

I am trying to use conditions to show many different antibodies. Here is the example JSON:
prefusion_ab_escape.json

I would like to be able to pick just one antibody at a time to show on the line plot in addition to having them all overlaid with each other. But right now that isn't possible. I can click on them to just shown one on the structure at at time, but not to show just one in the lineplot.

Is it possible to add an option to make what I want possible?

See also the attached image:
Screenshot 2024-11-03 at 12 42 22 PM

@WillHannon-MCB
Copy link
Contributor

Are you talking about something like this?

You can specify which antibodies (conditions) you want on the plot by clicking on the condition in the legend while holding down the option key (option+click). I describe this in the second to last video in the 'Web Tool API' section of the documentation.

@jbloom
Copy link
Author

jbloom commented Nov 5, 2024

OK, that does do what I was hoping, thanks!

Although is there a way to make this more facile? For instance on this plot if I want to show just one antibody I have to option-click on 7 other antibodies which is really slow to do as there is a lag for each one.

I feel like a very valuable feature for our work will be to show mmany antibodies and then just be able to select one (or a few) to show, and the current way makes that quite hard to do that easily.

Would it be possible to brainstorm ways to make this easier?

@jbloom
Copy link
Author

jbloom commented Nov 9, 2024

@WillHannon-MCB, do you have an ETA on how long it will take to implement this? I would like to use dms-viz to present some datasets, but until this is done it is basically unusable so wanted to check.

@WillHannon-MCB
Copy link
Contributor

@jbloom, sorry it's unsuable. There are two separate problems: (1) changing the input events that select conditions to show on the line plot, and (2) figuring out why things are running slowly.

For issue (1), I changed how you select conditions. You can still use option + click to select and deselect, but now, you can also double-click on a condition to show only that condition in the chart. All other conditions are automatically deselected.

Unfortunately, this doesn't fix the lag. When you select a condition, an event is fired that updates the legend, the chart, the protein, the URL state, etc... This happens for every condition that's been clicked. You cannot parallelize client-side (run in the browser) JavaScript. Everything runs sequentially, so one slow step affects the whole application. Some of those slow steps involve libraries like NGL.js that I have no control over. To ameliorate this (2), I added some logic to make the legend update before the rest of the application updates. This address the lag in legend's UI, but it won't make updates in the rest of the application faster.

I am working on making everything faster as a whole, but that requires big changes to the logic and organziation of the code.

@WillHannon-MCB WillHannon-MCB linked a pull request Nov 9, 2024 that will close this issue
@jbloom
Copy link
Author

jbloom commented Nov 10, 2024

@WillHannon-MCB, this is actually great. Just adding the double-click makes a big difference as now even if it is a big slow you can select a dataset with just one command. So I feel like this is actually a big improvement already. The biggest problem was not the lag, but just having to click on say 7 things to deselect them if you just wanted to show one.

So speeding up will be great, but this already makes it much better, thanks!

I do wonder if it might be possible to somehow document this better on the tool, as it is not immediately obvious that double-click and option click do these things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants