aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-02-15 05:32:37 +0300
committerFrederick Muriuki Muriithi2024-02-15 05:32:37 +0300
commit8afa048a8dce9df6b03dfd5868c0dd0952eaec44 (patch)
tree8b9a5965811aefcf3159a26af59ea9c42453c993 /scripts
parent962e33e97116fd18ee166d49aa3b573ed4ce6378 (diff)
downloadgn-uploader-8afa048a8dce9df6b03dfd5868c0dd0952eaec44.tar.gz
Only log out information if the check is actually run.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/qc_on_rqtl2_bundle.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/qc_on_rqtl2_bundle.py b/scripts/qc_on_rqtl2_bundle.py
index dd5e73e..d77b6c2 100644
--- a/scripts/qc_on_rqtl2_bundle.py
+++ b/scripts/qc_on_rqtl2_bundle.py
@@ -111,9 +111,9 @@ def retrieve_errors_with_progress(rconn: Redis,#pylint: disable=[too-many-locals
def qc_geno_errors(rconn, fqjobid, zfile, logger) -> bool:
"""Check for errors in `geno` file(s)."""
- logger.info("Checking for errors in the 'geno' file…")
cdata = rqtl2.control_data(zfile)
if "geno" in cdata:
+ logger.info("Checking for errors in the 'geno' file…")
gerrs = tuple(retrieve_errors_with_progress(
rconn, fqjobid, zfile, "geno",
(rqc.make_genocode_checker(cdata.get("genotypes", {})),)))
@@ -124,15 +124,15 @@ 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.")
- logger.info("No errors found in the 'geno' file.")
return False
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…")
cdata = rqtl2.control_data(zfile)
if "pheno" in cdata:
+ logger.info("Checking for errors in the 'pheno' file…")
perrs = tuple(retrieve_errors_with_progress(
rconn,fqjobid, zfile, "pheno",
(partial(decimal_points_error, mini=3),)))
@@ -143,15 +143,15 @@ def qc_pheno_errors(rconn, fqjobid, zfile, logger) -> bool:
if len(perrs) > 0:
logger.error("The 'pheno' file has errors.")
return True
+ logger.info("No errors found in the 'pheno' file.")
- logger.info("No errors found in the 'pheno' file.")
return False
def qc_phenose_errors(rconn, fqjobid, zfile, logger) -> bool:
"""Check for errors in `phenose` file(s)."""
- logger.info("Checking for errors in the 'phenose' file…")
cdata = rqtl2.control_data(zfile)
if "phenose" in cdata:
+ logger.info("Checking for errors in the 'phenose' file…")
perrs = tuple(retrieve_errors_with_progress(
rconn,fqjobid, zfile, "phenose",
(partial(decimal_points_error, mini=6),)))
@@ -162,8 +162,8 @@ def qc_phenose_errors(rconn, fqjobid, zfile, logger) -> bool:
if len(perrs) > 0:
logger.error("The 'phenose' file has errors.")
return True
+ logger.info("No errors found in the 'phenose' file.")
- logger.info("No errors found in the 'phenose' file.")
return False
def qc_phenocovar_errors(_rconn, _fqjobid, _zfile, _logger) -> bool: