changeset 7:f61366a4a14e draft

v0.0.10 Internal changes to command line handling
author peterjc
date Tue, 16 May 2017 08:50:43 -0400
parents 77cfe958b5ea
children 4863b1dbe8f0
files tools/clinod/README.rst tools/clinod/clinod.xml tools/clinod/tool_dependencies.xml
diffstat 3 files changed, 33 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/tools/clinod/README.rst	Tue Sep 01 06:54:03 2015 -0400
+++ b/tools/clinod/README.rst	Tue May 16 08:50:43 2017 -0400
@@ -73,6 +73,8 @@
 v0.0.8  - Reorder XML elements (internal change only).
         - Planemo for Tool Shed upload (``.shed.yml``, internal change only).
 v0.0.9  - Explicitly record clinod version via ``<version_command>``.
+v0.0.10 - Use ``<command detect_errors="aggressive">`` (internal change only).
+        - Single quote command line arguments (internal change only).
 ======= ======================================================================
 
 
@@ -89,17 +91,17 @@
 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 -t testtoolshed --check_diff ~/repositories/pico_galaxy/tools/clinod/
+    $ planemo shed_update -t testtoolshed --check_diff tools/clinod/
     ...
 
 or::
 
-    $ planemo shed_update -t toolshed --check_diff ~/repositories/pico_galaxy/tools/clinod/
+    $ planemo shed_update -t toolshed --check_diff tools/clinod/
     ...
 
 To just build and check the tar ball, use::
 
-    $ planemo shed_upload --tar_only  ~/repositories/pico_galaxy/tools/clinod/
+    $ planemo shed_upload --tar_only tools/clinod/
     ...
     $ tar -tzf shed_upload.tar.gz 
     test-data/four_human_proteins.fasta
--- a/tools/clinod/clinod.xml	Tue Sep 01 06:54:03 2015 -0400
+++ b/tools/clinod/clinod.xml	Tue May 16 08:50:43 2017 -0400
@@ -1,24 +1,18 @@
-<tool id="clinod" name="Nucleolar localization sequence Detector (NoD)" version="0.0.9">
+<tool id="clinod" name="Nucleolar localization sequence Detector (NoD)" version="0.0.10">
     <description>Find nucleolar localization signals (NoLSs) in protein sequences</description>
     <requirements>
-        <requirement type="binary">java</requirement>
         <requirement type="package" version="1.3">clinod</requirement>
     </requirements>
-    <stdio>
-        <!-- Assume anything other than zero is an error -->
-        <exit_code range="1:" />
-        <exit_code range=":-1" />
-    </stdio>
     <version_command>
 ##The first non-blank line contains the version information, e.g.
 ##NucleOlar localization sequence Detector v. 1.3b (13 May 2011)
 ##Question: Why don't we have to escape the dollar here?
 java -jar $CLINOD/clinod-1.3.jar | grep -i "^NucleOlar localization sequence Detector"
     </version_command>
-    <command>
+    <command detect_errors="aggressive">
 ##The Galaxy Tool Shed installation should define $CLINOD to point at folder
 ##containing both clinod-1.3.jar and the batchman binary:
-java -jar \$CLINOD/clinod-1.3.jar -in="$fasta_file" -out="$tabular_file" -t="\$GALAXY_SLOTS" -f=MEDIUM_TAB -nonols -clean_sequence
+java -jar \$CLINOD/clinod-1.3.jar -in='$fasta_file' -out='$tabular_file' -t="\${GALAXY_SLOTS:-4}" -f=MEDIUM_TAB -nonols -clean_sequence
 ##TODO - Make the -clean_sequence argument a parameter?
     </command>
     <inputs>
--- a/tools/clinod/tool_dependencies.xml	Tue Sep 01 06:54:03 2015 -0400
+++ b/tools/clinod/tool_dependencies.xml	Tue May 16 08:50:43 2017 -0400
@@ -2,21 +2,34 @@
 <tool_dependency>
     <package name="clinod" version="1.3">
         <install version="1.0">
