Beispiel #1
0
    def test_new_group_membership_is_empty(self):
        s = Session()

        group_name = 'new_group'
        s.add_sample_group(group_name)

        s.add_samples(copy.deepcopy(
            test_samples_base_set))  # load without assigning a group

        s_sample_ids = sorted(s.get_group_sample_ids(group_name))

        self.assertListEqual(s_sample_ids, [])
Beispiel #2
0
    def test_add_samples_with_group(self):
        sample_ids = ["100715.fcs", "109567.fcs", "113548.fcs"]

        s = Session()

        group_name = 'gml'
        s.add_sample_group(group_name)

        s.add_samples(copy.deepcopy(test_samples_base_set), group_name)

        s_sample_ids = sorted(s.get_group_sample_ids(group_name))

        self.assertListEqual(sample_ids, s_sample_ids)
Beispiel #3
0
    def test_analyze_single_sample(self):
        wsp_path = "examples/data/8_color_data_set/8_color_ICS_simple.wsp"
        sample_id = '101_DEN084Y5_15_E01_008_clean.fcs'
        sample_grp = 'DEN'

        fks = Session(copy.deepcopy(test_samples_8c_full_set))
        fks.import_flowjo_workspace(wsp_path, ignore_missing_files=True)

        sample_ids = fks.get_group_sample_ids(sample_grp)
        self.assertEqual(len(sample_ids), 3)

        fks.analyze_samples(sample_grp, sample_id=sample_id)
        report = fks.get_group_report(sample_grp)

        self.assertEqual(report['sample'].nunique(), 1)
Beispiel #4
0
    def test_analyze_single_sample(self):
        wsp_path = "examples/8_color_data_set/8_color_ICS_simple.wsp"
        fcs_path = "examples/8_color_data_set/fcs_files"
        sample_id = '101_DEN084Y5_15_E01_008_clean.fcs'
        sample_grp = 'DEN'

        fks = Session(fcs_samples=fcs_path)
        fks.import_flowjo_workspace(wsp_path, ignore_missing_files=True)

        sample_ids = fks.get_group_sample_ids(sample_grp)
        self.assertEqual(len(sample_ids), 3)

        fks.analyze_samples(sample_grp, sample_id=sample_id)
        report = fks.get_group_report(sample_grp)

        self.assertEqual(report.index.get_level_values('sample').nunique(), 1)