def outgroup(self, options): """Reroot tree with outgroup.""" check_file_exists(options.taxonomy_file) self.logger.info('Identifying genomes from the specified outgroup.') outgroup = set() for genome_id, taxa in Taxonomy().read(options.taxonomy_file).iteritems(): if options.outgroup_taxon in taxa: outgroup.add(genome_id) self.logger.info('Identifying %d genomes in the outgroup.' % len(outgroup)) reroot = RerootTree() reroot.root_with_outgroup(options.input_tree, options.output_tree, outgroup)
def outgroup(self, options): """Reroot tree with outgroup.""" check_file_exists(options.taxonomy_file) self.logger.info('Identifying genomes from the specified outgroup.') outgroup = set() for genome_id, taxa in Taxonomy().read(options.taxonomy_file).items(): if options.outgroup_taxon in taxa: outgroup.add(genome_id) self.logger.info('Identifying %d genomes in the outgroup.' % len(outgroup)) reroot = RerootTree() reroot.root_with_outgroup(options.input_tree, options.output_tree, outgroup)
def midpoint(self, options): """"Midpoint root tree.""" reroot = RerootTree() reroot.midpoint(options.input_tree, options.output_tree)