def handle_databases(self): log.start_logging() print(ui.header('submodule: databases', level=2)) handler = databases.get_handler(self.config_d) if self.args.quick: databases.build_quick_pipeline(handler, self.config_d, self.databases_d) else: databases.build_default_pipeline(handler, self.config_d, self.databases_d, with_uniref=self.args.full, with_nr=self.args.nr) if self.args.install: return databases.install(handler) else: databases.check_or_fail(handler)
def setup_method(self): self.logger = logging.getLogger('tests.test_databases.TestDatabases') class Args(object): pass self.args = Args() self.args.database_dir = databases.default_database_dir(self.logger) self.args.verbosity = 2 self.args.full = False self.args.n_threads = 1 self.args.busco_group = 'metazoa' self.config, self.databases = get_config() self.config.update(vars(self.args)) self.handler = databases.get_handler(self.config) databases.build_default_pipeline(self.handler, self.config, self.databases, with_uniref=False)
def handle_annotate(self): log.start_logging() print(ui.header('submodule: annotate', level=2)) db_handler = databases.get_handler(self.config_d) if self.args.quick: databases.build_quick_pipeline(db_handler, self.config_d, self.databases_d) else: databases.build_default_pipeline(db_handler, self.config_d, self.databases_d, with_uniref=self.args.full, with_nr=self.args.nr) if self.config_d['force'] is True: utd_msg = '*All database tasks up-to-date.*' ood_msg = '*Some database tasks out-of-date; '\ 'FORCE is True, ignoring!' uptodate, statuses = db_handler.print_statuses( uptodate_msg=utd_msg, outofdate_msg=ood_msg) else: databases.check_or_fail(db_handler) annotate_handler = annotate.get_handler(self.config_d, db_handler.files) if self.args.quick: build_quick_pipeline(annotate_handler, self.config_d, db_handler.files) elif self.args.full: build_full_pipeline(annotate_handler, self.config_d, db_handler.files) elif self.args.nr: build_nr_pipeline(annotate_handler, self.config_d, db_handler.files) else: build_default_pipeline(annotate_handler, self.config_d, db_handler.files) return annotate.run_annotation(annotate_handler)