From 445a28579e2139654132643cf9595acfd402c283 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 9 Feb 2024 17:31:06 +0300 Subject: Add scaffolding for running individual files' QC checks --- scripts/qc_on_rqtl2_bundle.py | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/qc_on_rqtl2_bundle.py b/scripts/qc_on_rqtl2_bundle.py index 63729b4..43f766a 100644 --- a/scripts/qc_on_rqtl2_bundle.py +++ b/scripts/qc_on_rqtl2_bundle.py @@ -43,7 +43,21 @@ def qc_missing_files(rconn: Redis, fqjobid: str, return missing -def run_qc(rconn: Redis, args: Namespace, logger: Logger) -> int: +def qc_geno_errors(_rconn, _fqjobid, _job) -> bool: + """Check for errors in `geno` file(s).""" + return False + +def qc_pheno_errors(_rconn, _fqjobid, _job) -> bool: + """Check for errors in `pheno` file(s).""" + return False + +def qc_phenocovar_errors(_rconn, _fqjobid, _job) -> bool: + """Check for errors in `phenocovar` file(s).""" + return False + +def run_qc(rconn: Redis, + args: Namespace, + logger: Logger) -> int: """Run the QC programs.""" fqjobid = jobs.job_key(args.redisprefix, args.jobid) thejob = parse_job(rconn, args.redisprefix, args.jobid) @@ -53,7 +67,12 @@ def run_qc(rconn: Redis, args: Namespace, logger: Logger) -> int: logger.error("Missing files in the bundle!") return 1 - return 0 + return ( + 1 if any(( + qc_geno_errors(rconn, fqjobid, thejob), + qc_pheno_errors(rconn, fqjobid, thejob), + qc_phenocovar_errors(rconn, fqjobid, thejob))) + else 0) if __name__ == "__main__": def main(): -- cgit v1.2.3