Пример #1
0
        log.critical('Starting Apex for %s ...',file_name)
        log.critical('moff Input file: %s  XIC_tol %s XIC_win %4.4f moff_rtWin_peak %4.4f ' % (file_name, tol, h_rt_w, s_w))
        if args.raw_list is None:
            log.critical('RAW file from folder :  %s' % loc_raw)
        else:
            log.critical('RAW file  :  %s' % args.raw_list)
        log.critical('Output file in :  %s', loc_output)
        if 'matched' in df.columns:
            log.critical('Apex module has detected mbr peptides')

        #print 'Original input size', df.shape
        name = os.path.basename(file_name).split('.')[0]
        #multithreadlogs.LoggingInit_apex(os.path.join(loc_output, name + '__moff.log'))

        moff.check_log_existence(os.path.join(loc_output, name + '__moff.log'))

        myPool = multiprocessing.Pool(num_CPU)

        start_time= time.time()
        result = {}
        offset = 0
        for df_index in range(0,len(data_split)):

            result[df_index] = myPool.apply_async(moff.apex_multithr,args = (data_split[df_index],name,raw_list, tol, h_rt_w, s_w, s_w_match, loc_raw, loc_output, offset ))
            offset += len(data_split[df_index])


        myPool.close()
        myPool.join()
        log.critical('...apex terminated')
Пример #2
0
    if 'off' in args.mbr:
        # put everython in mbr_loc
        output_list_loc = []
        if not (args.loc_in is None):
            for item in os.listdir(args.loc_in):
                # log.critical(item)
                if os.path.isfile(os.path.join(args.loc_in, item)):
                    if os.path.join(args.loc_in, item).endswith('.' + args.ext):
                        output_list_loc.append(os.path.join(args.loc_in, item))
        else:
            output_list_loc = args.tsv_list

    for c, file_name in enumerate(output_list_loc):
        name = os.path.basename(file_name).split('.')[0]
        moff.check_log_existence(os.path.join(
            args.loc_out, name + '__moff.log'))
        fh = logging.FileHandler(os.path.abspath(
            os.path.join(args.loc_out, name + '__moff.log')), mode='a')
        fh.setLevel(logging.DEBUG)

        log.addHandler(fh)

        log_file = os.path.join(args.loc_out, name + '__moff.log')
        tol = args.tol
        h_rt_w = args.xic_length
        s_w = args.rt_peak_win
        s_w_match = args.rt_peak_win_match

        if args.tsv_list is not None:
            # raw_list contains the current raws file provided by args.raw_list option
            raw_list = args.raw_list[c]