aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-02-21 09:19:24 +0300
committerFrederick Muriuki Muriithi2024-02-21 09:19:24 +0300
commit6462099372626e11706219a695e8303250359510 (patch)
tree33be5ad00867bcb4c9ca5b4ee112de8803d8c49b
parentce243a57b24d6adecb169487e706290d91b22d19 (diff)
downloadgn-uploader-6462099372626e11706219a695e8303250359510.tar.gz
Pass 'filename' value to error checker function.
-rw-r--r--scripts/qc_on_rqtl2_bundle.py9
1 files 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(