cytoflow.views.table¶
“Plot” a tabular view of a statistic.
TableView
– the IView
class that makes the plot.
- class cytoflow.views.table.TableView[source]¶
Bases:
traits.has_traits.HasStrictTraits
“Plot” a tabular view of a statistic. Mostly useful for GUIs. Each level of the statistic’s index must be used in
row_facet
,column_facet
,subrow_facet
, orsubcolumn_facet
. This module can’t “plot” a statistic with more than four index levels unlesssubset
is set and that results in extra levels being dropped.- statistic¶
The name of the statistic to plot. Must be a key in the
Experiment.statistics
attribute of theExperiment
being plotted. Each level of the statistic’s index must be used inrow_facet
,column_facet
,subrow_facet
, orsubcolumn_facet
.
Examples
Make a little data set.
>>> import cytoflow as flow >>> import_op = flow.ImportOp() >>> import_op.tubes = [flow.Tube(file = "Plate01/RFP_Well_A3.fcs", ... conditions = {'Dox' : 10.0}), ... flow.Tube(file = "Plate01/CFP_Well_A4.fcs", ... conditions = {'Dox' : 1.0})] >>> import_op.conditions = {'Dox' : 'float'} >>> ex = import_op.apply()
Add a threshold gate
>>> ex2 = flow.ThresholdOp(name = 'Threshold', ... channel = 'Y2-A', ... threshold = 2000).apply(ex)
Add a statistic
>>> ex3 = flow.ChannelStatisticOp(name = "ByDox", ... channel = "Y2-A", ... by = ['Dox', 'Threshold'], ... function = len).apply(ex2)
“Plot” the table
>>> flow.TableView(statistic = ("ByDox", "len"), ... row_facet = "Dox", ... column_facet = "Threshold").plot(ex3)