changeset 18:999776f0aee4 draft

v0.0.16, adding new model TTSS-STD-2.0.2.jar
author peterjc
date Mon, 21 Sep 2015 05:45:51 -0400
parents c9ef96985153
children d24181fd3a40
files test-data/four_human_proteins.effectiveT3_std2.tabular tool-data/effectiveT3.loc.sample tools/effectiveT3/README.rst tools/effectiveT3/effectiveT3.py tools/effectiveT3/effectiveT3.xml tools/effectiveT3/tool_dependencies.xml
diffstat 6 files changed, 34 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/four_human_proteins.effectiveT3_std2.tabular	Mon Sep 21 05:45:51 2015 -0400
@@ -0,0 +1,5 @@
+#ID	Description	Score	Effective
+sp|Q9NSY1|BMP2K_HUMAN	BMP-2-inducible protein kinase OS=Homo sapiens GN=BMP2K PE=1 SV=2	1.000000000000000	true
+sp|P08100|OPSD_HUMAN	Rhodopsin OS=Homo sapiens GN=RHO PE=1 SV=1	0.999238327753953	true
+sp|Q9BS26|ERP44_HUMAN	Endoplasmic reticulum resident protein 44 OS=Homo sapiens GN=ERP44 PE=1 SV=1	0.000000000000345	false
+sp|P06213|INSR_HUMAN	Insulin receptor OS=Homo sapiens GN=INSR PE=1 SV=4	0.000000000000000	false
--- a/tool-data/effectiveT3.loc.sample	Thu May 21 10:48:40 2015 -0400
+++ b/tool-data/effectiveT3.loc.sample	Mon Sep 21 05:45:51 2015 -0400
@@ -14,6 +14,7 @@
 #e.g.
 #
 # /opt/EffectiveT3/TTSS_GUI-1.0.1.jar
+# /opt/EffectiveT3/module/TTSS_STD-2.0.2.jar
 # /opt/EffectiveT3/module/TTSS_STD-1.0.1.jar
 # /opt/EffectiveT3/module/TTSS_ANIMAL-1.0.1.jar
 # /opt/EffectiveT3/module/TTSS_PLANT-1.0.1.jar
@@ -21,6 +22,7 @@
 #See files ../tools/protein_analysis/effectiveT3.* for more details,
 #and http://effectors.org
 #
-standard	Type III Effector prediction with standard set	TTSS_STD-1.0.1.jar
-animal	Type III Effector prediction with animal set	TTSS_ANIMAL-1.0.1.jar
-plant	Type III Effector prediction with plant set	TTSS_PLANT-1.0.1.jar
+std_2_0_2	Type III Effector prediction with standard set (v2.0.2, Sep 2015)	TTSS_STD-2.0.2.jar
+standard	Type III Effector prediction with standard set (v1.0.1, Aug 2009)	TTSS_STD-1.0.1.jar
+animal	Type III Effector prediction with human/animal-associated set (v1.0.1, Aug 2009)	TTSS_ANIMAL-1.0.1.jar
+plant	Type III Effector prediction with plant-associated set (v1.0.1, Aug 2009)	TTSS_PLANT-1.0.1.jar
--- a/tools/effectiveT3/README.rst	Thu May 21 10:48:40 2015 -0400
+++ b/tools/effectiveT3/README.rst	Mon Sep 21 05:45:51 2015 -0400
@@ -89,6 +89,10 @@
 v0.0.14 - Fixed error handling in ``effectiveT3.py``.
 v0.0.15 - Reorder XML elements (internal change only).
         - Planemo for Tool Shed upload (``.shed.yml``, internal change only).
+v0.0.16 - Updated URLs to download the tool and models.
+        - Includes new standard classification model v2.0.2 (Sep 2015)
+          as the default entry in ``tool-data/effectiveT3.loc``
+        - Catch java exception, e.g. if Java too old for ``TTSS-STD-2.0.1.jar``
 ======= ======================================================================
 
 
@@ -105,12 +109,12 @@
 Planemo commands (which requires you have set your Tool Shed access details in
 ``~/.planemo.yml`` and that you have access rights on the Tool Shed)::
 
-    $ planemo shed_update --shed_target testtoolshed --check_diff ~/repositories/pico_galaxy/tools/effectiveT3/
+    $ planemo shed_update -t testtoolshed --check_diff ~/repositories/pico_galaxy/tools/effectiveT3/
     ...
 
 or::
 
-    $ planemo shed_update --shed_target toolshed --check_diff ~/repositories/pico_galaxy/tools/effectiveT3/
+    $ planemo shed_update -t toolshed --check_diff ~/repositories/pico_galaxy/tools/effectiveT3/
     ...
 
 To just build and check the tar ball, use::
--- a/tools/effectiveT3/effectiveT3.py	Thu May 21 10:48:40 2015 -0400
+++ b/tools/effectiveT3/effectiveT3.py	Mon Sep 21 05:45:51 2015 -0400
@@ -21,7 +21,7 @@
 
 if "-v" in sys.argv or "--version" in sys.argv:
     # TODO - Get version of the JAR file dynamically?
