# HG changeset patch # User peterjc # Date 1494498319 14400 # Node ID a1ef6448b35b0da29a32a7213f4bdae409cc5b41 # Parent 3d392ef52a224a796d75039f5ba19fd4a4496dd3 v0.0.12 Depends on Biopython 1.67 via legacy Tool Shed package or bioconda; Python 3 compatible print function diff -r 3d392ef52a22 -r a1ef6448b35b tools/seq_select_by_id/README.rst --- a/tools/seq_select_by_id/README.rst Wed May 10 12:51:31 2017 -0400 +++ b/tools/seq_select_by_id/README.rst Thu May 11 06:25:19 2017 -0400 @@ -88,6 +88,7 @@ v0.0.12 - Python style changes (internal change only). - Use ```` (internal change only). - Depends on Biopython 1.67 via legacy Tool Shed package or bioconda. + - Python 3 compatible print function. ======= ====================================================================== diff -r 3d392ef52a22 -r a1ef6448b35b tools/seq_select_by_id/seq_select_by_id.py --- a/tools/seq_select_by_id/seq_select_by_id.py Wed May 10 12:51:31 2017 -0400 +++ b/tools/seq_select_by_id/seq_select_by_id.py Thu May 11 06:25:19 2017 -0400 @@ -20,10 +20,13 @@ All rights reserved. See accompanying text file for licence details (MIT license). """ + +from __future__ import print_function + import sys if "-v" in sys.argv or "--version" in sys.argv: - print "v0.0.12" + print("v0.0.12") sys.exit(0) # Parse Command Line @@ -84,7 +87,7 @@ # Index the sequence file. # If very big, could use SeqIO.index_db() to avoid memory bottleneck... records = SeqIO.index(in_file, seq_format) -print "Indexed %i sequences" % len(records) +print("Indexed %i sequences" % len(records)) if seq_format.lower() == "sff": # Special case to try to preserve the XML manifest @@ -136,4 +139,4 @@ count += 1 out_handle.close() -print "Selected %i sequences by ID" % count +print("Selected %i sequences by ID" % count)