def setUp(self): self.output_directory_path = os.path.join(my_path, 'test-decomposition') self.decomposer = Decomposer() self.decomposer.alignment = os.path.join(my_path, 'files/clone43-v6v4.fa') self.decomposer.min_entropy = 0.2 self.decomposer.min_actual_abundance = 1 self.decomposer.min_substantive_abundance = 0 self.decomposer.number_of_discriminants = 3 self.decomposer.progress.verbose = False self.decomposer.run.verbose = False self.decomposer.skip_removing_outliers = True self.decomposer.skip_agglomerating_nodes = True self.decomposer.output_directory = self.output_directory_path
def setUp(self): self.output_directory_path = os.path.join(my_path, 'test-decomposition-threaded') self.decomposer = Decomposer() self.decomposer.alignment = os.path.join(my_path, 'files/reads-noisy.fa') self.decomposer.min_entropy = 0.3 self.decomposer.min_actual_abundance = 0 self.decomposer.min_substantive_abundance = 2 self.decomposer.skip_check_input_file = True self.decomposer.number_of_discriminants = 1 self.decomposer.progress.verbose = False self.decomposer.run.verbose = False self.decomposer.skip_removing_outliers = False self.decomposer.relocate_outliers = True self.decomposer.skip_agglomerating_nodes = True self.decomposer.threading = True self.decomposer.output_directory = self.output_directory_path
# # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) # any later version. # # Please read the COPYING file. import os import sys from Oligotyping.lib.decomposer import Decomposer from Oligotyping.utils.utils import ConfigError from Oligotyping.utils import parsers # med_out_dir = '/Users/humebc/phylogenetic_software/med_hume' # path_to_file = '/Users/humebc/phylogenetic_software/med_hume/test_fasta.fasta' # ['-M', '4', '--skip-gexf-files', '--skip-gen-figures', '--skip-gen-html', '--skip-check-input', '-o', med_out_dir, # path_to_file] parser = parsers.decomposer() decomposer = Decomposer(parser.parse_args()) try: decomposer.decompose() except ConfigError as e: print(e) sys.exit(-1)
# Software Foundation; either version 2 of the License, or (at your option) # any later version. # # Please read the COPYING file. import os import sys import cPickle from Oligotyping.lib.decomposer import Decomposer from Oligotyping.utils.utils import get_samples_dict_from_environment_file runinfo = cPickle.load(open(sys.argv[1])) sample_mapping = sys.argv[2] decomposer = Decomposer() decomposer.matrix_percent_file_path = runinfo['matrix_percent_file_path'] decomposer.matrix_count_file_path = runinfo['matrix_count_file_path'] decomposer.tmp_directory = runinfo['tmp_directory'] decomposer.output_directory = runinfo['output_directory'] decomposer.figures_directory = os.path.join( os.path.dirname(runinfo['figures_directory']), 'FIGURES') if not os.path.exists(decomposer.tmp_directory): os.makedirs(decomposer.tmp_directory) decomposer.sample_mapping = sample_mapping decomposer._init_logger('exclusive_figures.log') decomposer.samples_dict = get_samples_dict_from_environment_file( runinfo['environment_file_path']) decomposer.samples = sorted(decomposer.samples_dict.keys())