From f617bca3f5298454f8944205f84ae77e0c59ca4b Mon Sep 17 00:00:00 2001 From: zsloan Date: Wed, 6 Jan 2021 11:53:04 -0600 Subject: Added line to views.py to fixes error if the genotype file contains samples not listed in the DB --- wqflask/wqflask/views.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py index c136711e..6b706b3f 100644 --- a/wqflask/wqflask/views.py +++ b/wqflask/wqflask/views.py @@ -643,8 +643,9 @@ def loading_page(): samples = genofile_samples for sample in samples: - if sample_vals_dict[sample] != "x": - n_samples += 1 + if sample in sample_vals_dict: + if sample_vals_dict[sample] != "x": + n_samples += 1 start_vars['n_samples'] = n_samples start_vars['wanted_inputs'] = initial_start_vars['wanted_inputs'] @@ -749,10 +750,9 @@ def mapping_results_page(): rendered_template = render_template("mapping_error.html") return rendered_template except: - rendered_template = render_template("mapping_error.html") - return rendered_template + rendered_template = render_template("mapping_error.html") + return rendered_template - #if template_vars.mapping_method != "gemma" and template_vars.mapping_method != "plink": template_vars.js_data = json.dumps(template_vars.js_data, default=json_default_handler, indent=" ") -- cgit v1.2.3