# HG changeset patch # User peterjc # Date 1495189499 14400 # Node ID a251dfee431f29a53d34d8b2849f7ab90123a12f # Parent f96c2911189e4b242b51d6e83453ccd8bf03cc6f planemo upload for repository https://github.com/peterjc/pico_galaxy/tree/master/tools/seq_filter_by_id commit 7138d537aaec46596985acf123348fe6f99cd6f1-dirty diff -r f96c2911189e -r a251dfee431f tools/seq_filter_by_id/seq_filter_by_id.py --- a/tools/seq_filter_by_id/seq_filter_by_id.py Wed May 17 14:02:16 2017 -0400 +++ b/tools/seq_filter_by_id/seq_filter_by_id.py Fri May 19 06:24:59 2017 -0400 @@ -225,7 +225,8 @@ name = clean_name(line.rstrip("\n").split("\t")[col]) if name: file_ids.add(name) - print("Using %i IDs from column %s in tabular file" % (len(file_ids), ", ".join(str(col + 1) for col in columns))) + print("Using %i IDs from column %s in tabular file" % + (len(file_ids), ", ".join(str(col + 1) for col in columns))) if ids is None: ids = file_ids if logic == "UNION": @@ -378,13 +379,15 @@ out_handle = open(pos_file, "wb") writer = SffWriter(out_handle, xml=manifest) in_handle.seek(0) # start again after getting manifest - pos_count = writer.write_file(rec for rec in SffIterator(in_handle) if clean_name(rec.id) in wanted) + pos_count = writer.write_file(rec for rec in SffIterator(in_handle) + if clean_name(rec.id) in wanted) out_handle.close() if neg_file is not None: out_handle = open(neg_file, "wb") writer = SffWriter(out_handle, xml=manifest) in_handle.seek(0) # start again - neg_count = writer.write_file(rec for rec in SffIterator(in_handle) if clean_name(rec.id) not in wanted) + neg_count = writer.write_file(rec for rec in SffIterator(in_handle) + if clean_name(rec.id) not in wanted) out_handle.close() # And we're done in_handle.close()