diff options
| author | Frederick Muriuki Muriithi <fredmanglis@gmail.com> | 2026-10-02 12:36:07 -0500 |
|---|---|---|
| committer | Frederick Muriuki Muriithi <fredmanglis@gmail.com> | 2026-10-02 12:39:59 -0500 |
| commit | ae185c819f0bb7b31faacf8105cbfd885da752e2 (patch) | |
| tree | ca5a7c7536cbd5b866fa590ef2f0c82ae3dfe311 /scripts/genotypes/types.py | |
| parent | 31437e9b7bed0fe2c2c499d91bc6308014b8421d (diff) | |
| download | gn-uploader-ae185c819f0bb7b31faacf8105cbfd885da752e2.tar.gz | |
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.
Diffstat (limited to 'scripts/genotypes/types.py')
| -rw-r--r-- | scripts/genotypes/types.py | 17 |
1 files changed, 14 insertions, 3 deletions
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) |
