def run_subtool(parser, args): if args.command == 'combine': import combine as submodule elif args.command == 'events': import events as submodule elif args.command == 'fasta': import fasta as submodule elif args.command == 'fastq': import fastq as submodule elif args.command == 'hist': import hist as submodule elif args.command == 'nucdist': import nucdist as submodule elif args.command == 'occupancy': import occupancy as submodule elif args.command == 'qualdist': import qualdist as submodule elif args.command == 'readstats': import readstats as submodule elif args.command == 'stats': import stats as submodule elif args.command == 'tabular': import tabular as submodule elif args.command == 'times': import times as submodule elif args.command == 'squiggle': import squiggle as submodule elif args.command == 'winner': import winner as submodule elif args.command == 'yield_plot': import yield_plot as submodule # run the chosen submodule. submodule.run(parser, args)
def main(): """ Run program """ cmn.make_dir(cmn.LOG_DIR) logging.basicConfig( # filename=os.path.join(cmn.LOG_DIR, cmn.LOG_FILE_NAME % time.strftime(cmn.LOG_FILE_NAME_TIME)), handlers=[ logging.FileHandler( os.path.join( cmn.LOG_DIR, cmn.LOG_FILE_NAME % time.strftime(cmn.LOG_FILE_NAME_TIME))), logging.StreamHandler() ], level=cmn.LOG_LEVEL, format=cmn.LOG_MSG_FORMAT, datefmt=cmn.LOG_TIME_FORMAT) start_time = time.time() logging.info("Starting program ...\n") if "-hmo" in sys.argv: logging.info( "Detected 'heatmap only' command line argument, program will use pre-existing combined PTEN correlation file.\n" ) else: combine.run() heatmap.run() logging.info("Finished running program.") run_time = time.time() - start_time logging.info("Total run time: %s.\n" % time.strftime('%H:%M:%S', time.gmtime(run_time)))
def run_combine(): import combine file_list = [] output_path = sys.argv[2] for i in range(3, len(sys.argv)): file_list.append(sys.argv[i]) combine.run(output_path, file_list)
def run_combine(output_path, file_list): import combine combine.run(output_path, file_list)
def run(self): combine_to = Path(self.output().path) combine_to.parent.mkdir(parents=True, exist_ok=True) combine.run(combine_to, [Path(input_.path) for input_ in self.input()])