def setUp(self): super().setUp() self.gate = flow.QuadOp(name="Quad", xchannel="V2-A", ychannel="Y2-A", xthreshold=216, ythreshold=2144)
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.QuadOp(name = "Quad", xchannel = "V2-A", ychannel = "Y2-A", xthreshold = 216, ythreshold = 2144)
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.QuadOp(name="Quad", xchannel="V2-A", ychannel="Y2-A", xthreshold=0.4, ythreshold=0.2)
util.expand_class_attributes(QuadSelection) util.expand_method_parameters(QuadSelection, QuadSelection.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.QuadOp(name="Quad", xchannel="V2-A", ychannel="Y2-A") rv = r.default_view(xscale="logicle", yscale="logicle") plt.ioff() rv.plot(ex) rv.interactive = True plt.show() print("x:{0} y:{1}".format(r.xthreshold, r.ythreshold)) ex2 = r.apply(ex) flow.ScatterplotView(xchannel="V2-A", ychannel="Y2-A", xscale="logicle", yscale="logicle", huefacet="Quad").plot(ex2) plt.show()