예제 #1
0
    def testRoundtripWithBeadCalibration(self):
        self.cwd = os.path.dirname(os.path.abspath(__file__))
        self.ex = flow.ImportOp(conditions={
            'Dox': 'float'
        },
                                tubes=[
                                    flow.Tube(file=self.cwd +
                                              '/data/tasbe/rby.fcs',
                                              conditions={'Dox': 1.0})
                                ]).apply()

        op = flow.BeadCalibrationOp(
            units={"PE-Tx-Red-YG-A": "MEPTR"},
            beads_file=self.cwd + '/data/tasbe/beads.fcs',
            beads=flow.BeadCalibrationOp.BEADS[
                "Spherotech RCP-30-5A Lot AA01-AA04, AB01, AB02, AC01, GAA01-R"]
        )
        op.estimate(self.ex)

        ex2 = op.apply(self.ex)

        flow.ExportFCS(path=self.directory, by=['Dox']).export(ex2)

        tube1 = flow.Tube(file=self.directory / 'Dox_1.0.fcs',
                          conditions={"Dox": 1.0})
        ex_rt = flow.ImportOp(conditions={
            'Dox': 'float'
        }, tubes=[tube1]).apply()

        self.assertNotIn('voltage', ex_rt.metadata['PE-Tx-Red-YG-A'])
예제 #2
0
 def setUp(self):
     import os
     self.cwd = os.path.dirname(os.path.abspath(__file__))
     self.ex = flow.ImportOp(conditions = {},
                             tubes = [flow.Tube(file = self.cwd + '/data/tasbe/rby.fcs',
                                                conditions = {})]).apply()        
     
     self.op = flow.BeadCalibrationOp(
                 units = {"PE-Tx-Red-YG-A" : "MEPTR"},
                 beads_file = self.cwd + '/data/tasbe/beads.fcs',
                 beads = flow.BeadCalibrationOp.BEADS["Spherotech RCP-30-5A Lot AA01-AA04, AB01, AB02, AC01, GAA01-R"])
     self.op.estimate(self.ex)