Ejemplo n.º 1
0
    def test_parses_relabeled_tiff(self):

        name = 'mCherry-s04t045.tif'
        res = utils.parse_image_name(name)

        exp = {
            'multi_tile': 0,
            'slice': 0,
            'tile': 4,
            'channel': 2,
            'timepoint': 45,
            'channel_name': 'mCherry',
            'key': '4-mcherry',
            'suffix': '.tif',
        }

        self.assertEqual(res, exp)
Ejemplo n.º 2
0
    def test_parses_multitile_experiment(self):

        name = 'Alexa Fluor 488-s011t045m3.tif'
        res = utils.parse_image_name(name)

        exp = {
            'slice': 0,
            'tile': 11,
            'channel': 1,
            'timepoint': 45,
            'channel_name': 'Alexa Fluor 488',
            'multi_tile': 3,
            'key': '11-alexa_fluor_488',
            'suffix': '.tif',
        }

        self.assertEqual(res, exp)
Ejemplo n.º 3
0
    def test_parses_relabeled_warp_file(self):

        name = 'TL Brightfield-s04t045InverseWarp.nii.gz'
        res = utils.parse_image_name(name)

        exp = {
            'multi_tile': 0,
            'slice': 0,
            'tile': 4,
            'channel': 1,
            'timepoint': 45,
            'channel_name': 'TL Brightfield',
            'key': '4-tl_brightfield',
            'suffix': 'InverseWarp.nii.gz',
        }

        self.assertEqual(res, exp)
Ejemplo n.º 4
0
    def test_parses_colony_mask_name(self):

        name = 'colony_mask-s11t021.npz'
        res = utils.parse_image_name(name)

        exp = {
            'multi_tile': 0,
            'slice': 0,
            'tile': 11,
            'channel': 1,
            'timepoint': 21,
            'channel_name': 'colony_mask',
            'key': '11-colony_mask',
            'suffix': '.npz',
        }

        self.assertEqual(res, exp)
Ejemplo n.º 5
0
    def test_parses_older_experiment(self):

        name = 'Experiment-07-Image Export-01_s13t57TL Brightfield_1_ORG.tif'
        res = utils.parse_image_name(name)

        exp = {
            'multi_tile': 0,
            'slice': 0,
            'tile': 13,
            'channel': 1,
            'timepoint': 57,
            'channel_name': 'TL Brightfield',
            'key': '13-tl_brightfield',
            'suffix': '.tif',
            'prefix': 'Experiment-07-Image Export-01'
        }

        self.assertEqual(res, exp)
Ejemplo n.º 6
0
    def test_parses_ants_warp(self):

        name = 'Experiment-07-Image Export-01_s32t53TL Brightfield_1_ORGWarp.nii.gz'
        res = utils.parse_image_name(name)

        exp = {
            'multi_tile': 0,
            'slice': 0,
            'tile': 32,
            'channel': 1,
            'timepoint': 53,
            'channel_name': 'TL Brightfield',
            'key': '32-tl_brightfield',
            'prefix': 'Experiment-07-Image Export-01',
            'suffix': 'Warp.nii.gz',
        }

        self.assertEqual(res, exp)
Ejemplo n.º 7
0
    def test_parses_newer_experiment(self):

        name = '2016-08-29-Interleave-107_s15c3_ORG.tif'
        res = utils.parse_image_name(name)

        exp = {
            'multi_tile': 0,
            'slice': 0,
            'tile': 15,
            'channel': 3,
            'timepoint': 107,
            'channel_name': 'EGFP',
            'key': '15-egfp',
            'prefix': '2016-08-29-Interleave',
            'suffix': '.tif',
        }

        self.assertEqual(res, exp)
Ejemplo n.º 8
0
    def test_parses_yet_another_new_experiment(self):

        name = '2017-01-31-6hr-Image Export-01_s28t60_EGFP_ORG.tif'

        res = utils.parse_image_name(name)

        exp = {
            'multi_tile': 0,
            'slice': 0,
            'tile': 28,
            'channel': 3,
            'timepoint': 60,
            'channel_name': 'EGFP',
            'key': '28-egfp',
            'prefix': '2017-01-31-6hr-Image Export-01',
            'suffix': '.tif',
        }

        self.assertEqual(res, exp)
Ejemplo n.º 9
0
    def test_parses_another_new_experiment(self):

        name = '2016-10-28-6hr-Image Export-01_s33t68_ORG.tif'

        res = utils.parse_image_name(name)

        exp = {
            'multi_tile': 0,
            'slice': 0,
            'tile': 33,
            'channel': 1,
            'timepoint': 68,
            'channel_name': 'TL Brightfield',
            'key': '33-tl_brightfield',
            'prefix': '2016-10-28-6hr-Image Export-01',
            'suffix': '.tif',
        }

        self.assertEqual(res, exp)