diff --git a/src/frontend_celery/webapp/download/download_routes.py b/src/frontend_celery/webapp/download/download_routes.py index 0f1454a7..8f938b1d 100644 --- a/src/frontend_celery/webapp/download/download_routes.py +++ b/src/frontend_celery/webapp/download/download_routes.py @@ -306,27 +306,27 @@ def assay_report(assay_id): ######################################## # these can be used for debugging -#@download_blueprint.route('/download/annotation_errors') -#@require_permission(['admin_resources']) -#def annotation_errors(): -# conn = get_connection() -# -# download_file_name = "annotation_errors_" + functions.get_today() + ".tsv" -# -# annotation_stati, errors, warnings, total_num_variants = conn.get_annotation_statistics(exclude_sv=True) -# -# helper = io.StringIO() -# helper.write("#" + "\t".join(["chrom", "pos", "ref", "alt", "error_msg"]) + '\n') -# for variant_id in errors: -# variant = conn.get_variant(variant_id) -# new_line = "\t".join([variant.chrom, str(variant.pos), variant.ref, variant.alt, errors[variant_id]]) -# helper.write(new_line + "\n") -# -# buffer = io.BytesIO() -# buffer.write(helper.getvalue().encode()) -# buffer.seek(0) -# -# return send_file(buffer, as_attachment=True, download_name=download_file_name, mimetype="text") +@download_blueprint.route('/download/annotation_errors') +@require_permission(['admin_resources']) +def annotation_errors(): + conn = get_connection() + + download_file_name = "annotation_errors_" + functions.get_today() + ".tsv" + + annotation_stati, errors, warnings, total_num_variants = conn.get_annotation_statistics(exclude_sv=True) + + helper = io.StringIO() + helper.write("#" + "\t".join(["chrom", "pos", "ref", "alt", "error_msg"]) + '\n') + for variant_id in errors: + variant = conn.get_variant(variant_id) + new_line = "\t".join([variant.chrom, str(variant.pos), variant.ref, variant.alt, errors[variant_id]]) + helper.write(new_line + "\n") + + buffer = io.BytesIO() + buffer.write(helper.getvalue().encode()) + buffer.seek(0) + + return send_file(buffer, as_attachment=True, download_name=download_file_name, mimetype="text") #@download_blueprint.route('/recalculate_automatic_classes') diff --git a/src/frontend_celery/webapp/static/js/variant_import_summary.js b/src/frontend_celery/webapp/static/js/variant_import_summary.js index 8584cd2c..5a066bac 100644 --- a/src/frontend_celery/webapp/static/js/variant_import_summary.js +++ b/src/frontend_celery/webapp/static/js/variant_import_summary.js @@ -189,9 +189,9 @@ function create_td_form(text_content, url, params) { new_input.classList.add("visually_hidden") form.appendChild(new_input) - var tmp = document.createElement('div') - tmp.textContent = params['import_variant_queue_id'] - form.appendChild(tmp) + //var tmp = document.createElement('div') + //tmp.textContent = params['import_variant_queue_id'] + //form.appendChild(tmp) var submit_button = document.createElement('button') submit_button.classList.add("btn") diff --git a/src/frontend_celery/webapp/templates/user/variant_publish_history.html b/src/frontend_celery/webapp/templates/user/variant_publish_history.html index 80416a78..340cfdc1 100644 --- a/src/frontend_celery/webapp/templates/user/variant_publish_history.html +++ b/src/frontend_celery/webapp/templates/user/variant_publish_history.html @@ -31,7 +31,7 @@