示例#1
0
    def test_detect(self):
        """Test tta.detect()"""
        self.assertEqual(
            len(self.record.get_cds_features()) +
            len(self.record.get_protoclusters()), 3)
        options = get_simple_options(tta, ["--tta-threshold", "0"])

        detected = tta.detect(self.record, options)
        self.assertEqual(len(detected), 2)
        # make sure features not added yet
        features = self.record.get_generics()
        self.assertEqual(len(features), 0)
        # add to record and make sure they're there
        detected.add_to_record(self.record)
        features = self.record.get_generics()
        self.assertEqual(len(features), 2)

        for feature in features:
            assert feature.type == "misc_feature"

        fw_tta, rv_tta = features[0], features[1]
        self.assertEqual(fw_tta.location.start, 3)
        self.assertEqual(fw_tta.location.end, 6)
        self.assertEqual(fw_tta.strand, 1)

        self.assertEqual(rv_tta.location.start, 15)
        self.assertEqual(rv_tta.location.end, 18)
        self.assertEqual(rv_tta.strand, -1)
 def setUp(self):
     self.options = update_config(
         get_simple_options(genefinding, [
             '--taxon', 'fungi', '--genefinding-tool', 'glimmerhmm',
             '--cpus', '1'
         ]))
     self.data_location = get_full_path(__file__, "data")
示例#3
0
 def setUp(self):
     self.config = get_simple_options(None, [])
     self.config.genefinding_gff3 = path.get_full_path(__file__, "data", "test_gff.gff")
     self.single_entry = False
     contig1 = DummyRecord(seq="A"*2000)
     contig1.id = "CONTIG_1"
     contig2 = DummyRecord(seq="A"*2000)
     contig2.id = "CONTIG_2"
     self.sequences = [contig1, contig2]
示例#4
0
 def setUp(self):
     self.options = update_config(
         get_simple_options(
             genefinding,
             ['--genefinding-tool', 'prodigal', '--cpus', '1']))