def setUp(self): self.cwd = os.path.dirname( os.path.abspath(__file__)) + "/data/Plate01/" tube1 = flow.Tube(file=self.cwd + 'RFP_Well_A3.fcs', conditions={"Dox": 10.0}) tube2 = flow.Tube(file=self.cwd + 'CFP_Well_A4.fcs', conditions={"Dox": 1.0}) import_op = flow.ImportOp(conditions={"Dox": "float"}, tubes=[tube1, tube2]) ex = import_op.apply() # this works so much better on transformed data logicle = flow.LogicleTransformOp() logicle.name = "Logicle transformation" logicle.channels = ['V2-A', 'Y2-A', 'B1-A'] logicle.estimate(ex) self.ex = logicle.apply(ex) self.gate = flow.Range2DOp(name="Range2D", xchannel="V2-A", ychannel="Y2-A", xlow=0.0, xhigh=0.4, ylow=0.4, yhigh=0.8)
def setUp(self): super().setUp() self.gate = flow.Range2DOp(name="Range2D", xchannel="V2-A", ychannel="Y2-A", xlow=-200, xhigh=800, ylow=800, yhigh=30000)
def setUp(self): self.cwd = os.path.dirname(os.path.abspath(__file__)) + "/data/Plate01/" tube1 = flow.Tube(file = self.cwd + 'RFP_Well_A3.fcs', conditions = {"Dox" : 10.0}) tube2 = flow.Tube(file= self.cwd + 'CFP_Well_A4.fcs', conditions = {"Dox" : 1.0}) import_op = flow.ImportOp(conditions = {"Dox" : "float"}, tubes = [tube1, tube2]) self.ex = import_op.apply() self.gate = flow.Range2DOp(name = "Range2D", xchannel = "V2-A", ychannel = "Y2-A", xlow = -200, xhigh = 800, ylow = 800, yhigh = 30000)
"""Update selection traits""" self.op.xlow = min(pos1.xdata, pos2.xdata) self.op.xhigh = max(pos1.xdata, pos2.xdata) self.op.ylow = min(pos1.ydata, pos2.ydata) self.op.yhigh = max(pos1.ydata, pos2.ydata) util.expand_class_attributes(RangeSelection2D) util.expand_method_parameters(RangeSelection2D, RangeSelection2D.plot) if __name__ == '__main__': import cytoflow as flow tube1 = flow.Tube(file='../../cytoflow/tests/data/Plate01/RFP_Well_A3.fcs', conditions={"Dox": 10.0}) tube2 = flow.Tube(file='../../cytoflow/tests/data/Plate01/CFP_Well_A4.fcs', conditions={"Dox": 1.0}) ex = flow.ImportOp(conditions={"Dox": "float"}, tubes=[tube1, tube2]) r = flow.Range2DOp(xchannel="V2-A", ychannel="Y2-A") rv = r.default_view() plt.ioff() rv.plot(ex) rv.interactive = True plt.show() print("x:({0}, {1}) y:({2}, {3})".format(r.xlow, r.xhigh, r.ylow, r.yhigh))