-    print("Wrapper v0.0.14, TTSS_GUI-1.0.1.jar")
+    print("Wrapper v0.0.15, TTSS_GUI-1.0.1.jar")
     sys.exit(0)
 
 def sys_exit(msg, error_level=1):
@@ -83,13 +83,14 @@
     # Use .communicate as can get deadlocks with .wait(),
     stdout, stderr = child.communicate()
     return_code = child.returncode
-    if return_code:
+    if return_code or stderr.startswith("Exception in thread"):
         cmd_str= " ".join(cmd)  # doesn't quote spaces etc
         if stderr and stdout:
             sys_exit("Return code %i from command:\n%s\n\n%s\n\n%s" % (return_code, cmd_str, stdout, stderr))
         else:
             sys_exit("Return code %i from command:\n%s\n%s" % (return_code, cmd_str, stderr))
 
+
 if not os.path.isdir(effectiveT3_dir):
     sys_exit("Effective T3 folder not found: %r" % effectiveT3_dir)
 
--- a/tools/effectiveT3/effectiveT3.xml	Thu May 21 10:48:40 2015 -0400
+++ b/tools/effectiveT3/effectiveT3.xml	Mon Sep 21 05:45:51 2015 -0400
@@ -1,4 +1,4 @@
-<tool id="effectiveT3" name="Effective T3" version="0.0.15">
+<tool id="effectiveT3" name="Effective T3" version="0.0.16">
     <description>Find bacterial effectors in protein sequences</description>
     <requirements>
         <requirement type="package" version="1.0.1">effectiveT3</requirement>
@@ -50,6 +50,13 @@
             <output name="tabular_file" file="four_human_proteins.effectiveT3.tabular" ftype="tabular" lines_diff="2"/>
         </test>
         <test>
+            <param name="fasta_file" value="four_human_proteins.fasta" ftype="fasta" />
+            <param name="module" value="std_2_0_2" />
+            <param name="type" value="cutoff" />
+	    <param name="cutoff" value="0.8" />
+            <output name="tabular_file" file="four_human_proteins.effectiveT3_std2.tabular" ftype="tabular" />
+        </test>
+        <test>
             <param name="fasta_file" value="empty.fasta" ftype="fasta" />
             <param name="module" value="plant" />
             <param name="type" value="sensitive" />
--- a/tools/effectiveT3/tool_dependencies.xml	Thu May 21 10:48:40 2015 -0400
+++ b/tools/effectiveT3/tool_dependencies.xml	Mon Sep 21 05:45:51 2015 -0400
@@ -8,22 +8,24 @@
                     <environment_variable name="EFFECTIVET3" action="set_to">$INSTALL_DIR</environment_variable>
                 </action>
                 <!-- Main JAR file -->
-                <action type="shell_command">wget http://effectors.org/download/version/TTSS_GUI-1.0.1.jar</action>
+                <action type="shell_command">wget http://effectors.csb.univie.ac.at/sites/eff/files/others/TTSS_GUI-1.0.1.jar</action>
                 <!-- If using action type download_file will need to move the file,
                 <action type="move_file"><source>TTSS_GUI-1.0.1.jar</source><destination>$INSTALL_DIR/</destination></action>
                 -->
                 <!-- Three model JAR files -->
                 <action type="make_directory">$INSTALL_DIR/module</action>
-                <action type="shell_command">wget http://effectors.org/download/module/TTSS_ANIMAL-1.0.1.jar</action>
+                <action type="shell_command">wget http://effectors.csb.univie.ac.at/sites/eff/files/others/TTSS_ANIMAL-1.0.1.jar</action>
                 <action type="move_file"><source>TTSS_ANIMAL-1.0.1.jar</source><destination>$INSTALL_DIR/module/</destination></action>        
-                <action type="shell_command">wget http://effectors.org/download/module/TTSS_PLANT-1.0.1.jar</action>
+                <action type="shell_command">wget http://effectors.csb.univie.ac.at/sites/eff/files/others/TTSS_PLANT-1.0.1.jar</action>
                 <action type="move_file"><source>TTSS_PLANT-1.0.1.jar</source><destination>$INSTALL_DIR/module/</destination></action>
-                <action type="shell_command">wget http://effectors.org/download/module/TTSS_STD-1.0.1.jar</action>
+                <action type="shell_command">wget http://effectors.csb.univie.ac.at/sites/eff/files/others/TTSS_STD-1.0.1.jar</action>
                 <action type="move_file"><source>TTSS_STD-1.0.1.jar</source><destination>$INSTALL_DIR/module/</destination></action>
+                <action type="shell_command">wget http://effectors.csb.univie.ac.at/sites/eff/files/others/TTSS_STD-2.0.2.jar</action>
+                <action type="move_file"><source>TTSS_STD-2.0.2.jar</source><destination>$INSTALL_DIR/module/</destination></action>
             </actions>
         </install>
         <readme>
-Downloads effectiveT3 v1.0.1 and the three models from http://effectors.org/
+Downloads effectiveT3 v1.0.1 and the three models from http://effectors.org/ aka http://effectors.csb.univie.ac.at/
         </readme>
     </package>
 </tool_dependency>