Ejemplo n.º 1
0
    def test_nisin(self):
        record = parse_input_sequence(helpers.get_path_to_nisin_with_detection())[0]
        clusters = record.get_clusters()
        assert clusters
        for cluster in clusters:
            assert cluster.cds_children
        assert record.get_cds_features_within_clusters()
        before_count = record.get_feature_count()

        assert tta.check_prereqs() == []
        assert tta.check_options(self.options) == []
        assert tta.is_enabled(self.options)
        prior_results = None
        results = tta.run_on_record(record, prior_results, self.options)
        assert isinstance(results, ModuleResults)
        assert len(results.features) == 174
        assert record.get_feature_count() == before_count
        results.add_to_record(record)
        assert record.get_feature_count() == before_count + 174
Ejemplo n.º 2
0
    def test_nisin(self):
        record = Record.from_genbank(
            helpers.get_path_to_nisin_with_detection(), taxon="bacteria")[0]
        regions = record.get_regions()
        assert regions
        for region in regions:
            assert region.cds_children
        assert record.get_cds_features_within_regions()
        before_count = record.get_feature_count()

        assert tta.check_prereqs() == []
        assert tta.check_options(self.options) == []
        assert tta.is_enabled(self.options)
        prior_results = None
        results = tta.run_on_record(record, prior_results, self.options)
        assert isinstance(results, ModuleResults)
        assert len(results.features) == 174
        assert record.get_feature_count() == before_count
        results.add_to_record(record)
        assert record.get_feature_count() == before_count + 174