IGS/gEAR

refactor compare_datasets.js

Closed this issue · 5 comments

Currently making headway on this. Just thought I'd make a ticket.

Couple notes while they are on my mind

  • Since we have the "aggregations" API end-route, we do not need get_condition_list.cgi
  • Previously, due to the scanpy.tl.rank_genes_groups function, we could not have a union of conditions for the X or Y condition (only when statistical tests were disabled). Fortunately I figured out how to make that work with "rank_genes_groups", so it will make figuring out conditions more straightforward for end-users
  • Using plotly's "editable" config mode to let a user edit their axis labels and plot title right from the plot. Saves real estate over providing options
  • Reusing a lot of curator code. I will probably move all server-side calls to common.v2.js
  • While I followed the College Park suggestions for the rewrite, I am still deviating some. Mostly in the condition selection area.

code is committed and deployed on gear-devel

Comments for compare tool. Feel free to take into consideration/ignore any comments you don't think are useful or able to be implemented, just my two cents from a pass at using the tool:

  • The clear selection box could be placed closer to the genes selected box, maybe right under it? I didn't notice it at first since the screen wasn't scrolled all the way down.
  • You can add 'Please select a gene' to the genes selected list by clicking on it in the dropdown
  • Might just be a devel thing but hitting clear selection for the genes seems like it takes a while to run
  • On view and save genes you can only select weighted gene cart even if you have genes selected
  • Any way to keep custom axis titles if you click back to 'edit plot'?
  • What 'viewing' is occuring with the view and save genes button? Should this just be 'Save genes to cart'?
  • In the gene collection box the dropdowns refer to gene carts instead of collection
  • If all genes are filtered out, e.g. you use a significance test and nothing is less than the cutoff, should there be a warning banner on the plot so people know that nothing passed their threshold (as opposed to something being wrong)?
  • The cards for x and y axis group look more like the ones under gene selected (which are clickable), should the format of the values under group be similar to those under sig. test and data filters to make it more clear that these cannot be chanced on this page?
  • The text 'edit plot' is vague in terms of what you can change (as opposed to editing the plot by changing axis labels on this page). It seems to me like the options on the plot page have to do with the genes while the ones on the previous page have to do with dataset options. Maybe change 'edit plot' to 'dataset options' or something similar?
  • The value for standard deviation under data filter should probably show 'no filter' or similar instead of +/- 0 when no filter is selected on the previous page to keep things consistent
  • Should fold change be constrained to a positive value?
  • Can the spinning icon when loading a dataset (the icon under selection conditions to compare) be darker? Its easy to miss

SAdkins edit (from Slack)

  • Change marker colors for markers where gene was highlighted
  • Change default marker color away from purple since purple may look weird for other themes. Honestly, I could extend this to removing purple as the default color in the single-gene curator, but will leave as is for now.

"Might just be a devel thing but hitting clear selection for the genes seems like it takes a while to run"

  • It is also updating the plot, which may contribute to the slowness. Will investigate more.

"On view and save genes you can only select weighted gene cart even if you have genes selected"

  • Unweighted cart is actually clickable, despite the label be erronouesly set as "disabled".

"Any way to keep custom axis titles if you click back to 'edit plot'?"

  • Will have research this. All the plot metadata is stored in the HTML as a data object, so existing labels should be retrievable, and reloadable.

"What 'viewing' is occuring with the view and save genes button? Should this just be 'Save genes to cart'?"

  • You can view genes when selecting from the plot. I should be more clear with this. Believe I had a tooltip in the multigene curator, but neglected it here.

"The cards for x and y axis group look more like the ones under gene selected (which are clickable), should the format of the values under group be similar to those under sig. test and data filters to make it more clear that these cannot be chanced on this page?"

  • I see your point. I was modeling this after the College Park mockup, which did not taken into account a "selected genes" section. Easy enough to change (maybe I'll gray out the background).

"Can the spinning icon when loading a dataset (the icon under selection conditions to compare) be darker? Its easy to miss"

I address just about all of these. Couple of remaining issues

  • I made the loader black for the "loading compare conditions" step, but when the browser is "thinking" the loader just turns into a solid ring, so it doesn't look like a loader at all.
  • Still need to address the "gray background to white background" transition on the plotting view as you scroll beyond the viewing height. This is an issue on the other curators too. It's more a product of my lack of skill in CSS styling
  • The View and Save Genes button is still under the window. Need to make it flush with the "gene dropdown" container instead of under it. In addition, I think when no genes are selected, the buttons should just say "Save Genes".