From ae185c819f0bb7b31faacf8105cbfd885da752e2 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 2 Oct 2026 12:36:07 -0500 Subject: Separate pre-processing of transposed and untransposed lines. We pre-process the lines differently when working with transponed lines than we do for untransposed lines -- the code reflects that moving forward. --- scripts/genotypes/types.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'scripts/genotypes/types.py') diff --git a/scripts/genotypes/types.py b/scripts/genotypes/types.py index 472bb1b..077e90e 100644 --- a/scripts/genotypes/types.py +++ b/scripts/genotypes/types.py @@ -1,6 +1,6 @@ """The datatypes this package will use.""" +from typing import Sequence, Optional from dataclasses import field, dataclass -from typing import Union, Sequence, Optional @dataclass @@ -34,12 +34,23 @@ class LineError: @dataclass(frozen=True) -class LineDetails: +class TransposedLineDetails: """Data type for processed line details""" - line_content: Sequence[Union[str, None]] + line_content: Sequence[str] geno_symbols: Sequence[str] line_header: str errors: Sequence[LineError] + is_markers_line: bool = False + + +@dataclass(frozen=True) +class UntransposedLineDetails: + """Data type for processed line details""" + line_content: Sequence[str] + geno_symbols: Sequence[str] + line_header: str + errors: Sequence[LineError] + marker: Optional[str] = None @dataclass(frozen=True) -- cgit 1.4.1