about summary refs log tree commit diff
path: root/scripts/genotypes/types.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi <fredmanglis@gmail.com>2026-10-14 16:23:41 -0500
committerFrederick Muriuki Muriithi <fredmanglis@gmail.com>2026-10-14 16:23:41 -0500
commitef45d22628bd06c0282bd586206bc3494773f132 (patch)
tree13c191b9662d67dc52d77275762f930921d864da /scripts/genotypes/types.py
parentb6d95c2ff301e572f024f525f6b5b81e73dafe5b (diff)
downloadgn-uploader-ef45d22628bd06c0282bd586206bc3494773f132.tar.gz
Refactor design to allow processing file with multiple processes.
If the file is larger (in bytes) than the value set in the
`FILE_SIZE_THRESHOLD` constant, then the file will be chunked and
processed with multiple processes, using the multiprocessing library,
otherwise, it will be processed in a single-thread process.
Diffstat (limited to 'scripts/genotypes/types.py')
-rw-r--r--scripts/genotypes/types.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/genotypes/types.py b/scripts/genotypes/types.py
index 7f0e6cb..d765fe5 100644
--- a/scripts/genotypes/types.py
+++ b/scripts/genotypes/types.py
@@ -56,9 +56,14 @@ class UntransposedLineDetails:
 @dataclass(frozen=True)
 class FileStats:# pylint: disable=[too-many-instance-attributes]
     """Custom file statistics."""
+    total_lines: int
     data_lines: int
     geno_symbols: Sequence[str]
 
+    comment_lines: int = 0
+    blank_lines: int = 0
+    dot_geno_lines: int = 0
+    dot_geno_fields: Optional[DotGenoFields] = None
     samples_list: Sequence[str] = field(default_factory=tuple)
     markers_list: Sequence[str] = field(default_factory=tuple)
     errors: Sequence[LineError] = field(default_factory=tuple)