aboutsummaryrefslogtreecommitdiff
path: root/qc_app
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-02-10 06:57:23 +0300
committerFrederick Muriuki Muriithi2024-02-12 18:17:40 +0300
commit4729abd0ab7a8fbeb700a278ac8bdfcf62ab79ac (patch)
treeb9fbf2d0a312afcc0336d8ee3d3d97d1673a229a /qc_app
parent445a28579e2139654132643cf9595acfd402c283 (diff)
downloadgn-uploader-4729abd0ab7a8fbeb700a278ac8bdfcf62ab79ac.tar.gz
Collect and display errors on 'geno' files in the bundle.
Diffstat (limited to 'qc_app')
-rw-r--r--qc_app/static/css/styles.css6
-rw-r--r--qc_app/templates/rqtl2/rqtl2-qc-job-error.html49
-rw-r--r--qc_app/upload/rqtl2.py6
3 files changed, 55 insertions, 6 deletions
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)%}
+<table id="{{tableid}}"
+ class="error-table"
+ style="display: block; overflow: scroll; max-height: 250px;">
+ <thead style="position: sticky; top: 0;">
+ <tr>
+ <th>Line</th>
+ <th>Column</th>
+ <th>Value</th>
+ <th>Message</th>
+ </tr>
+ </thead>
+ <tbody>
+ {%for error in errors%}
+ <tr>
+ <td>{{error.line}}</td>
+ <td>{{error.column}}</td>
+ <td>{{error.value}}</td>
+ <td>{{error.message}}</td>
+ </tr>
+ {%endfor%}
+ </tbody>
+</table>
+{%endmacro%}
+
{%block contents%}
<h1 class="heading">R/qtl2 bundle: QC job Error</h1>
@@ -24,7 +49,29 @@
</ul>
{%endif%}
-<p><emph>list other errors here by file type, I think &hellip;</emph></p>
+{%if errorsgeno | length > 0%}
+<h2 class="heading">Geno Errors ({{errorsgeno | length}})</h3>
+<div class="explainer">
+ We found the following errors in the 'geno' file in your R/qtl2 bundle:
+</div>
+{{errors_table("tbl-errors-geno", errorsgeno[0:50])}}
+{%endif%}
+
+{%if errorspheno | length > 0%}
+<h2 class="heading">Pheno Errors ({{errorspheno | length}})</h3>
+<div class="explainer">
+ We found the following errors in the 'pheno' file in your R/qtl2 bundle:
+</div>
+{{errorspheno}}
+{%endif%}
+
+{%if errorsphenocovar | length > 0%}
+<h2 class="heading">Phenocovar Errors ({{errorsphenocovar | length}})</h3>
+<div class="explainer">
+ We found the following errors in the 'phenocovar' file in your R/qtl2 bundle:
+</div>
+{{errorsphenocovar}}
+{%endif%}
<h4>stdout</h4>
{{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"])