cytoflowgui.workflow.views.view_base

class cytoflowgui.workflow.views.view_base.IterWrapper(iterator, by)[source]

Bases: object

class cytoflowgui.workflow.views.view_base.IWorkflowView(adaptee, default=<class 'traits.adaptation.adaptation_error.AdaptationError'>)[source]

Bases: cytoflow.views.i_view.IView

An interface that extends a cytoflow view with functions required for GUI support.

In addition to implementing the interface below, another common thing to do in the derived class is to override traits of the underlying class in order to add metadata that controls their handling by the workflow. Currently, relevant metadata include:

  • status - Holds status variables – only sent from the remote process to the local one, and doesn’t re-plot the view. Example: the possible plot names.

  • transient - A temporary variable (not copied between processes or serialized).

TODO - finish this docstring (plotfacet, plot_params, etc)
changed

Used to transmit status information back from the operation to the workflow. Set its value to the name of the trait that was changed

Type

Event

should_plot(changed, payload)[source]

Should the owning WorkflowItem refresh the plot when certain things change? changed can be: - Changed.VIEW – the view’s parameters changed - Changed.RESULT – this WorkflowItem’s result changed - Changed.PREV_RESULT – the previous WorkflowItem’s result changed - Changed.ESTIMATE_RESULT – the results of calling “estimate” changed

If should_plot was called from an event handler, the event is passed in as payload

get_notebook_code(idx)[source]

Return Python code suitable for a Jupyter notebook cell that plots this view.

Parameters

idx (integer) – The index of the WorkflowItem that holds this view.

Returns

The Python code that calls this module.

Return type

string

class cytoflowgui.workflow.views.view_base.WorkflowView[source]

Bases: traits.has_traits.HasStrictTraits

Default implementation of IWorkflowView.

Make sure this class is FIRST in the derived class’s declaration so it shows up earlier in the MRO than the base class from the cytoflow module.

current_plot

Passed as the current_plot keyword to the underlying IView.plot

Type

Any

enum_plots(experiment)[source]
should_plot(changed, payload)[source]

Should the owning WorkflowItem refresh the plot when certain things change? changed can be: - Changed.VIEW – the view’s parameters changed - Changed.RESULT – this WorkflowItem’s result changed - Changed.PREV_RESULT – the previous WorkflowItem’s result changed - Changed.ESTIMATE_RESULT – the results of calling “estimate” changed

If should_plot is called from a notification handler, the payload is the handler event parameter.

get_notebook_code(idx)[source]
class cytoflowgui.workflow.views.view_base.WorkflowFacetView[source]

Bases: cytoflowgui.workflow.views.view_base.WorkflowView

A WorkflowView that subsets the data by a facet before plotting.

plotfacet

What facet should current_plot refer to?

Type

Str

enum_plots(experiment)[source]
plot(experiment, **kwargs)[source]

A default plot that subsets by the plotfacet and current_plot. If you need it to do something else, you must override this method!

class cytoflowgui.workflow.views.view_base.WorkflowByView[source]

Bases: cytoflowgui.workflow.views.view_base.WorkflowView

plot(experiment, **kwargs)[source]

A default plot that passes current_plot as the plot name.

enum_plots(experiment)[source]
class cytoflowgui.workflow.views.view_base.BasePlotParams[source]

Bases: traits.has_traits.HasStrictTraits

class cytoflowgui.workflow.views.view_base.DataPlotParams[source]

Bases: cytoflowgui.workflow.views.view_base.BasePlotParams

class cytoflowgui.workflow.views.view_base.Data1DPlotParams[source]

Bases: cytoflowgui.workflow.views.view_base.DataPlotParams

class cytoflowgui.workflow.views.view_base.Data2DPlotParams[source]

Bases: cytoflowgui.workflow.views.view_base.DataPlotParams

class cytoflowgui.workflow.views.view_base.Stats1DPlotParams[source]

Bases: cytoflowgui.workflow.views.view_base.BasePlotParams

class cytoflowgui.workflow.views.view_base.Stats2DPlotParams[source]

Bases: cytoflowgui.workflow.views.view_base.BasePlotParams

class cytoflowgui.workflow.views.view_base.Channel[source]

Bases: traits.has_traits.HasStrictTraits