about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-06-26 08:46:29 -0500
committerFrederick Muriuki Muriithi2025-06-26 08:46:29 -0500
commit829e1c3ecfe368f0df411790f5642a3a29a0046c (patch)
tree50efbc6f2e8d5ec5b3cef0d554fb2de7476e8c52 /scripts
parent559187493ef499ca30182f98d027aee20f613b11 (diff)
downloadgn-uploader-829e1c3ecfe368f0df411790f5642a3a29a0046c.tar.gz
Pass in the field separator, and comment char while reading file
Pass in the field separator character to split the fields
correctly. Also pass in the comment character to safely ignore any
comment lines.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/load_phenotypes_to_db.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/load_phenotypes_to_db.py b/scripts/load_phenotypes_to_db.py
index 8f49e10..9a2971f 100644
--- a/scripts/load_phenotypes_to_db.py
+++ b/scripts/load_phenotypes_to_db.py
@@ -73,7 +73,10 @@ def save_phenotypes(
         (dict(zip(_headers,
                   __replace_na_strings__(line, control_data["na.strings"])))
          for filecontent
-         in (rqtl2.read_csv_file(path) for path in phenofiles)
+         in (rqtl2.read_csv_file(path,
+                                 separator=control_data["sep"],
+                                 comment_char=control_data["comment.char"])
+             for path in phenofiles)
          for idx, line in enumerate(filecontent)
          if idx != 0))