changeset 11:d51db443aaa4 draft

v0.2.3 Python 3 compatible print function.
author peterjc
date Wed, 30 May 2018 08:33:20 -0400
parents 01b0488d9cfb
children 71905a6d52a7
files tools/get_orfs_or_cdss/README.rst tools/get_orfs_or_cdss/get_orfs_or_cdss.py tools/get_orfs_or_cdss/get_orfs_or_cdss.xml tools/get_orfs_or_cdss/tool_dependencies.xml
diffstat 4 files changed, 14 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/tools/get_orfs_or_cdss/README.rst	Tue May 16 09:11:27 2017 -0400
+++ b/tools/get_orfs_or_cdss/README.rst	Wed May 30 08:33:20 2018 -0400
@@ -82,6 +82,7 @@
           Gracilibacteria.
 v0.2.2  - Use ``<command detect_errors="aggressive">`` (internal change only).
         - Single quote command line arguments (internal change only).
+v0.2.3  - Python 3 compatible print function.
 ======= ======================================================================
 
 
--- a/tools/get_orfs_or_cdss/get_orfs_or_cdss.py	Tue May 16 09:11:27 2017 -0400
+++ b/tools/get_orfs_or_cdss/get_orfs_or_cdss.py	Wed May 30 08:33:20 2018 -0400
@@ -18,14 +18,18 @@
 See accompanying text file for licence details (MIT licence).
 """
 
+from __future__ import print_function
+
 import re
 import sys
 
 from optparse import OptionParser
 
-usage = """Use as follows:
+usage = r"""Use as follows:
 
-$ python get_orfs_or_cdss.py -i genome.fa -f fasta --table 11 -t CDS -e open -m all -s both --on cds.nuc.fa --op cds.protein.fa --ob cds.bed --og cds.gff3
+$ python get_orfs_or_cdss.py -i genome.fa -f fasta --table 11 \
+-t CDS -e open -m all -s both --on cds.nuc.fa --op cds.protein.fa \
+--ob cds.bed --og cds.gff3
 """
 
 try:
@@ -79,7 +83,7 @@
 options, args = parser.parse_args()
 
 if options.version:
-    print("v0.2.0")
+    print("v0.2.3")
     sys.exit(0)
 
 if not options.input_file:
@@ -102,8 +106,8 @@
 else:
     sys.exit("Unsupported file type %r" % options.seq_format)
 
-print "Genetic code table %i" % options.table
-print "Minimum length %i aa" % options.min_len
+print("Genetic code table %i" % options.table)
+print("Minimum length %i aa" % options.min_len)
 # print "Taking %s ORF(s) from %s strand(s)" % (mode, strand)
 
 starts = sorted(table_obj.start_codons)
@@ -283,4 +287,4 @@
 if out_bed and out_bed is not sys.stdout:
     out_bed.close()
 
-print "Found %i %ss in %i sequences" % (out_count, options.ftype, in_count)
+print("Found %i %ss in %i sequences" % (out_count, options.ftype, in_count))
--- a/tools/get_orfs_or_cdss/get_orfs_or_cdss.xml	Tue May 16 09:11:27 2017 -0400
+++ b/tools/get_orfs_or_cdss/get_orfs_or_cdss.xml	Wed May 30 08:33:20 2018 -0400
@@ -1,4 +1,4 @@
-<tool id="get_orfs_or_cdss" name="Get open reading frames (ORFs) or coding sequences (CDSs)" version="0.2.2">
+<tool id="get_orfs_or_cdss" name="Get open reading frames (ORFs) or coding sequences (CDSs)" version="0.2.3">
     <description>e.g. to get peptides from ESTs</description>
     <requirements>
         <requirement type="package" version="1.67">biopython</requirement>
@@ -52,7 +52,7 @@
             <option value="26">31. Blastocrithidia Nuclear</option>
             -->
         </param>
-        <param name="ftype" type="select" value="True" label="Look for ORFs or CDSs">
+        <param name="ftype" type="select" value="true" label="Look for ORFs or CDSs">
             <option value="ORF">Look for ORFs (check for stop codons only, ignore start codons)</option>
             <option value="CDS">Look for CDSs (with start and stop codons)</option>
         </param>
--- a/tools/get_orfs_or_cdss/tool_dependencies.xml	Tue May 16 09:11:27 2017 -0400
+++ b/tools/get_orfs_or_cdss/tool_dependencies.xml	Wed May 30 08:33:20 2018 -0400
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <tool_dependency>
     <package name="biopython" version="1.67">
-        <repository changeset_revision="a42f244cce44" name="package_biopython_1_67" owner="biopython" toolshed="https://toolshed.g2.bx.psu.edu" />
+        <repository changeset_revision="a12f73c3b116" name="package_biopython_1_67" owner="biopython" toolshed="https://toolshed.g2.bx.psu.edu" />
     </package>
 </tool_dependency>