Opened 2 weeks ago

Last modified 36 hours ago

#19403 assigned enhancement

Add structure coloring controls to mutation scores scatter plot

Reported by: Tom Goddard Owned by: Tom Goddard
Priority: moderate Milestone:
Component: Structure Analysis Version:
Keywords: Cc: Willow.Coyote-Maestas@…
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Willow suggested adding controls to the mutation scores scatter plot to color associated structures. These would allow doing simple coloring of residues using attributes computed from mutations scores without needing to use the Render by Attribute GUI.

Attachments (2)

scatter_color.png (956.1 KB ) - added by Tom Goddard 2 weeks ago.
Screen snapshot showing some new coloring controls on scatter plots.
mut_color_history.png (1.2 MB ) - added by Tom Goddard 9 days ago.
Screenshot of new mutation color history panel.

Change History (8)

comment:1 by Tom Goddard, 2 weeks ago

I implemented color controls on scatter plots as shown in the attached image.

by Tom Goddard, 2 weeks ago

Attachment: scatter_color.png added

Screen snapshot showing some new coloring controls on scatter plots.

comment:2 by Tom Goddard, 2 weeks ago

Willow suggested the following refinements to the current coloring controls:

Mapping the sum ended up with negative scores and was confusing for the coloring. Get rid of the sum and just keep the sum absolute value.

Currently, if you drag a box in the scatterplot, the color mappings go away. It’s set up where the box dragging colors the structure green. Probably make it so it just selects doesn’t change color.

Default setting to select ‘color missing values: white’ (this adjusts the default from grey). This will reduce the problem of ending up with leftover colors from previous scores.

Adjust color scale to have more steps and not to max out. I think doing this based on percentiles would be helpful:
Pasted Graphic 1.png

Add new default color scales
Red-white-blue. This would have white be a band centered at zero. Then red and blue have multiple steps. Here is an example of roughly what i think would be ideal.
Pasted Graphic 4.png

Adjust naming scheme current with the drag box these become quite long and confusing:
Pasted Graphic 2.png

We probably need some sort of attribute manager that allows removing these or rapidly switching between them.

comment:3 by Tom Goddard, 2 weeks ago

Cc: Willow.Coyote-Maestas@… added

Made several improvements to the structure coloring:

1) Replaced two color white-red and white-blue with three color palettes still using linear ramp.

2) Added red-white-blue color palette for handling signed residue values such as mean or median across full set of mutations. This uses 4 levels with the two middle ones being white using (0.66*min, 0.33*min, 0.33*max, 0.66*max). Not a great choice for thresholds.

3) Added different ways to combine mutation scores for a residue: median, count, max, min.

4) Use while color if residue does not have a score.

5) Make ctrl-drag on scatter plot select residues by default and not color them green.

comment:4 by Tom Goddard, 9 days ago

6) Added a Mutation Coloring History panel and a button "Previous colorings" on mutation scatter plots to show it. Clicking the attributes in this panel sets the coloring on structures. Colorings created by the mutation scatter plot are remembered as well as colorings created directly by typing a color byattribute command that uses a mutation score attribute. The colorings and attributes are remembered in sessions. This gives a quick way of switching between many different colorings. Having many colorings is common when the mutation data contains many assays, for instance with the opioid receptor data where receptor activity values for a dozen different drugs are available. There is an "Adjust colors" on this panel that shows the render by attribute panel for the chosen attribute in the list so that colors and thresholds can be changed.

I'll attach a new screen shot of the scatter plot controls and new coloring history panel.

by Tom Goddard, 9 days ago

Attachment: mut_color_history.png added

Screenshot of new mutation color history panel.

comment:5 by Tom Goddard, 4 days ago

Willow tried the coloring controls and had the following suggestions:

Improvements for the mutation color history panel:

1) Make a multi-column table instead of a list of attribute names and remove the drag box ranges from the attribute name and put them in a separate table column.

2) Remove the method of combining mutation scores (mean, sub absolute) from the attribute name and make it a separate column in the table.

3) Allow renaming residue attributes to custom names, possibly by double clicking the name in the table as is done in the Models panel to change model names.

4) Add ability to delete residue attribute from table (and delete residue attribute itself).

5) Have residue attibute table setting that sets scatter plot axes and colors drag box green when user clicks a table row.

6) Add attribute table option to only color displayed structures. This will allow coloring only a fentanyl bound structure with fentanyl scores, and a morphine bound structure with morphine scores even though both structure are associated with all the mutation data.

7) When box is dragged along full width of one axes on scatter plot, don't include that axis in the attribute name or the drag bounds.

8) When box is dragged to the edge, for instance all scores < -0.2, don't include the lower bound score (e.g. score > -3.5) in the the attribute table bounds column.

Scatter plot coloring control changes.

9) Fix drag on scatter plot not clearing previous green color mutation points when the axes have been changed.

10) Might be useful to show scatter plot colored by point density, instead of mono-color. This could also possibly help speed up rendering plot when switching axes which now takes a second or more.

11) Add option to subtract least squares fit before taking mean, sum absolute, ....

General issues:

12) How to do colorings with just a single score per mutation (ie single phenotype). Possibly scatter plot could still be used showing score on y axis, residue number on x-axis. Or maybe coloring controls would be added to histograms.

comment:6 by Tom Goddard, 36 hours ago

A few more suggestions from Catherine Shin in Willow's lab:

13) It would be nice to be able to export the scores once they are calculated as a csv. Perhaps there could be a button in the score manager table for this.

14) She really loves your residue mini heatmaps. But she was unsatisfied with the ordering the amino acids. After going back and forth we came up with:
HRKDE
FWYNQ
ILCST
VMAGP

Note: See TracTickets for help on using tickets.