Example #1
0
    def test_add_matrix_poly4_gate():
        fks = Session(fcs_samples=data1_sample)

        fks.add_comp_matrix(comp_matrix_01)

        dim1 = Dimension('PE', compensation_ref='MySpill')
        dim2 = Dimension('PerCP', compensation_ref='MySpill')
        dims = [dim1, dim2]

        poly_gate = gates.PolygonGate('Polygon4', None, dims, poly1_vertices)
        fks.add_gate(poly_gate)

        res_path = 'examples/gate_ref/truth/Results_Polygon4.txt'
        truth = pd.read_csv(res_path, header=None, squeeze=True,
                            dtype='bool').values

        fks.analyze_samples()
        result = fks.get_gating_results('default',
                                        data1_sample.original_filename)

        np.testing.assert_array_equal(truth,
                                      result.get_gate_indices('Polygon4'))
Example #2
0
    def test_get_comp_matrix(self):
        fks = Session(fcs_samples=data1_sample)
        fks.add_comp_matrix(comp_matrix_01)
        comp_mat = fks.get_comp_matrix('default', 'B07', 'MySpill')

        self.assertIsInstance(comp_mat, Matrix)