Author: Andreas Tille <tille@debian.org>
Last-Update: 2020-06-15
Description: 2to3 patch

--- a/scripts/dump_per_read_statistics.py
+++ b/scripts/dump_per_read_statistics.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 """Dump per-read statistics
 
 This script takes a per-read statistics file and dumps its contents out into a tab-separated values file. The columns in the file are 'chrm', 'pos', 'strand', 'read_id' and 'stat'.
@@ -19,8 +19,8 @@ def extract_per_read_stats(input_file, o
     with open(output_file, 'w') as out_fp:
         out_fp.write('{}\t{}\t{}\t{}\t{}\n'.format(
             'chrm', 'pos', 'strand', 'read_id', 'stat'))
-        for (chrm, strand), cs_blocks in pr_stats.blocks_index.items():
-            for start, block_name in cs_blocks.items():
+        for (chrm, strand), cs_blocks in list(pr_stats.blocks_index.items()):
+            for start, block_name in list(cs_blocks.items()):
                 for pos, stat, read_id in pr_stats.get_region_per_read_stats(
                         intervalData(chrm, start, start + pr_stats.region_size,
                                     strand)):
