changeset 22:484c44d6bc95 draft

planemo upload for repository https://github.com/peterjc/pico_galaxy/tree/master/tools/seq_rename commit 7496128ee9ef800fe780e545d2157da8a4f89d35-dirty
author peterjc
date Thu, 11 May 2017 10:12:17 -0400
parents 5f87e696d49c
children 5b8f19e9a616
files tools/seq_rename/README.rst tools/seq_rename/seq_rename.py
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tools/seq_rename/README.rst	Wed May 10 12:51:06 2017 -0400
+++ b/tools/seq_rename/README.rst	Thu May 11 10:12:17 2017 -0400
@@ -84,6 +84,7 @@
         - Python style updates (internal change only).
 v0.0.9  - Use ``<command detect_errors="aggressive">`` (internal change only).
         - Single quote command line arguments (internal change only).
+        - Python 3 compatible print function.
 ======= ======================================================================
 
 
--- a/tools/seq_rename/seq_rename.py	Wed May 10 12:51:06 2017 -0400
+++ b/tools/seq_rename/seq_rename.py	Thu May 11 10:12:17 2017 -0400
@@ -21,10 +21,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.8"
+    print("v0.0.9")
     sys.exit(0)
 
 # Parse Command Line
@@ -89,7 +92,7 @@
 
 # Load the rename mappings
 rename = dict(parse_ids(tabular_file, old_column, new_column))
-print "Loaded %i ID mappings" % len(rename)
+print("Loaded %i ID mappings" % len(rename))
 
 # Rewrite the sequence file
 if seq_format.lower() == "sff":
@@ -164,4 +167,4 @@
     writer.close()
     reader.close()
 
-print "Renamed %i out of %i records" % (renamed, count)
+print("Renamed %i out of %i records" % (renamed, count))