changeset 20:6c5822581e41 draft

planemo upload for repository https://github.com/peterjc/pico_galaxy/tree/master/tools/seq_select_by_id commit 5fb6ee31f33e8e24c1ae5d56c93ac3e0157dad72-dirty
author peterjc
date Thu, 09 Feb 2017 11:28:17 -0500
parents d66a0766f13e
children 3dc9fd2ad70c
files tools/seq_select_by_id/seq_select_by_id.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tools/seq_select_by_id/seq_select_by_id.py	Wed Feb 01 10:51:12 2017 -0500
+++ b/tools/seq_select_by_id/seq_select_by_id.py	Thu Feb 09 11:28:17 2017 -0500
@@ -80,6 +80,7 @@
     if warn:
         sys.stderr.write(warn)
 
+
 # Index the sequence file.
 # If very big, could use SeqIO.index_db() to avoid memory bottleneck...
 records = SeqIO.index(in_file, seq_format)
@@ -110,6 +111,7 @@
     count = 0
     # This does have the overhead of parsing into SeqRecord objects,
     # but doing the header and index at the low level is too fidly.
+    name = None  # We want the variable to leak from the iterator's scope...
     iterator = (records[name] for name in parse_ids(tabular_file, column))
     try:
         count = writer.write_file(iterator)