about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/genotypes/preprocess_csv_collect_info.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/genotypes/preprocess_csv_collect_info.py b/scripts/genotypes/preprocess_csv_collect_info.py
index 2f687c4..c52ad15 100644
--- a/scripts/genotypes/preprocess_csv_collect_info.py
+++ b/scripts/genotypes/preprocess_csv_collect_info.py
@@ -175,12 +175,14 @@ def compute_statistics(filepath: Path, fileconfigs: dict) -> FileStats:
                                                   or is_comment_line(line)
                                                   or is_dot_geno_line(line)))
     basic_stats = os.stat(filepath)
+    line_splitter = lambda line: tuple(
+        field.strip() for field in line.split(fileconfigs["separator"]))
+
     is_skippable_line = lambda line: (is_blank_line(line)
                                       or is_comment_line(line)
                                       or is_dot_geno_line(line)
-                                      or line == headers)
-    line_splitter = lambda line: tuple(
-        field.strip() for field in line.split(fileconfigs["separator"]))
+                                      or line_splitter(line) == headers)
+
     lines = read_text_file(filepath)
     return (file_stats_multiprocessing(headers, is_skippable_line, line_splitter, lines)
             if (basic_stats.st_size/(1024*1024)) >= FILE_SIZE_THRESHOLD