Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson authored Sep 12, 2023
1 parent 5dc16ea commit f167244
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions taxoniumtools/src/taxoniumtools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def read_metadata(metadata_file, columns, key_column):
warnings.filterwarnings("default")
metadata.set_index(key_column, inplace=True)
# convert metadata to dict of rows
if not metadata.index.is_unique:
print(f"Error: The key column '{key_column}' contains non-unique values in the metadata file.")

metadata_dict = metadata.to_dict("index")
metadata_cols = metadata.columns
Expand Down

0 comments on commit f167244

Please sign in to comment.