aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qc_app/templates/rqtl2/rqtl2-qc-job-error.html2
-rw-r--r--scripts/qc_on_rqtl2_bundle.py15
2 files changed, 14 insertions, 3 deletions
diff --git a/qc_app/templates/rqtl2/rqtl2-qc-job-error.html b/qc_app/templates/rqtl2/rqtl2-qc-job-error.html
index e809e7c..1650a79 100644
--- a/qc_app/templates/rqtl2/rqtl2-qc-job-error.html
+++ b/qc_app/templates/rqtl2/rqtl2-qc-job-error.html
@@ -87,7 +87,7 @@
<div class="explainer">
We found the following errors in the 'pheno' file in your R/qtl2 bundle:
</div>
-{{errorspheno}}
+{{errors_table("tbl-errors-pheno", errorspheno[0:50])}}
{%endif%}
{%if errorsphenocovar | length > 0%}
diff --git a/scripts/qc_on_rqtl2_bundle.py b/scripts/qc_on_rqtl2_bundle.py
index 02c8c3a..aea1baa 100644
--- a/scripts/qc_on_rqtl2_bundle.py
+++ b/scripts/qc_on_rqtl2_bundle.py
@@ -58,7 +58,7 @@ def qc_missing_files(rconn: Redis,
def qc_geno_errors(rconn, fqjobid, zfile, logger) -> bool:
"""Check for errors in `geno` file(s)."""
- logger.info("Checking for geno errors…")
+ logger.info("Checking for errors in the 'geno' file…")
gerrs = tuple(rqc.geno_errors(zfile))
add_to_errors(rconn, fqjobid, "errors-generic", tuple(
err for err in gerrs if isinstance(err, rqfe.MissingFile)))
@@ -67,10 +67,21 @@ def qc_geno_errors(rconn, fqjobid, zfile, logger) -> bool:
if len(gerrs) > 0:
logger.error("The 'geno' file has errors.")
return True
+ logger.info("No errors found in the 'geno' file.")
return False
-def qc_pheno_errors(_rconn, _fqjobid, _zfile, _logger) -> bool:
+def qc_pheno_errors(rconn, fqjobid, zfile, logger) -> bool:
"""Check for errors in `pheno` file(s)."""
+ logger.info("Checking for errors in the 'pheno' file …")
+ perrs = tuple(rqc.pheno_errors(zfile))
+ add_to_errors(rconn, fqjobid, "errors-generic", tuple(
+ err for err in perrs if isinstance(err, rqfe.MissingFile)))
+ add_to_errors(rconn, fqjobid, "errors-pheno", tuple(
+ err for err in perrs if not isinstance(err, rqfe.MissingFile)))
+ if len(perrs) > 0:
+ logger.error("The 'pheno' file has errors.")
+ return True
+ logger.info("No errors found in the 'pheno' file.")
return False
def qc_phenocovar_errors(_rconn, _fqjobid, _zfile, _logger) -> bool: