aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-12-03 14:20:30 -0600
committerFrederick Muriuki Muriithi2024-12-03 15:11:26 -0600
commitb3b85a6241bacecae3997ec063dde007143289f0 (patch)
treecb3b81f6407f6efda7f283e36254c5a6b7ae1859 /scripts
parent49d8ec6bb3caae91e5d8e4b5859ee4e4c0ed4dd6 (diff)
downloadgn-uploader-b3b85a6241bacecae3997ec063dde007143289f0.tar.gz
Add some phenocovar metadata.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/rqtl2/phenotypes_qc.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/rqtl2/phenotypes_qc.py b/scripts/rqtl2/phenotypes_qc.py
index 26c049b..bfbfab6 100644
--- a/scripts/rqtl2/phenotypes_qc.py
+++ b/scripts/rqtl2/phenotypes_qc.py
@@ -209,11 +209,11 @@ def qc_phenocovar_file(
return _errs, _lc+1
- return {
- filepath.name: dict(zip(
- ("errors", "linecount"),
- reduce(collect_errors, _csvfile, (_errors, 1))))
- }
+ _errors, _linecount = reduce(collect_errors, _csvfile, (_errors, 1))
+ rconn.hset(
+ f"{fqkey}:metadata",
+ mapping={"linecount": _linecount, "total-errors": len(_errors)})
+ return {filepath.name: {"errors": _errors, "linecount": _linecount}}
def merge_dicts(*dicts):