changeset 43:c5bfdb0f7041 draft

Uploaded
author fubar
date Tue, 07 Oct 2014 18:50:49 -0400
parents 4b807bc775ad
children 417cba94d862
files rgToolFactory.xml
diffstat 1 files changed, 65 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/rgToolFactory.xml	Tue Oct 07 18:47:43 2014 -0400
+++ b/rgToolFactory.xml	Tue Oct 07 18:50:49 2014 -0400
@@ -1,8 +1,8 @@
-<tool id="rgTF" name="Tool Factory" version="1.10">
+<tool id="rgTF" name="Tool Factory" version="1.11">
   <description>Makes scripts into tools</description>
    <requirements>
       <requirement type="package" version="9.10">ghostscript</requirement>
-      <requirement type="package" version="1.3.18">graphicsmagick</requirement>
+      <requirement type="package" version="1.3.20">graphicsmagick</requirement>
   </requirements>
   <command interpreter="python">
 #if ( $__user_email__ not in $__admin_users__ ):
@@ -12,6 +12,7 @@
      --tool_name "$tool_name"  --user_email "$__user_email__"
     #if $make_TAB.value=="yes":
        --output_tab "$tab_file"
+       --output_format "$output_format"
     #end if
     #if $makeMode.make_Tool=="yes":
       --make_Tool "$makeMode.make_Tool"
@@ -20,8 +21,11 @@
       --new_tool "$new_tool"
       --help_text "$helpme"
       #if $make_HTML.value=="yes":
-      --include_dependencies "${makeMode.include_deps}"
+          #if makeMode.include_deps.value=="yes":
+             --include_dependencies "yes"
+          #end if
       #end if
+      --citations "$citeme"
     #end if
     #if $make_HTML.value=="yes":
       --output_dir "$html_file.files_path" --output_html "$html_file" --make_HTML "yes"
@@ -30,12 +34,19 @@
     #end if
     #if $input1 != 'None':
        --input_tab "$input1"
+       --input_formats "$input_formats"
     #end if
 #end if 
   </command>
   <inputs>
     <param name="input1"  type="data"  label="Select an input file from your history" optional="true" size="120"
        help="Most scripts will need an input - your script MUST be ready for whatever format you choose"/>
+    <param name="input_formats" type="select" multiple="true" label="Select the datatype(s) that your tool/script accepts as input"
+    help="If your datatype is not listed here, it has to be added in galaxy's datatypes_conf.xml">
+     <options from_parameter="tool.app.datatypes_registry.upload_file_formats">
+        <column name="value" index="0"/>
+     </options>
+    </param>
     <param name="tool_name" type="text" value="My dynamic script"   label="New tool ID and title for outputs" size="60"
          help="This will become the toolshed repository name so please choose thoughtfully to avoid namespace clashes with other tool writers">
         <sanitizer invalid_char="">
@@ -66,7 +77,28 @@
                 <option value="">Rely on system ghostscript and graphicsmagick rather than include these as dependencies</option>
                 <option value="yes" selected="true">Include dependencies so target installations will always work if HTML is being generated</option>
             </param>
-
+            <repeat name="citations" title="Citation">
+                <conditional name="citation_type">
+                    <param name="type" type="select" label="Citation Type">
+                        <option value="doi">DOI</option>
+                        <option value="bibtex">BibTeX</option>
+                    </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." />
+                    </when>
+                    <when value="bibtex">
+                        <param name="bibtex" label="BibTex" type="text" area="true" size="8x120"
+                            help="Supply a BibTex entry that should be cited when this tool is used in published research." value="" >
+                            <sanitizer>
+                                <valid initial="string.printable">
+                                </valid>
+                                <mapping initial="none"/>
+                            </sanitizer>
+                        </param>
+                    </when>
+                </conditional>
+            </repeat>
         </when>
         <when value = "">
         </when>
@@ -81,16 +113,17 @@
         <option value="yes" selected="true">My script writes to a new history output</option>
         <option value="">I do not want a new history output file</option>
     </param>
-    <param name="out_format" type="select" label="Galaxy datatype for your tool's output file if any" help="You may need to edit the xml to extend this list">
-    <option value="tabular" selected="true">Tabular</option>
-    <option value="interval">Interval</option>
-    <option value="gz">gz</option>
-    <option value="text">text</option>
+   <param name="output_format" type="select" label="Select the datatype for the file your tool/script will write"
+     help="If your datatype is not listed here, it has to be added in galaxy's datatypes_conf.xml">
+     <options from_parameter="tool.app.datatypes_registry.upload_file_formats">
+        <column name="value" index="0"/>
+     </options>
     </param>
     <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>
         <option value="perl">perl</option>
+        <option value="bash">bash</option>
         <option value="sh">sh</option>
     </param>   
     <param name="dynScript" label="Cut and paste the script to be executed here" type="text" value="" area="True" size="8x120"  
@@ -103,13 +136,13 @@
      </param>
   </inputs>
   <outputs>
-    <data format="tabular" name="tab_file" label="${tool_name}.${out_format}">
-        <filter>make_TAB=="yes"</filter>
-        <change_format>
-            <when input="out_format" value="interval"  format="interval" />
-            <when input="out_format" value="gz" format="gz" />
-            <when input="out_format" value="text"  format="text"  />
-         </change_format>
+    <data format="input" name="tab_file" label="${tool_name}.${output_format}">
+      <filter>make_TAB == "yes"</filter>
+        <actions>
+          <action type="format">
+                <option type="from_param" name="output_format" />
+          </action>
+        </actions>
     </data>
     <data format="html" name="html_file" label="${tool_name}.html">
         <filter>make_HTML == "yes"</filter>
@@ -125,6 +158,19 @@
 ${makeMode.help_text}
 #end if
 </configfile>
+<configfile name="citeme">
+#if $makeMode.make_Tool == "yes":
+#for $citation in $makeMode.citations:
+#if $citation.citation_type.type == "bibtex":
+**ENTRY**bibtex
+${citation.citation_type.bibtex}
+#else
+**ENTRY**doi
+${citation.citation_type.doi}
+#end if
+#end for
+#end if
+</configfile>
 </configfiles>
 <help>
     
@@ -310,7 +356,9 @@
 
 
 </help>
-
+<citations>
+    <citation type="doi">10.1093/bioinformatics/bts573</citation>
+</citations>
 </tool>