@@ -42,10 +42,9 @@ def run_impute(
4242    conf_file = "../conf/minimal-configuration.json" ,
4343    project_dir_graph = "" ,
4444    project_dir_in_file = "" ,
45-     hap_pop_pair   =   False ,
46-     graph   =   None 
45+     hap_pop_pair = False ,
46+     graph = None , 
4747):
48- 
4948    configuration_file  =  conf_file 
5049
5150    # project_dir = ""# "../" 
@@ -81,12 +80,24 @@ def run_impute(
8180        +  json_conf .get ("edges_csv_file" ),
8281        "imputation_input_file" : project_dir_in_file 
8382        +  json_conf .get ("imputation_in_file" ),
84-         "imputation_out_umug_freq_file" : full_path (output_dir , json_conf .get ("imputation_out_umug_freq_filename" )),
85-         "imputation_out_umug_pops_file" : full_path (output_dir , json_conf .get ("imputation_out_umug_pops_filename" )),
86-         "imputation_out_hap_freq_file" : full_path (output_dir , json_conf .get ("imputation_out_hap_freq_filename" )),
87-         "imputation_out_hap_pops_file" : full_path (output_dir , json_conf .get ("imputation_out_hap_pops_filename" )),
88-         "imputation_out_miss_file" : full_path (output_dir , json_conf .get ("imputation_out_miss_filename" )),
89-         "imputation_out_problem_file" : full_path (output_dir , json_conf .get ("imputation_out_problem_filename" )),
83+         "imputation_out_umug_freq_file" : full_path (
84+             output_dir , json_conf .get ("imputation_out_umug_freq_filename" )
85+         ),
86+         "imputation_out_umug_pops_file" : full_path (
87+             output_dir , json_conf .get ("imputation_out_umug_pops_filename" )
88+         ),
89+         "imputation_out_hap_freq_file" : full_path (
90+             output_dir , json_conf .get ("imputation_out_hap_freq_filename" )
91+         ),
92+         "imputation_out_hap_pops_file" : full_path (
93+             output_dir , json_conf .get ("imputation_out_hap_pops_filename" )
94+         ),
95+         "imputation_out_miss_file" : full_path (
96+             output_dir , json_conf .get ("imputation_out_miss_filename" )
97+         ),
98+         "imputation_out_problem_file" : full_path (
99+             output_dir , json_conf .get ("imputation_out_problem_filename" )
100+         ),
90101        "factor_missing_data" : json_conf .get ("factor_missing_data" , 0.01 ),
91102        "loci_map" : json_conf .get (
92103            "loci_map" , {"A" : 1 , "B" : 3 , "C" : 2 , "DQB1" : 4 , "DRB1" : 5 }
@@ -180,7 +191,7 @@ def run_impute(
180191
181192    config ["full_loci" ] =  "" .join (sorted (all_loci_set ))
182193    # Perform imputation 
183-     if  graph == None :
194+     if  graph   ==   None :
184195        graph  =  Graph (config )
185196        graph .build_graph (
186197            config ["node_file" ], config ["top_links_file" ], config ["edges_file" ]
0 commit comments