aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/qc_on_rqtl2_bundle.py15
1 files changed, 13 insertions, 2 deletions
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: