Skip to content
Snippets Groups Projects
Commit 5f144ba6 authored by Jorge Navarro Muñoz's avatar Jorge Navarro Muñoz
Browse files

Catch an AssertionError exception in the initial validation of input files

parent 311ac8dc
Branches
No related tags found
No related merge requests found
......@@ -210,6 +210,15 @@ def check_data_integrity(gbk_files):
# this is a one-element list, mark it for late removal
samples_for_deletion.append(sample)
pass
except AssertionError as e:
print(" Assertion error with file " + f + ": \n " + str(e))
print(" (This file will be excluded from the analysis)")
if len(gbk_files[sample]) > 1:
gbk_files[sample].remove(f)
else:
# this is a one-element list, mark it for late removal
samples_for_deletion.append(sample)
pass
handle.close()
if len(samples_for_deletion) > 0:
for s in sorted(samples_for_deletion, reverse=True):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment