def classify(self, options): """Determine taxonomic classification of genomes. Parameters ---------- options : argparse.Namespace The CLI arguments input by the user. """ check_dir_exists(options.align_dir) make_sure_path_exists(options.out_dir) if options.scratch_dir: make_sure_path_exists(options.scratch_dir) genomes, _ = self._genomes_to_process(options.genome_dir, options.batchfile, options.extension) classify = Classify(options.cpus, options.pplacer_cpus, options.min_af) classify.run(genomes, options.align_dir, options.out_dir, options.prefix, options.scratch_dir, options.recalculate_red, options.debug, options.split_tree) self.logger.info('Done.')
def align(self, options): """Create MSA from marker genes. Parameters ---------- options : argparse.Namespace The CLI arguments input by the user. """ check_dir_exists(options.identify_dir) make_sure_path_exists(options.out_dir) markers = Markers(options.cpus, options.debug) markers.align(options.identify_dir, options.skip_gtdb_refs, options.taxa_filter, options.min_perc_aa, options.custom_msa_filters, options.skip_trimming, options.rnd_seed, options.cols_per_gene, options.min_consensus, options.max_consensus, options.min_perc_taxa, options.out_dir, options.prefix, options.outgroup_taxon if hasattr(options, 'outgroup_taxon') else None, self.genomes_to_process) self.logger.info('Done.')
def classify(self, options): """Determine taxonomic classification of genomes. Parameters ---------- options : argparse.Namespace The CLI arguments input by the user. """ # See ticket #255... perhaps an upstream version/OS issue? if not hasattr(options, 'pplacer_cpus'): options.pplacer_cpus = None check_dir_exists(options.align_dir) make_sure_path_exists(options.out_dir) if options.scratch_dir: make_sure_path_exists(options.scratch_dir) genomes, _ = self._genomes_to_process(options.genome_dir, options.batchfile, options.extension) classify = Classify(options.cpus, options.pplacer_cpus) classify.run(genomes, options.align_dir, options.out_dir, options.prefix, options.scratch_dir, options.recalculate_red, options.debug, options.split_tree) self.logger.info('Done.')
def identify(self, options): """Identify marker genes in genomes. Parameters ---------- options : argparse.Namespace The CLI arguments input by the user. """ if options.genome_dir: check_dir_exists(options.genome_dir) if options.batchfile: check_file_exists(options.batchfile) make_sure_path_exists(options.out_dir) genomes, tln_tables = self._genomes_to_process(options.genome_dir, options.batchfile, options.extension) self.genomes_to_process = genomes markers = Markers(options.cpus) markers.identify(genomes, tln_tables, options.out_dir, options.prefix, options.force, options.write_single_copy_genes) self.logger.info('Done.')
def classify(self, options): """Determine taxonomic classification of genomes. Parameters ---------- options : argparse.Namespace The CLI arguments input by the user. """ check_dir_exists(options.align_dir) make_sure_path_exists(options.out_dir) if options.scratch_dir: make_sure_path_exists(options.scratch_dir) genomes, _ = self._genomes_to_process(options.genome_dir, options.batchfile, options.extension) classify = Classify(options.cpus, options.pplacer_cpus, options.min_af) classify.run(genomes=genomes, align_dir=options.align_dir, out_dir=options.out_dir, prefix=options.prefix, scratch_dir=options.scratch_dir, debugopt=options.debug, fulltreeopt=options.full_tree, recalculate_red=False) self.logger.info( 'Note that Tk classification mode is insufficient for publication of new taxonomic ' 'designations. New designations should be based on one or more de novo trees, an ' 'example of which can be produced by Tk in de novo mode.') self.logger.info('Done.')