From d4b4cbcc4210038b6b7bd5026c0da6f55ed5eb9f Mon Sep 17 00:00:00 2001 From: rambaut Date: Fri, 6 Dec 2019 18:54:52 -0300 Subject: [PATCH] Fix for printing extra information about barcode calls. --- porechop/porechop.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/porechop/porechop.py b/porechop/porechop.py index 5a7e596..924743b 100755 --- a/porechop/porechop.py +++ b/porechop/porechop.py @@ -154,7 +154,9 @@ def main(): args.barcode_dir, args.barcode_labels, args.extended_labels, args.input, args.untrimmed, args.threads, args.discard_unassigned, args.verbosity, args.print_dest) - if (args.native_barcodes or args.pcr_barcodes or args.rapid_barcodes) and args.verbosity > 0: + if args.verbosity > 0 \ + and (args.native_barcodes or args.pcr_barcodes or args.rapid_barcodes) \ + and (args.barcode_labels or args.barcode_stats_csv): print_stats(reads, args.barcode_threshold, args.extended_labels, args.print_dest) @@ -777,7 +779,7 @@ def print_stats(reads, barcode_threshold, extended, print_dest): if not extended: print(bold_underline('\nBarcodes called'), flush=True, file=print_dest) barcode_names = [] - for barcode_name in counts: + for barcode_name in counts["called"]: barcode_names.append(barcode_name) barcode_names.sort() sum = 0