# HG changeset patch # User peterjc # Date 1527081313 14400 # Node ID 3b0a14722175c9124be6754710a5aba6af947f96 # Parent 8e1a90917fa79ec6be8fbe8f7aa3e381e78b8909 v0.0.14 - Script works on Python 2 and 3 (fixed output file mode) diff -r 8e1a90917fa7 -r 3b0a14722175 tools/seq_select_by_id/README.rst --- a/tools/seq_select_by_id/README.rst Wed May 17 09:23:03 2017 -0400 +++ b/tools/seq_select_by_id/README.rst Wed May 23 09:15:13 2018 -0400 @@ -90,6 +90,7 @@ - Depends on Biopython 1.67 via legacy Tool Shed package or bioconda. - Python 3 compatible print function. v0.0.13 - Python 3 compatible exception handling. +v0.0.14 - Script works on Python 2 and 3 (fixed output file mode). ======= ====================================================================== @@ -118,7 +119,7 @@ $ planemo shed_upload --tar_only tools/seq_select_by_id/ ... - $ tar -tzf shed_upload.tar.gz + $ tar -tzf shed_upload.tar.gz test-data/k12_hypothetical.fasta test-data/k12_hypothetical.tabular test-data/k12_hypothetical_alt.tabular diff -r 8e1a90917fa7 -r 3b0a14722175 tools/seq_select_by_id/seq_select_by_id.py --- a/tools/seq_select_by_id/seq_select_by_id.py Wed May 17 09:23:03 2017 -0400 +++ b/tools/seq_select_by_id/seq_select_by_id.py Wed May 23 09:15:13 2018 -0400 @@ -26,7 +26,7 @@ import sys if "-v" in sys.argv or "--version" in sys.argv: - print("v0.0.13") + print("v0.0.14") sys.exit(0) # Parse Command Line @@ -128,7 +128,7 @@ else: # Avoid overhead of parsing into SeqRecord objects, # just re-use the original formatting from the input file. - out_handle = open(out_file, "w") + out_handle = open(out_file, "wb") count = 0 for name in parse_ids(tabular_file, column): try: diff -r 8e1a90917fa7 -r 3b0a14722175 tools/seq_select_by_id/seq_select_by_id.xml --- a/tools/seq_select_by_id/seq_select_by_id.xml Wed May 17 09:23:03 2017 -0400 +++ b/tools/seq_select_by_id/seq_select_by_id.xml Wed May 23 09:15:13 2018 -0400 @@ -1,4 +1,4 @@ -<tool id="seq_select_by_id" name="Select sequences by ID" version="0.0.13"> +<tool id="seq_select_by_id" name="Select sequences by ID" version="0.0.14"> <description>from a tabular file</description> <requirements> <requirement type="package" version="1.67">biopython</requirement> @@ -12,7 +12,7 @@ <inputs> <param name="input_file" type="data" format="fasta,qual,fastq,sff" label="Sequence file to select from" help="FASTA, QUAL, FASTQ, or SFF format." /> <param name="input_tabular" type="data" format="tabular" label="Tabular file containing sequence identifiers"/> - <param name="column" type="data_column" data_ref="input_tabular" multiple="False" numerical="False" label="Column containing sequence identifiers"/> + <param name="column" type="data_column" data_ref="input_tabular" multiple="false" numerical="false" label="Column containing sequence identifiers"/> </inputs> <outputs> <data name="output_file" format_source="input_file" metadata_source="input_file" label="Selected sequences from $input_file.name"/>