From 05ef710a1510ecdbbedd8db64dda2387fef5ed2b Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 28 Sep 2026 12:25:20 -0500 Subject: Process the untransposed files. --- scripts/genotypes/preprocess_csv_collect_info.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/scripts/genotypes/preprocess_csv_collect_info.py b/scripts/genotypes/preprocess_csv_collect_info.py index c74e8fa..771c11d 100644 --- a/scripts/genotypes/preprocess_csv_collect_info.py +++ b/scripts/genotypes/preprocess_csv_collect_info.py @@ -56,9 +56,22 @@ def process_transposed(line: tuple[str, ...]) -> LineDetails: raise NotImplementedError("Please implement this!") -def process_untransposed(line: tuple[str, ...]) -> LineDetails: +def process_untransposed( + line: tuple[str, ...], + settings: dict, + headers: tuple[str, ...] +) -> LineDetails: """Processed line in a non-transposed file.""" - raise NotImplementedError("Please implement this!") + _symbols = tuple(_symb for _head, _symb in zip(headers, line) + if _head not in ( + settings["markers"], + settings["chromosome"], + settings["cm"], + settings["mb"])) + return LineDetails( + line_content=line, + line_header=line[0], + geno_symbols=tuple(set(_symbols))) def file_statistics(lines: Iterator[str], fileconfigs: dict) -> FileStats: -- cgit 1.4.1