diff options
| author | Frederick Muriuki Muriithi <fredmanglis@gmail.com> | 2026-09-28 12:25:20 -0500 |
|---|---|---|
| committer | Frederick Muriuki Muriithi <fredmanglis@gmail.com> | 2026-09-28 12:25:20 -0500 |
| commit | 05ef710a1510ecdbbedd8db64dda2387fef5ed2b (patch) | |
| tree | 750e17c39643bf2c32ae43d0228539087bf0c200 | |
| parent | 1089173827ee3844ab2bd00dd2e5de940fab2c76 (diff) | |
| download | gn-uploader-05ef710a1510ecdbbedd8db64dda2387fef5ed2b.tar.gz | |
Process the untransposed files.
| -rw-r--r-- | scripts/genotypes/preprocess_csv_collect_info.py | 17 |
1 files 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: |
