aboutsummaryrefslogtreecommitdiff
path: root/r_qtl
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-08-09 14:44:29 -0500
committerFrederick Muriuki Muriithi2024-08-12 16:10:11 -0500
commit71c4a871ff01f6b23ab6a5872f7fcf1a018ab86a (patch)
tree47ed0aac8fa1762263217fac734917cf5525dfee /r_qtl
parent321cb85283dc0a182e86d0ee509cae9ced4e39cd (diff)
downloadgn-uploader-71c4a871ff01f6b23ab6a5872f7fcf1a018ab86a.tar.gz
Define new InvalidValue error type.
Redesign the InvalidValue error type for the R/qtl2 bundles to list the errors according to the row and column titles rather than line numbers. This makes the error-reporting independent on whether or not the file is transposed. This will replace the use of the older `quality_control.errors.InvalidValue` error type that depends on the line and column numbers, and thus cannot work with transposable files.
Diffstat (limited to 'r_qtl')
-rw-r--r--r_qtl/fileerrors.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/r_qtl/fileerrors.py b/r_qtl/fileerrors.py
index e76676c..c253d71 100644
--- a/r_qtl/fileerrors.py
+++ b/r_qtl/fileerrors.py
@@ -1,5 +1,14 @@
"""QC errors as distinguished from actual exceptions"""
from collections import namedtuple
+InvalidValue = namedtuple(
+ "InvalidValue",
+ ("filename",
+ "rowtitle",
+ "coltitle",
+ "cellvalue",
+ "message"))
+
+
MissingFile = namedtuple(
"MissingFile", ("controlfilekey", "filename", "message"))