示例#1
0
 def test_read_data(self):
     gff_file = os.path.join(self.test_folder, "anno.gff")
     tran_file = os.path.join(self.test_folder, "tran.gff")
     pro_file = os.path.join(self.test_folder, "pro.gff")
     gen_file(gff_file, self.example.gff_file)
     gen_file(tran_file, self.example.gff_file)
     gen_file(pro_file, self.example.gff_file)
     args = self.mock_args.mock()
     args.gff_file = gff_file
     args.tran_file = tran_file
     args.pro_file = pro_file
     nums, cdss, tas, pros, genes, ncs = si.read_data(args)
     self.assertDictEqual(nums, {'ta': 3, 'cds': 3, 'pro': 3, 'uni': 0})
     self.assertEqual(cdss[0].start, 140)
     self.assertEqual(tas[0].start, 140)
     self.assertEqual(pros[0].start, 140)
 def test_read_data(self):
     gff_file = os.path.join(self.test_folder, "anno.gff")
     tran_file = os.path.join(self.test_folder, "tran.gff")
     pro_file = os.path.join(self.test_folder, "pro.gff")
     gen_file(gff_file, self.example.gff_file)
     gen_file(tran_file, self.example.gff_file)
     gen_file(pro_file, self.example.gff_file)
     args = self.mock_args.mock()
     args.gff_file = gff_file
     args.tran_file = tran_file
     args.pro_file = pro_file
     nums, cdss, tas, pros, genes = si.read_data(args)
     self.assertDictEqual(nums, {'ta': 3, 'cds': 3, 'pro': 3, 'uni': 0} )
     self.assertEqual(cdss[0].start, 140)
     self.assertEqual(tas[0].start, 140)
     self.assertEqual(pros[0].start, 140)