Commit 0445c550 authored by Hanna  JULIENNE's avatar Hanna JULIENNE
Browse files

Update imputation_R2.py

parent 8baaed07
Pipeline #52636 passed with stages
in 1 minute and 41 seconds
...@@ -143,7 +143,7 @@ def grid_search(zscore_folder, masked_folder, output_folder, ...@@ -143,7 +143,7 @@ def grid_search(zscore_folder, masked_folder, output_folder,
eigen_ratio_grid = [0.5, 0.1, 0.01], window_size= 500000, eigen_ratio_grid = [0.5, 0.1, 0.01], window_size= 500000,
buffer_size=125000, l2_regularization=0.1, R2_threshold=0.6, buffer_size=125000, l2_regularization=0.1, R2_threshold=0.6,
N_to_mask=5000,ref_panel_suffix=".eur.1pct.bim", ld_type="plink", N_to_mask=5000,ref_panel_suffix=".eur.1pct.bim", ld_type="plink",
stratifying_vector=None, stratifying_bins=None): stratifying_vector=None, stratifying_bins=None, LD_threshold=4):
""" """
Compute the imputation performance for several eigen ratioself. Compute the imputation performance for several eigen ratioself.
The procedure is the following: The procedure is the following:
...@@ -184,7 +184,7 @@ def grid_search(zscore_folder, masked_folder, output_folder, ...@@ -184,7 +184,7 @@ def grid_search(zscore_folder, masked_folder, output_folder,
save_chromosome_imputation(gwas, chrom, window_size, buffer_size, save_chromosome_imputation(gwas, chrom, window_size, buffer_size,
l2_regularization, cond, masked_folder, l2_regularization, cond, masked_folder,
ref_folder, ld_folder, output_folder, ref_folder, ld_folder, output_folder,
R2_threshold, tag, ref_panel_suffix, ld_type) R2_threshold, tag, ref_panel_suffix, ld_type, minimum_ld = LD_threshold)
n_cpu = multiprocessing.cpu_count() n_cpu = multiprocessing.cpu_count()
Parallel(n_jobs=n_cpu)(delayed(run_imputation)(rd) for rd in eigen_ratio_grid) Parallel(n_jobs=n_cpu)(delayed(run_imputation)(rd) for rd in eigen_ratio_grid)
......
Supports Markdown
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