diff options
Diffstat (limited to 'scripts/genotypes')
| -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: |
