changeset 23:a1ef6448b35b draft

v0.0.12 Depends on Biopython 1.67 via legacy Tool Shed package or bioconda; Python 3 compatible print function
author peterjc
date Thu, 11 May 2017 06:25:19 -0400
parents 3d392ef52a22
children a22c48f357df
files tools/seq_select_by_id/README.rst tools/seq_select_by_id/seq_select_by_id.py
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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 ``<command detect_errors="aggressive">`` (internal change only).
         - Depends on Biopython 1.67 via legacy Tool Shed package or bioconda.
+        - Python 3 compatible print function.
 ======= ======================================================================
 
 
--- 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)