diff rgToolFactory2.xml @ 9:ce5ec1d989fd draft

Uploaded
author fubar
date Wed, 14 Jan 2015 19:17:11 -0500
parents 6a3c292412fa
children
line wrap: on
line diff
--- a/rgToolFactory2.xml	Mon Jan 12 05:27:52 2015 -0500
+++ b/rgToolFactory2.xml	Wed Jan 14 19:17:11 2015 -0500
@@ -1,15 +1,17 @@
-<tool id="rgTF2" name="Tool Factory Two" version="1.15">
+<tool id="rgTF2" name="Tool Factory Two" version="1.16">
   <description>Scripts into tools</description>
    <requirements>
       <requirement type="package" version="9.10">ghostscript</requirement>
       <requirement type="package" version="1.3.20">graphicsmagick</requirement>
   </requirements>
+  <code file="getlocalrpackages.py"/>
   <command interpreter="python">
 #if ( $__user_email__ not in $__admin_users__ ):
      rgToolFactory2.py --bad_user $__user_email__
 #else:
-    rgToolFactory2.py --script_path "$runme" --interpreter "$interpreter" 
+    rgToolFactory2.py --script_path "$runme" --interpreter "$interp.interpreter" 
      --tool_name "$tool_name"  --user_email "$__user_email__" --citations "$citeme"
+     --envshpath "$interp.envpath"
 
     #if $make_TAB.value=="yes":
           --output_tab "$output1"
@@ -96,7 +98,7 @@
                     </param>
                     <when value="doi">
                         <param name="doi" label="DOI" type="text" value="" 
-                        help="Supply a DOI (e.g. 10.1111/j.1740-9713.2007.00258.x) that should be cited when this tool is used in published research." />
+                        help="Supply a DOI (e.g. doi: 10.1111/j.1740-9713.2007.00258.x) that should be cited when this tool is used in published research." />
                     </when>
                     <when value="bibtex">
                         <param name="bibtex" label="BibTex" type="text" area="true" size="8x120"
@@ -135,6 +137,7 @@
         <column name="value" index="0"/>
      </options>
     </param>
+    <conditional name="interp">
     <param name="interpreter" type="select" label="Select the interpreter for your code. This must be available on the path of the execution host">
         <option value="Rscript" selected="true">Rscript</option>
         <option value="python">python</option>
@@ -142,6 +145,19 @@
         <option value="bash">bash</option>
         <option value="sh">sh</option>
     </param>
+    <when value="Rscript">
+        <param name="envpath"  type="select" label="Interpreter to use" dynamic_options="find_packages(prefix='package_r_')"
+        help = "Select the R interpreter to use when running this code - should show all installed tool shed package_r_..." /> 
+    </when>
+    <when value="python">
+        <param name="envpath"  type="select" label="Interpreter to use" dynamic_options="find_packages(prefix='package_python_')"
+        help = "Select the python dependency to use when running this code - should show all installed tool shed package_python_..." /> 
+    </when>
+    <when value="perl">
+        <param name="envpath"  type="select" label="Interpreter to use" dynamic_options="find_packages(prefix='package_perl_')"
+        help = "Select the Perl interpreter to use when running this code - should show all installed tool shed package_perl_..." /> 
+    </when>
+    </conditional>
     <param name="edit_params" type="select" label="Add all additional parameters to the generated tool form so they are user editable?" 
          help="If no (default), users will NOT be able to alter any additional parameters. If yes, these will appear on the tool form as text fields with no validation or sanitizing">
         <option value="yes">Yes, allow user to edit all additional parameters on the generated tool form</option>
@@ -244,6 +260,7 @@
     <param name="output_format" value="tabular" />
     <param name="input_formats" value="tabular" />
     <param name="interpreter" value='python' />
+    <param name="envpath" value='system' />
     <param name="runme" value="tf2_test_runme.py"/>
     <output name='output1' file='tf2_test_out.xls' compare='diff' lines_diff = '10'/>
     <output name='html_file' file="tf2_test.html" compare='diff' lines_diff = '10'/>
@@ -418,7 +435,7 @@
 
 </help>
 <citations>
-    <citation type="doi">doi: 10.1093/bioinformatics/bts573</citation>
+    <citation type="doi">10.1093/bioinformatics/bts573</citation>
 </citations>
 </tool>