class TestGenePanelCreator(unittest.TestCase):
    def setUp(self):
        self.ens_ids = 'data/ens_ids.txt'
        self.gene_names = 'data/gene_names.txt'
        self.idx_file = 'data/Homo_sapiens.GRCh37.75.gtf.gz.index'
        self.log = 'data/test_log.log'
        self.ens_out = 'data/ens_out.bed'
        self.gene_out = 'data/gene_out.bed'
        self.gpc = GenePanelCreator(self.idx_file, out_file=self.ens_out, log_file=self.log,
                                    padding='20,10', upstream=200, downstream=200)

    def tearDown(self):
        for i in [self.ens_out, self.gene_out, self.log]:
            if os.path.exists(i):
                os.remove(i)

    @unittest.skipIf(True, "Lebo")
    def test_prepare_genes_with_ensids(self):
        ens = self.gpc.prepare_genes(self.ens_ids)
        self.assertTrue(len(ens) == 2)
        self.assertEqual(ens[0].gene_id, 'ENSG00000006071')
        self.assertTrue('HNF4A' in ens[1].names)

    @unittest.skipIf(True, "Lebo")
    def test_prepare_genes_with_assocnames(self):
        ang = self.gpc.prepare_genes(self.gene_names)
 def setUp(self):
     self.ens_ids = 'data/ens_ids.txt'
     self.gene_names = 'data/gene_names.txt'
     self.idx_file = 'data/Homo_sapiens.GRCh37.75.gtf.gz.index'
     self.log = 'data/test_log.log'
     self.ens_out = 'data/ens_out.bed'
     self.gene_out = 'data/gene_out.bed'
     self.gpc = GenePanelCreator(self.idx_file, out_file=self.ens_out, log_file=self.log,
                                 padding='20,10', upstream=200, downstream=200)