Mercurial > repos > peterjc > predictnls
changeset 11:90cc8b7d2ee0 draft
planemo upload for repository https://github.com/peterjc/pico_galaxy/tree/master/tools/predictnls commit 37d5b47ec23e2cbaa453cc660bb1fcbb10dd34ee-dirty
author | peterjc |
---|---|
date | Wed, 17 May 2017 11:19:43 -0400 |
parents | a3187d5724c4 |
children | 92bb5d75d77e |
files | tools/predictnls/README.rst tools/predictnls/predictnls.py tools/predictnls/predictnls.xml |
diffstat | 3 files changed, 15 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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 ``<command detect_errors="aggressive">`` (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. + - Record version of the Python script. ======= ======================================================================
--- 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))
--- 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 @@ -<tool id="predictnls" name="PredictNLS" version="0.0.8"> +<tool id="predictnls" name="PredictNLS" version="0.0.9"> <description>Find nuclear localization signals (NLSs) in protein sequences</description> + <version_command> +python $__tool_directory__/predictnls.py --version + </version_command> <command detect_errors="aggressive"> python $__tool_directory__/predictnls.py '$fasta_file' '$tabular_file' </command>