diff options
author | Frederick Muriuki Muriithi | 2024-02-09 17:31:06 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-02-12 18:17:40 +0300 |
commit | 445a28579e2139654132643cf9595acfd402c283 (patch) | |
tree | 7c786f9e66e0c3c9d2244e794fba6fd091195eb7 /scripts/qc_on_rqtl2_bundle.py | |
parent | a0d3ac85dab5bfba9107f63b3219902ebe32cdd9 (diff) | |
download | gn-uploader-445a28579e2139654132643cf9595acfd402c283.tar.gz |
Add scaffolding for running individual files' QC checks
Diffstat (limited to 'scripts/qc_on_rqtl2_bundle.py')
-rw-r--r-- | scripts/qc_on_rqtl2_bundle.py | 23 |
1 files changed, 21 insertions, 2 deletions
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(): |