Skip to content

Commit

Permalink
Merge pull request #75 from ncbo/onto_list_header
Browse files Browse the repository at this point in the history
Skip header in ontology list file
  • Loading branch information
caufieldjh authored Sep 5, 2024
2 parents f83e617 + 414d0cf commit 1697781
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 1697781

Please sign in to comment.