Skip to content

Commit

Permalink
Get ontology ID only from list file
Browse files Browse the repository at this point in the history
  • Loading branch information
caufieldjh committed Sep 5, 2024
1 parent 414d0cf commit 98f3ad2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kg_bioportal/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def download(
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())
onto_list.append(line.strip().split("\t")[0])
except FileNotFoundError:
logging.error(
f"Ontology list file not found. Please run the 'get_ontology_list' command first."
Expand All @@ -153,7 +153,7 @@ def download(
with open(ontology_file, "r") as f:
f.readline() # Skip the header
for line in f:
onto_list.append(line.strip())
onto_list.append(line.strip().split("\t")[0])

logging.info(f"{len(onto_list)} ontologies to retrieve.")

Expand Down

0 comments on commit 98f3ad2

Please sign in to comment.