Commit 9fcdbbb9 authored by Hanna  JULIENNE's avatar Hanna JULIENNE

Added ld_score to the output

parent 2ec760e8
......@@ -43,8 +43,9 @@ def prepare_zscore_for_imputation(ref_panel, zscore):
the snps that are not present in the ref panel are filtered
"""
zscore = realigned_zfiles_on_panel(ref_panel, zscore)
zscore['Var'] = 1
zscore['Var'] = -1
zscore['Nsnp_to_impute'] = -1
zscore['ld_score'] = -1
zscore = zscore.loc[zscore.index.intersection(ref_panel.index)]
return zscore
......@@ -138,8 +139,8 @@ def impg_like_imputation(ld_file, ref_panel, zscore, window_size, buffer, lamb,
in_core_window = in_region(batch_df.pos, start_core_window, end_core_window)
# keep only SNP with non negligible explained variance
snp_well_predicted = batch_df.Var < 0.5
batch_df_filt = batch_df_filt.loc[in_core_window & snp_well_predicted, zscore_results.columns]
snp_well_predicted = (batch_df.Var < 0.4)
batch_df_filt = batch_df.loc[in_core_window & snp_well_predicted, zscore_results.columns]
zscore_results = pd.concat([zscore_results, batch_df_filt])
i = i+1
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