Exemplo n.º 1
0
 def test_blast(self):
     for test in self.tests:
         pred = FeatureAnnt([self.db], mkdtemp(dir=self.tmp_dir))
         obs = pred(test.input, aligner=test.aligner, outfmt='tab')
         exp = pred._filter_best(pred.parse_tabular('%s.diamond' %
                                                    test.exp))
         self.assertTrue(exp.equals(obs))
         obs = pred(test.input, aligner=test.aligner, outfmt='sam')
         exp = pred._filter_id_cov(pred.parse_sam('%s.sam' % test.exp))
         self.assertTrue(exp.equals(obs))
Exemplo n.º 2
0
 def test_blast(self):
     for test in self.tests:
         pred = FeatureAnnt([self.db], mkdtemp(dir=self.tmp_dir))
         obs = pred(test.input, aligner=test.aligner, outfmt='tab')
         exp = pred._filter_best(
             pred.parse_tabular('%s.diamond' % test.exp))
         self.assertTrue(exp.equals(obs))
         obs = pred(test.input, aligner=test.aligner, outfmt='sam')
         exp = pred._filter_id_cov(pred.parse_sam('%s.sam' % test.exp))
         self.assertTrue(exp.equals(obs))
Exemplo n.º 3
0
 def test_filter_id_cov(self):
     for test in self.filter_tests2:
         df = FeatureAnnt.parse_sam(test.input)
         df_filter = FeatureAnnt._filter_id_cov(df, pident=30, cov=92)
         df_filter.to_csv(test.obs, sep='\t')
         self.assertTrue(cmp(test.exp, test.obs, shallow=False))
Exemplo n.º 4
0
 def test_filter_id_cov(self):
     for test in self.filter_tests2:
         df = FeatureAnnt.parse_sam(test.input)
         df_filter = FeatureAnnt._filter_id_cov(df, pident=30, cov=92)
         df_filter.to_csv(test.obs, sep='\t')
         self.assertTrue(cmp(test.exp, test.obs, shallow=False))