-
Notifications
You must be signed in to change notification settings - Fork 2
Workflows
Workflows are an extension (or reduction) of the history features built into ExploSig. A workflow is an interaction history that filters out interactions that are dependent on a particular set of variables.
For example, if working with data involving mutation signatures across samples, perhaps we want to run our steps on a new set of samples. In this case, a desired workflow would filter out all interactions dependent on the samples variable. This means that the workflow will generalize to a new set of samples, and will not contain references to the set of samples on which the original interactions were performed.
This wiki page describes how histories (and workflows) are represented internally, information that may be helpful to those interested in manipulating these workflows.
A history is stored as an array of events. An event is an object with four properties:
-
type
: An event type maps to a known "getter" function that can be used to look up a JS object by an ID. (e.g.DATA
maps togetData(id)
andSCALE
maps togetScale(id)
) -
subtype
: An event subtype maps to a "resetter" function (specifies the behavior when the bottom of the stack is reached and there is no event representing the initial state). (e.g.FILTER
maps toresetFilter()
,SORT
maps toresetSort()
,COLOR_SCALE
maps toresetColorScale()
,COLOR_OVERRIDE
maps toresetColorOverride()
) -
id
: String corresponding to the ID passed to the getter function specified by thetype
property. -
action
: The name of the function to call. Must be a valid function on the object returned by the getter function. -
params
: An array of parameters to pass to the function specified by theaction
property.
The following is an example of an event object:
{
"type": "SCALE",
"subtype": "COLOR_OVERRIDE",
"id": "signature",
"action": "setColorOverrides",
"params": [
{"5* A":"#FF0000","COSMIC 24":"rgb(135,217,151)"}
]
}