Skip to content

Commit

Permalink
Get col number more explicitly - should be more robust
Browse files Browse the repository at this point in the history
  • Loading branch information
tbooth committed Aug 14, 2024
1 parent 3c6b6f9 commit 46d8178
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions make_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,9 @@ def format_report( all_info,
# Go again and add the fails
for c in ci['_counts']:
if c['_barcode'] in rowsdict and c['_part'] == 'fail':
# Anything else? Or just add to total_reads?
rowsdict[c['_barcode']][2] += c['total_reads']
# Add the fail count to the 'total_reads' column
tr_col_num = headings.index('total_reads')
rowsdict[c['_barcode']][tr_col_num] += c['total_reads']
rows = rowsdict.values()
else:
# Old version just tabulates what's in the file
Expand Down

0 comments on commit 46d8178

Please sign in to comment.