Skip to content

Commit

Permalink
Skip header in ontology list file
Browse files Browse the repository at this point in the history
  • Loading branch information
caufieldjh committed Sep 5, 2024
1 parent f83e617 commit 414d0cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/kg_bioportal/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ def download(
if not ontologies and not ontology_file:
try:
with open(f"{output_dir}/{ONTOLOGY_LIST_NAME}", "r") as f:
f.readline() # Skip the header
for line in f:
onto_list.append(line.strip())
except FileNotFoundError:
Expand All @@ -150,6 +151,7 @@ def download(
# Parse the ontology_file argument
if ontology_file:
with open(ontology_file, "r") as f:
f.readline() # Skip the header
for line in f:
onto_list.append(line.strip())

Expand Down

0 comments on commit 414d0cf

Please sign in to comment.