From 6462099372626e11706219a695e8303250359510 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 21 Feb 2024 09:19:24 +0300 Subject: Pass 'filename' value to error checker function. --- scripts/qc_on_rqtl2_bundle.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/qc_on_rqtl2_bundle.py b/scripts/qc_on_rqtl2_bundle.py index 027f387..37b8a9e 100644 --- a/scripts/qc_on_rqtl2_bundle.py +++ b/scripts/qc_on_rqtl2_bundle.py @@ -97,7 +97,7 @@ def retrieve_errors_with_progress(rconn: Redis,#pylint: disable=[too-many-locals continue if value is not None: for checker in checkers: - error = checker(lineno, field, value) + error = checker(lineno=lineno, field=field, value=value) if bool(error): yield error __update_processed__(value) @@ -133,9 +133,10 @@ def qc_pheno_errors(rconn, fqjobid, zfile, logger) -> bool: 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),))) + perrs = check_pheno_samples(zfile.filename, logger) + tuple( + retrieve_errors_with_progress( + rconn,fqjobid, zfile, "pheno", + (partial(decimal_points_error, filename="pheno", mini=3),))) 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( -- cgit v1.2.3