diff options
| author | Frederick Muriuki Muriithi | 2026-01-30 12:13:06 -0600 |
|---|---|---|
| committer | Frederick Muriuki Muriithi | 2026-01-30 12:13:06 -0600 |
| commit | 3691df4c2bfdab29b61be53a6171ed0cb06bf5fc (patch) | |
| tree | 516bea1227f8177f5204a2f946cc78fed33eeea9 /scripts | |
| parent | 48de504c50ed1c78ec6bca9128aa283e65a0ea58 (diff) | |
| download | gn-uploader-3691df4c2bfdab29b61be53a6171ed0cb06bf5fc.tar.gz | |
Fix bug in reading file: Ensure to read all lines.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/phenotypes/delete_phenotypes.py | 9 |
1 files 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 |
