about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--scripts/phenotypes_bulk_edit.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/phenotypes_bulk_edit.py b/scripts/phenotypes_bulk_edit.py
index 6e5d416..0ced2ab 100644
--- a/scripts/phenotypes_bulk_edit.py
+++ b/scripts/phenotypes_bulk_edit.py
@@ -106,7 +106,10 @@ def read_file(filepath: Path) -> Iterator[str]:
                 count = count + 1
                 continue
 
-            _dict = dict(zip(headers, fields))
+            _dict = dict(zip(
+                headers,
+                ((None if item.strip() == "" else item.strip())
+                 for item in fields)))
             _pheno, _xref = _dict.pop("UniqueIdentifier").split("::")
             _dict["phenotype_id"] = int(_pheno.split(":")[1])
             _dict["xref_id"] = int(_xref.split(":")[1])