import time import cwt import commonfn start_time = time.time() param_set={ "mzML_files", "min_highest_I", "num_threads", "library", "RT_shift", "pos/neg mode", "ms1_ppm", } param_dict=commonfn.read_param(param_set) mzML_files=sorted(glob.glob(param_dict["mzML_files"])) num_threads=int(param_dict["num_threads"]) ispos=True if param_dict['pos/neg mode']=='pos' else False ms1ppm=float(param_dict['ms1_ppm'])/1e6 min_group_size=2#int(param_dict["min_group_size"]) min_highest_I=float(param_dict["min_highest_I"]) group_I_threshold=min_highest_I#float(param_dict["group_I_threshold"]) lib_types=param_dict["library"].splitlines() RT_shift=float(param_dict['RT_shift'])
import collections import operator import math from bisect import bisect_left import sys import concurrent.futures import os import glob from multiprocessing import freeze_support import time import commonfn Peak = commonfn.Peak param_dict = commonfn.read_param({"length_of_ion_chromatogram"}) peak_w = [int(x) for x in param_dict["length_of_ion_chromatogram"].split()] min_feat_height = 1 min_auc = min_feat_height * 2 Coef = collections.namedtuple('Coef', ('rt sc coef')) def findridge0(wave_scales, wave_sqrt, rerun, rerunw, EIC): eic_dict = {rt: i for rt, i in EIC} rt_all = sorted(eic_dict) eic_rt = set() for x, y in eic_dict.items(): pos = bisect_left(rt_all, x)