Commit 187af22c authored by Hanna  JULIENNE's avatar Hanna JULIENNE

broad error handling

parent a8b212a9
Pipeline #45166 passed with stages
in 1 minute and 13 seconds
...@@ -177,6 +177,7 @@ def impg_like_imputation(ld_file, ref_panel, zscore, window_size, buffer, lamb, ...@@ -177,6 +177,7 @@ def impg_like_imputation(ld_file, ref_panel, zscore, window_size, buffer, lamb,
zt = zscore.loc[known,'Z'] zt = zscore.loc[known,'Z']
if(len(known) > 0): if(len(known) > 0):
print("Imputation for window {0} - {1}".format(start_windows,end_windows ))
imp = raiss_model(zt, sig_t, sig_i_t, lamb=lamb, rcond=rcond, batch=True) imp = raiss_model(zt, sig_t, sig_i_t, lamb=lamb, rcond=rcond, batch=True)
try: try:
batch_df = format_result_df(imp, ref_panel, known, unknowns) batch_df = format_result_df(imp, ref_panel, known, unknowns)
...@@ -191,8 +192,8 @@ def impg_like_imputation(ld_file, ref_panel, zscore, window_size, buffer, lamb, ...@@ -191,8 +192,8 @@ def impg_like_imputation(ld_file, ref_panel, zscore, window_size, buffer, lamb,
print(batch_df) print(batch_df)
batch_df_filt = batch_df.loc[(in_core_window & snp_well_predicted), zscore_results.columns] batch_df_filt = batch_df.loc[(in_core_window & snp_well_predicted), zscore_results.columns]
zscore_results = pd.concat([zscore_results, batch_df_filt]) zscore_results = pd.concat([zscore_results, batch_df_filt])
except (ValueError, KeyError) as e: except (ValueError, KeyError, TypeError) as e:
print("Inversion failed for window {0} - {1}".format()) print("Inversion failed for window {0} - {1}".format(start_windows,end_windows ))
print("With error : {}".format(e)) print("With error : {}".format(e))
i = i+1 i = i+1
print_progression(i, Nwindows) print_progression(i, Nwindows)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment