# HG changeset patch # User peterjc # Date 1527683600 14400 # Node ID d51db443aaa460718abc1767f7e2803e05380f8d # Parent 01b0488d9cfbfe8084c47aa3f31fb08f168f9c89 v0.2.3 Python 3 compatible print function. diff -r 01b0488d9cfb -r d51db443aaa4 tools/get_orfs_or_cdss/README.rst --- 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 ```` (internal change only). - Single quote command line arguments (internal change only). +v0.2.3 - Python 3 compatible print function. ======= ====================================================================== diff -r 01b0488d9cfb -r d51db443aaa4 tools/get_orfs_or_cdss/get_orfs_or_cdss.py --- 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)) diff -r 01b0488d9cfb -r d51db443aaa4 tools/get_orfs_or_cdss/get_orfs_or_cdss.xml --- 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 @@ - + e.g. to get peptides from ESTs biopython @@ -52,7 +52,7 @@ --> - + diff -r 01b0488d9cfb -r d51db443aaa4 tools/get_orfs_or_cdss/tool_dependencies.xml --- 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 @@ - +