Skip to content

Workflows

Mark Keller edited this page Oct 19, 2019 · 3 revisions

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 to getData(id) and SCALE maps to getScale(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 to resetFilter(), SORT maps to resetSort(), COLOR_SCALE maps to resetColorScale(), COLOR_OVERRIDE maps to resetColorOverride())
  • id: String corresponding to the ID passed to the getter function specified by the type 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 the action 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)"}
    ]
}
Clone this wiki locally