From 71c4a871ff01f6b23ab6a5872f7fcf1a018ab86a Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 9 Aug 2024 14:44:29 -0500 Subject: 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. --- r_qtl/fileerrors.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'r_qtl') 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")) -- cgit v1.2.3