def __init__(self, args): """Class that handles the sorting of the seqs.""" A = lambda x: args.__dict__[x] if x in args.__dict__ else None self.sample_name = A('sample_name') self.input_fasta_path = A('input_fasta') self.output_db_path = A('output_db_path') self.run = terminal.Run() self.progress = terminal.Progress() self.stats_dict = collections.Counter() self.extractor = extractor.Extractor() self.db = None self.seq_count_dict = {}
def A(param_id): return D[param_id][0] def K(param_id, params_dict={}): kwargs = copy.deepcopy(D[param_id][1]) for key in params_dict: kwargs[key] = params_dict[key] return kwargs import tRNASeqTools.tables as t import tRNASeqTools.terminal as terminal run = terminal.Run() def set_version(): tRNASeqTools_version = 'unknown' try: tRNASeqTools_version = pkg_resources.require("tRNASeqTools")[0].version except: # maybe anvi'o is not installed but it is being run from the codebase dir? # some hacky stuff to get version from the setup.py try: setup_py_path = os.path.normpath( os.path.dirname(os.path.abspath(__file__))) + '/../setup.py' version_string = [ l.strip() for l in open(setup_py_path).readlines()