Mercurial > repos > peterjc > seq_select_by_id
changeset 9:3b0a14722175 draft default tip
v0.0.14 - Script works on Python 2 and 3 (fixed output file mode)
author | peterjc |
---|---|
date | Wed, 23 May 2018 09:15:13 -0400 |
parents | 8e1a90917fa7 |
children | |
files | tools/seq_select_by_id/README.rst tools/seq_select_by_id/seq_select_by_id.py tools/seq_select_by_id/seq_select_by_id.xml |
diffstat | 3 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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:
--- 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"/>