July 8, 2013 email from Graham:
Here is a movie that roughly shows how the following could look in action... in this sequence A turns onto ~60% (a single GPCR partially activated by an antagonist), B adds input until it hits a threshold and then slowly increases to 100% on. When C receives 50% signal from A, it starts to get deactivated by A. Would have been nice to close the circuit so A gets turned off, but didn't think of that until late. Also note, nothing is exact in this- its just a sketch.
I've included formulas for the visuals and suggestions for node defaults and animations below:
Yes, each node should have visual properties/attributes
There should be a subset of parameters available through the GUI for users to adjust them. Of the top of my head
Node:
Fill Color, Stroke color, Text Color, Text Size, Node size (absolute or %), Stroke Weight (absolute pixels or %)...maybe opacity
Shape
All Cytoscape shape options
Custom vector graphics that will be provided by Megan and Graham
Option for custom vector file import?
Edge:
Color
Opacity
Dash (with a ratio or absolute size for space to dash
Straight, dog-legged, or curved?
"Ends" = arrowheads, blocks, other?...
option for custom vector importer?
For each of your 5 node types, these attributes should be set to defaults... these will likely change in the very near future, but please use the following for draft 1 defaults:
for all molecules below initial values for all parameters should be set to:
initial fill color = ~5% black (i.e. very light grey), e.g., (240,240,240)
initial stroke color = ~20% black e.g. (225,225,225)
Text= default size and color (black) i.e.(0,0,0)
initial shapes:
kinase
V
small molecules
Triangle
GTPase
Hexagon
Receptor
Parallelogram
ReceptorTKinase
Parallelogram
Edges should be set to:
initial stroke color = ~20% black (225,225,225)
initial weight = default
Over time, the following parameters should change as the simulation runs to provide visual clues to what is occurring. We will use a one-color/parameter approach with a linear scale where color indicates activity to follow "best methods" practices for clarity in visualization.
Changes in time (recall that activityLevel = the only output of a node, from 0 to 1.0):
Node color indicates activity, where Blueness = activity (Note, maximum blue is a mix of rgb=(0,120,240)
Node Fill color = (1-activityLevel, 1-activityLevel*2, 1)•(240,240,240)
activityLevel=0: nodeColor = lightGrey = (240,240,240)
activityLevel=1: nodeColor = ~100%blue = (0,120,240)
Edge color and weight indicates activity (artificially with a boolean integer) from -1.0 to 1.0
activatingEdge = 1 Greenness = activatingness
deactivatingEdge = -1 Redness = deactivatingness
Edge Stroke color if activatingEdge == 1
activating arrow with regular arrowhead e.g., –––>
edgeColor = (1-activityLevel, 1-activityLevel*.67, 1-activityLevel)•(225,225,225)
activityLevel=0: nodeColor = 10%black = (225,225,225)
activityLevel=1, activatingEdge: nodeColor = ~100%green = (0,150,0)
Edge Stroke color if activatingEdge == -1
deactivating arrow with "perpendicular blocking" arrowhead, e.g, ––––|
edgeColor = (1-activityLevel*.67, 1-activityLevel, 1-activityLevel)•(225,225,225)
activityLevel=0: nodeColor = 10%black = (225,225,225)
activityLevel=1, activatingEdge: nodeColor = ~100%redish = (150,0,0)
For all edges, weight could also indicates activity:
This should be an option set by the user and it should be off by default
default weight is set by cytoscape, max weight is set globally by user
weight = (maxWeight-defaultWeight)*activityLevel + default weight.
STRETCH GOAL?:
In the proposal phase we talked about animating flow along the edges. If possible, my suggestion is to use the "marching ants" approach visible for decades in photoshop selections, but I'll make some other options too.
Hack 1 ("ugly", but simple):
could be a user option in the GUI that is off by default so a user can just toggle on and off to confirm flow direction manually
if activatingEdge: Edge Line Styles = SEPARATE_ARROW
if deactivatingEdge: Edge Line Styles = CONTIGUOUS_ARROW
Marching Ants animated "flow":
I can think of three ways to do this (no idea if there are cytoscape properties)
Offset the startPoint of the dashing.
Set Edge Line Styles = DASH_DOT
If cytoscape offers a line offset, then its easy:
animate the offset over time, e.g.:
userInputSpeed = user set speed value (for now a float from -10 to 10), default = 2
offset+=LineOffsetStepSize*userInputSpeed
if cytoscape has no line offset, can you create it by splitting an edge into two edges with 4 ghost nodes?
Animate the two middle ghostNodes (invisible nodes) along the vector with the same offset equation described above
Animate the edge:
An edge is a vector or raster graphic that is a pre rendered dashed line with 3to10 frames
The frames play in a constant cycle to make the dashes appear to slide along the edge.
Animated "Peristaltic Bead" nodes:
Build small nodes along the edges (could be at low frequency for now)... effectively a dot, and move it along the edge over time.
Hopefully equations like this can be added fairly easily, but if not, we can just pick one thing like change in nodeFillColor over time. We can go over this tomorrow if you have questions.