diff --git a/src/frontend_celery/webapp/io/download_routes.py b/src/frontend_celery/webapp/io/download_routes.py index 8e92ab2c..d9aebc13 100644 --- a/src/frontend_celery/webapp/io/download_routes.py +++ b/src/frontend_celery/webapp/io/download_routes.py @@ -379,8 +379,9 @@ def calculate_class(scheme_type = None, version = None, selected_classes = ''): return jsonify({'final_class': '-'}) selected_classes = selected_classes.split('+') - #scheme = request.args.get('scheme') + #print(scheme_type) + #print(version) #print(selected_classes) final_class = None diff --git a/src/frontend_celery/webapp/variant/variant_functions.py b/src/frontend_celery/webapp/variant/variant_functions.py index ff0eaf8d..e85c6236 100644 --- a/src/frontend_celery/webapp/variant/variant_functions.py +++ b/src/frontend_celery/webapp/variant/variant_functions.py @@ -358,7 +358,7 @@ def extract_criteria_from_request(request_obj, scheme_id, conn: Connection): return criteria # criteria dict from the extract criteria request function is the input -def get_scheme_class(criteria_dict, scheme_type): +def get_scheme_class(criteria_dict, scheme_type, version): all_criteria_strengths = [] keyval = 'strength' if scheme_type == 'task-force': @@ -367,7 +367,7 @@ def get_scheme_class(criteria_dict, scheme_type): if criteria_dict[key]['is_selected'] == 1: all_criteria_strengths.append(criteria_dict[key][keyval]) all_criteria_string = '+'.join(all_criteria_strengths) - scheme_class = calculate_class(scheme_type, all_criteria_string) + scheme_class = calculate_class(scheme_type, version, all_criteria_string) return scheme_class diff --git a/src/frontend_celery/webapp/variant/variant_routes.py b/src/frontend_celery/webapp/variant/variant_routes.py index aebb1101..d9c023b9 100644 --- a/src/frontend_celery/webapp/variant/variant_routes.py +++ b/src/frontend_celery/webapp/variant/variant_routes.py @@ -394,7 +394,7 @@ def classify(variant_id): scheme_id_is_valid = True if not without_scheme: if scheme_id in classification_schemas: - scheme_class = get_scheme_class(criteria, classification_schemas[scheme_id]['scheme_type']) + scheme_class = get_scheme_class(criteria, classification_schemas[scheme_id]['scheme_type'], classification_schemas[scheme_id]['version']) scheme_class = scheme_class.json['final_class'] else: flash("Unknown or deprecated classification scheme provided. Please provide a different one.", "alert-danger") @@ -528,7 +528,7 @@ def consensus_classify(variant_id): scheme_id_is_valid = True if scheme_id in classification_schemas: - scheme_class = get_scheme_class(criteria, classification_schemas[scheme_id]['scheme_type']) # always calculate scheme class because no scheme is not allowed here! + scheme_class = get_scheme_class(criteria, classification_schemas[scheme_id]['scheme_type'], classification_schemas[scheme_id]['version']) # always calculate scheme class because no scheme is not allowed here! scheme_class = scheme_class.json['final_class'] else: flash("Unknown or deprecated classification scheme provided. Please provide a different one.", "alert-danger")