Skip to content

Commit eae4736

Browse files
committed
style: fix spacing around assignments and function calls
1 parent f9a384c commit eae4736

File tree

2 files changed

+25
-11
lines changed

2 files changed

+25
-11
lines changed

grim/grim.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def graph_freqs(conf_file="", for_em=False, em_pop=None):
5454
)
5555

5656

57-
def impute(conf_file="", hap_pop_pair = False, graph = None):
57+
def impute(conf_file="", hap_pop_pair=False, graph=None):
5858

5959
project_dir_in_file, project_dir_graph = "", ""
6060
if conf_file == "":
@@ -70,7 +70,9 @@ def impute(conf_file="", hap_pop_pair = False, graph = None):
7070
project_dir_in_file = (
7171
os.path.dirname(os.path.realpath(__file__)).replace("/grim", "") + "/"
7272
)
73-
graph = run_impute(conf_file, project_dir_graph, project_dir_in_file, hap_pop_pair, graph)
73+
graph = run_impute(
74+
conf_file, project_dir_graph, project_dir_in_file, hap_pop_pair, graph
75+
)
7476
return graph
7577

7678

grim/run_impute_def.py

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ 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
):
4848

4949
configuration_file = conf_file
@@ -81,12 +81,24 @@ def run_impute(
8181
+ json_conf.get("edges_csv_file"),
8282
"imputation_input_file": project_dir_in_file
8383
+ 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")),
84+
"imputation_out_umug_freq_file": full_path(
85+
output_dir, json_conf.get("imputation_out_umug_freq_filename")
86+
),
87+
"imputation_out_umug_pops_file": full_path(
88+
output_dir, json_conf.get("imputation_out_umug_pops_filename")
89+
),
90+
"imputation_out_hap_freq_file": full_path(
91+
output_dir, json_conf.get("imputation_out_hap_freq_filename")
92+
),
93+
"imputation_out_hap_pops_file": full_path(
94+
output_dir, json_conf.get("imputation_out_hap_pops_filename")
95+
),
96+
"imputation_out_miss_file": full_path(
97+
output_dir, json_conf.get("imputation_out_miss_filename")
98+
),
99+
"imputation_out_problem_file": full_path(
100+
output_dir, json_conf.get("imputation_out_problem_filename")
101+
),
90102
"factor_missing_data": json_conf.get("factor_missing_data", 0.01),
91103
"loci_map": json_conf.get(
92104
"loci_map", {"A": 1, "B": 3, "C": 2, "DQB1": 4, "DRB1": 5}
@@ -180,7 +192,7 @@ def run_impute(
180192

181193
config["full_loci"] = "".join(sorted(all_loci_set))
182194
# Perform imputation
183-
if graph==None:
195+
if graph == None:
184196
graph = Graph(config)
185197
graph.build_graph(
186198
config["node_file"], config["top_links_file"], config["edges_file"]

0 commit comments

Comments
 (0)