From 3691df4c2bfdab29b61be53a6171ed0cb06bf5fc Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 30 Jan 2026 12:13:06 -0600 Subject: Fix bug in reading file: Ensure to read all lines. --- scripts/phenotypes/delete_phenotypes.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/phenotypes/delete_phenotypes.py b/scripts/phenotypes/delete_phenotypes.py index 028f061..e1396f3 100644 --- a/scripts/phenotypes/delete_phenotypes.py +++ b/scripts/phenotypes/delete_phenotypes.py @@ -26,10 +26,11 @@ def read_xref_ids_file(filepath: Optional[Path]) -> tuple[int, ...]: _ids: tuple[int, ...] = tuple() with filepath.open(mode="r") as infile: - try: - _ids += (int(infile.readline().strip()),) - except TypeError: - pass + for line in infile.readlines(): + try: + _ids += (int(line.strip()),) + except TypeError: + pass return _ids -- cgit 1.4.1