def setup_logging(log_dir, debug): logfile = os.path.join(log_dir, 'abstar.log') debug = True if debug > 0 else False print_debug = True if debug == 2 else False log.setup_logging(logfile, debug=debug) global logger logger = log.get_logger('abstar')
def run_standalone(args): logfile = args.log if args.log else os.path.join(args.output, 'abcompare.log') log.setup_logging(logfile) global logger logger = log.get_logger('abcompare') main(args)
def run_standalone(args): logfile = args.log if args.log else os.path.join(args.output_dir, 'abfinder.log') log.setup_logging(logfile) global logger logger = log.get_logger('abfinder') main(args)
print_standards_info(standards) collections = mongodb.get_collections(db, args.collection, prefix=args.collection_prefix) print_collections_info(collections) for collection in collections: indexed = False print_single_collection(collection) if args.remove_padding: print_remove_padding() mongodb.remove_padding(db, collection) seq_files = get_sequences(db, collection, args.temp_dir, args) for standard in standards: print_single_standard(standard) scores = run_jobs(seq_files, standard, args) if args.output_dir: make_figure(standard.id, scores, collection, args) if args.update: if not indexed: mongodb.index(db, collection, 'seq_id') indexed = True update_db(db, standard.id, scores, collection, args) clean_up(seq_files) if __name__ == '__main__': parser = parse_args() args = parser.parse_args() logfile = args.log if args.log else os.path.join(args.output_dir, 'abfinder.log') log.setup_logging(logfile) logger = log.get_logger('abfinder') main(args)
def run_standalone(args): global logger logger = log.get_logger('demultiplex') main(args) def main(args): for f in list_files(args.input): experiment = get_experiment(f, args) wb = load_workbook(f) ws = wb[wb.get_sheet_names()[0]] plate_blocks = get_plate_blocks(ws, args) plural = '' if len(plate_blocks) <= 2 else 's' logger.info('\nFound {} plate{} in the input file'.format( len(plate_blocks) - 1, plural)) logger.info('Experiment name: {}\n'.format(experiment)) plates = parse_plates(plate_blocks[1:], args) write_output(plates, experiment, args) logger.info('') if __name__ == '__main__': args = parse_args() if args.log is None: args.log = os.path.join(args.output, 'platemap.log') log.setup_logging(args.log) logger = log.get_logger('demultiplex') main(args)