Skip to content

Commit

Permalink
Fix: logging #77.
Browse files Browse the repository at this point in the history
  • Loading branch information
arnikz committed Dec 2, 2020
1 parent ce98aca commit 02e22f0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/genome_wide/label_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,12 @@ def overlap(svtype, sv_list, cpos_list, win_hlen, ground_truth, outDir):
labels[pos_id] = 'no'+svtype

logging.info(Counter(labels.values()))
sv_coverage = int(len(sv_covered) / len(sv_list) * 100)
logging.info('SV coverage: {}/{}={}%'.format(len(sv_covered), len(sv_list),
sv_coverage))

try:
sv_coverage = int(len(sv_covered) / len(sv_list) * 100)
except ZeroDivisionError:
sv_coverage = 0
logging.info("SV coverage: %d%%" % sv_coverage)

filename, file_extension = os.path.splitext(ground_truth)

Expand Down

0 comments on commit 02e22f0

Please sign in to comment.