# HG changeset patch # User peterjc # Date 1495034383 14400 # Node ID 90cc8b7d2ee01e8be844ef9375ca5a46361300ba # Parent a3187d5724c466b09c0bb49a94149ca88b8e7a58 planemo upload for repository https://github.com/peterjc/pico_galaxy/tree/master/tools/predictnls commit 37d5b47ec23e2cbaa453cc660bb1fcbb10dd34ee-dirty diff -r a3187d5724c4 -r 90cc8b7d2ee0 tools/predictnls/README.rst --- a/tools/predictnls/README.rst Wed May 10 12:46:01 2017 -0400 +++ b/tools/predictnls/README.rst Wed May 17 11:19:43 2017 -0400 @@ -66,8 +66,10 @@ v0.0.7 - Tool definition now embeds citation information. v0.0.8 - Reorder XML elements (internal change only). - Planemo for Tool Shed upload (``.shed.yml``, internal change only). - - Use ```` (internal change only). +v0.0.9 - Use ```` (internal change only). - Single quote command line arguments (internal change only). + - Python 3 compatible print function. + - Record version of the Python script. ======= ====================================================================== diff -r a3187d5724c4 -r 90cc8b7d2ee0 tools/predictnls/predictnls.py --- a/tools/predictnls/predictnls.py Wed May 10 12:46:01 2017 -0400 +++ b/tools/predictnls/predictnls.py Wed May 17 11:19:43 2017 -0400 @@ -49,10 +49,16 @@ https://rostlab.org/owiki/index.php/Packages """ +from __future__ import print_function + import os import re import sys +if "-v" in sys.argv or "--version" in sys.argv: + print("v0.0.9") + sys.exit(0) + if len(sys.argv) == 4: fasta_filename, tabular_filename, re_filename = sys.argv[1:] elif len(sys.argv) == 3: @@ -138,7 +144,7 @@ motifs = list(load_re(re_filename)) -print "Looking for %i NLS motifs" % len(motifs) +print("Looking for %i NLS motifs" % len(motifs)) if tabular_filename == "-": out_handle = sys.stdout @@ -163,4 +169,4 @@ count += 1 if tabular_filename != "-": out_handle.close() -print "Found %i NLS motifs in %i sequences" % (nls, count) +print("Found %i NLS motifs in %i sequences" % (nls, count)) diff -r a3187d5724c4 -r 90cc8b7d2ee0 tools/predictnls/predictnls.xml --- a/tools/predictnls/predictnls.xml Wed May 10 12:46:01 2017 -0400 +++ b/tools/predictnls/predictnls.xml Wed May 17 11:19:43 2017 -0400 @@ -1,5 +1,8 @@ - + Find nuclear localization signals (NLSs) in protein sequences + +python $__tool_directory__/predictnls.py --version + python $__tool_directory__/predictnls.py '$fasta_file' '$tabular_file'