diff --git a/genomic_address_service/call.py b/genomic_address_service/call.py index e267689..0e7cc9f 100644 --- a/genomic_address_service/call.py +++ b/genomic_address_service/call.py @@ -98,7 +98,7 @@ def run_call(config): if thresh_map_file is not None: threshold_map = json.load(open(thresh_map_file,'r')) else: - threshold_map = init_threshold_map(membership_file,thresholds) + threshold_map = init_threshold_map(thresholds) run_data['threshold_map'] = threshold_map diff --git a/genomic_address_service/utils.py b/genomic_address_service/utils.py index 5ff9ba6..2453cd9 100644 --- a/genomic_address_service/utils.py +++ b/genomic_address_service/utils.py @@ -71,21 +71,10 @@ def write_cluster_assignments(file ,memberships, threshold_map, outfmt, delimete else: fp.write(file, df, compression='GZIP') -def init_threshold_map(file,thresholds): +def init_threshold_map(thresholds): thresh_map = {} - df = pd.read_csv(file,header=0,sep="\t") - cols = df.columns.values.tolist() - valid_cols = [] - for idx,value in enumerate(cols): - if value in ['sample_id','id','ST','nomenclature','address']: - continue - valid_cols.append(value) - - if len(valid_cols) != len(thresholds): - return {} - - for idx,value in enumerate(valid_cols): - thresh_map[value] = thresholds[idx] + for idx,value in enumerate(thresholds): + thresh_map[idx] = value return thresh_map