Skip to content

Commit

Permalink
Added a condition to the removal check
Browse files Browse the repository at this point in the history
  • Loading branch information
tgurbich committed Nov 19, 2024
1 parent bb5ec06 commit d1105d5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/check_sample_and_mag_validity.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,10 @@ def load_metadata_table(metadata_table_file, remove_list):
matches_in_remove_list += 1
assert len(sample_mag_dictionary) > 0, ("There was an error loading data from the metadata table {}. "
"No records were obtained".format(metadata_table_file))
assert matches_in_remove_list > 0, ("None of the genomes in remove_list are present in the metadata table file {}. "
"Check that the list of genomes to remove is correct".
format(metadata_table_file))
if len(remove_list) > 0:
assert matches_in_remove_list > 0, ("None of the genomes in remove_list are present in the metadata table file "
"{}. Check that the list of genomes to remove is correct".
format(metadata_table_file))
return sample_mag_dictionary


Expand Down

0 comments on commit d1105d5

Please sign in to comment.