コード例 #1
0
    def test_get_comp_events_if_no_comp(self):
        fcs_file_path = "examples/test_comp_example.fcs"

        sample = Sample(fcs_path_or_data=fcs_file_path)

        comp_events = sample.get_comp_events()

        self.assertIsNone(comp_events)
コード例 #2
0
    def test_get_events_as_data_frame_comp(self):
        fcs_file_path = "examples/test_comp_example.fcs"
        comp_file_path = "examples/comp_complete_example.csv"

        sample = Sample(fcs_path_or_data=fcs_file_path,
                        compensation=comp_file_path)

        df = sample.as_dataframe(source='comp')

        self.assertIsInstance(df, pd.DataFrame)
        np.testing.assert_equal(df.values, sample.get_comp_events())