-            <actions>
+            <actions_group>
+                <!-- Download the JAR, and SNNS binary for 64bit Linux -->
+                <actions os="linux" architecture="x86_64">
+                    <!-- Main JAR file -->
+                    <!-- Original URL http://www.compbio.dundee.ac.uk/www-nod/downloads/clinod-1.3.jar -->
+                    <action type="download_file" sha256sum="45d80662ba109a7af28aeafcfb2ca417a7d575ac3700f69bd40965a69d41e072" target_filename="clinod-1.3.jar">https://depot.galaxyproject.org/software/clinod/clinod_1.3_src_all.jar</action>
+                    <action type="move_file"><source>clinod-1.3.jar</source><destination>$INSTALL_DIR/</destination></action>
+                    <!-- clinod requires the SNNS Batch Interpreter v1.0 executable -->
+                    <!-- Original URL http://www.ra.cs.uni-tuebingen.de/downloads/SNNS/SNNSv4.3.tar.gz -->
+                    <action type="download_file" sha256sum="54bf92d23e9198f9030a3c3d2b741472e9b8660b27d3b419ade6393b1ebf6f62" target_filename="SNNSv4.3.tar.gz">https://depot.galaxyproject.org/software/SNNS/SNNS_4.3_linux_x64.tar.gz</action>
+                    <action type="shell_command">tar -zxvf SNNSv4.3.tar.gz</action>
+                    <action type="move_file"><source>SNNSv4.3/tools/bin/x86_64-pc-unknown-linux-gnuoldld/batchman</source><destination>$INSTALL_DIR/</destination></action>
+                </actions>
+                <actions>
+                    <action type="shell_command">echo "ERROR: Automated installation on your operating system and CPU architecture combination is not yet supported."</action>
+                    <action type="shell_command">echo "Your machine details (the output from 'uname' and 'arch'):"</action>
+                    <action type="shell_command">uname</action>
+                    <action type="shell_command">arch</action>
+                    <action type="shell_command">echo "Please report this via https://github.com/peterjc/pico_galaxy/issues - thank you!"</action>
+                    <action type="shell_command">false</action>
+                    <!-- The 'false' command will return an error, so Galaxy should treat this as a failed install -->
+                </actions>
+                <!-- The $PATH environment variable is only set if one of the above <actions> tags resulted in a successful installation. -->
                 <!-- Set environment variable $CLINOD so wrapper knows where to look -->
                 <action type="set_environment">
-                    <environment_variable name="CLINOD" action="set_to">$INSTALL_DIR</environment_variable>
+                    <environment_variable name="CLINOD" action="set_to">$INSTALL_DIR/</environment_variable>
                 </action>
-                <!-- clinod requires the SNNS Batch Interpreter v1.0 executable -->
-                <action type="shell_command">wget http://www.ra.cs.uni-tuebingen.de/downloads/SNNS/SNNSv4.3.tar.gz</action>
-                <action type="shell_command">tar -zxvf SNNSv4.3.tar.gz</action>
-                <action type="move_file"><source>SNNSv4.3/tools/bin/x86_64-pc-unknown-linux-gnuoldld/batchman</source><destination>$INSTALL_DIR/</destination></action>
-                <!-- clinod itself is just a JAR file -->
-                <action type="shell_command">wget http://www.compbio.dundee.ac.uk/nod/downloads/clinod-1.3.jar</action>
-                <!-- Don't need to move it, $INSTALL_DIR is the current directory
-                <action type="move_file"><source>clinod-1.3.jar</source><destination>$INSTALL_DIR</destination></action>
-                -->
-            </actions>
+            </actions_group>
         </install>
         <readme>
 Downloads and installs the command line NoD (clinod) JAR file and the binary
@@ -31,4 +44,3 @@
         </readme>
     </package>
 </tool_dependency>
-