aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/qc_on_rqtl2_bundle.py23
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():