Mercurial > repos > peterjc > seq_filter_by_id
changeset 25:a251dfee431f draft
planemo upload for repository https://github.com/peterjc/pico_galaxy/tree/master/tools/seq_filter_by_id commit 7138d537aaec46596985acf123348fe6f99cd6f1-dirty
author | peterjc |
---|---|
date | Fri, 19 May 2017 06:24:59 -0400 |
parents | f96c2911189e |
children | 34351f48ae92 |
files | tools/seq_filter_by_id/seq_filter_by_id.py |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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()