From 4729abd0ab7a8fbeb700a278ac8bdfcf62ab79ac Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Sat, 10 Feb 2024 06:57:23 +0300 Subject: Collect and display errors on 'geno' files in the bundle. --- qc_app/static/css/styles.css | 6 +--- qc_app/templates/rqtl2/rqtl2-qc-job-error.html | 49 +++++++++++++++++++++++++- qc_app/upload/rqtl2.py | 6 ++++ 3 files changed, 55 insertions(+), 6 deletions(-) (limited to 'qc_app') diff --git a/qc_app/static/css/styles.css b/qc_app/static/css/styles.css index 474c7f7..79dab0e 100644 --- a/qc_app/static/css/styles.css +++ b/qc_app/static/css/styles.css @@ -134,11 +134,7 @@ form fieldset:nth-child(odd) { } @media(min-width: 1250px) { - form { - width: 65ch; - } - - .explainer { + form, .explainer, .error-table { width: 65ch; } } diff --git a/qc_app/templates/rqtl2/rqtl2-qc-job-error.html b/qc_app/templates/rqtl2/rqtl2-qc-job-error.html index f9a912c..49df061 100644 --- a/qc_app/templates/rqtl2/rqtl2-qc-job-error.html +++ b/qc_app/templates/rqtl2/rqtl2-qc-job-error.html @@ -3,6 +3,31 @@ {%block title%}R/qtl2 bundle: QC Job Error{%endblock%} +{%macro errors_table(tableid, errors)%} + + + + + + + + + + + {%for error in errors%} + + + + + + + {%endfor%} + +
LineColumnValueMessage
{{error.line}}{{error.column}}{{error.value}}{{error.message}}
+{%endmacro%} + {%block contents%}

R/qtl2 bundle: QC job Error

@@ -24,7 +49,29 @@ {%endif%} -

list other errors here by file type, I think …

+{%if errorsgeno | length > 0%} +

Geno Errors ({{errorsgeno | length}})

+
+ We found the following errors in the 'geno' file in your R/qtl2 bundle: +
+{{errors_table("tbl-errors-geno", errorsgeno[0:50])}} +{%endif%} + +{%if errorspheno | length > 0%} +

Pheno Errors ({{errorspheno | length}})

+
+ We found the following errors in the 'pheno' file in your R/qtl2 bundle: +
+{{errorspheno}} +{%endif%} + +{%if errorsphenocovar | length > 0%} +

Phenocovar Errors ({{errorsphenocovar | length}})

+
+ We found the following errors in the 'phenocovar' file in your R/qtl2 bundle: +
+{{errorsphenocovar}} +{%endif%}

stdout

{{cli_output(job, "stdout")}} diff --git a/qc_app/upload/rqtl2.py b/qc_app/upload/rqtl2.py index 4b00891..c45952c 100644 --- a/qc_app/upload/rqtl2.py +++ b/qc_app/upload/rqtl2.py @@ -207,6 +207,12 @@ def rqtl2_bundle_qc_status(jobid: UUID): job=thejob, errorsgeneric=json.loads( thejob.get("errors-generic", "[]")), + errorsgeno=json.loads( + thejob.get("errors-geno", "[]")), + errorspheno=json.loads( + thejob.get("errors-pheno", "[]")), + errorsphenocovar=json.loads( + thejob.get("errors-phenocovar", "[]")), messages=logmessages) if jobstatus == "success": jobmeta = json.loads(thejob["job-metadata"]) -- cgit v1.2.3