Mercurial > repos > mvdbeek > docker_scriptrunner
view scriptrunner.xml @ 1:315a7e9ed6eb draft
planemo upload for repository https://github.com/mvdbeek/docker_scriptrunner/ commit 30f8264cdd67d40dec8acde6407f32152e6a29c1-dirty
author | mvdbeek |
---|---|
date | Sat, 09 Jul 2016 17:00:06 -0400 |
parents | 21d312776891 |
children | 495946ffc2d6 |
line wrap: on
line source
<tool id="docker_scriptrunner" name="docker scriptrunner" version="1.1.6"> <description>Runs scripts using docker</description> <macros> <import>macros.xml</import> </macros> <requirements> <requirement type="package" version="1.8.1">docker-py</requirement> </requirements> <command> python "$__tool_directory__/scriptrunner.py" --script_path "$runme" --interpreter "$interpreter" --user_email "$__user_email__" #if $generate_simple_output.make_TAB=="yes": --output_tab "$tab_file" #end if #if $make_HTML.value=="yes": --output_dir "$html_file.files_path" --output_html "$html_file" --make_HTML "yes" #else: --output_dir "." #end if #if $additional_parameters != 'None': #for i in $additional_parameters: --additional_parameters "$i.param_name, $i.param_value" #end for #end if #if $input_files != 'None': --input_tab #for i in $input_files: $i.input #end for #for i in $input_files: --input_format "Any" #end for #end if --docker_image "$docker_image" </command> <configfiles> <configfile name="runme">$dynScript</configfile> </configfiles> <inputs> <repeat name="input_files" title="Select input files"> <param name="input" format="data" 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"/> </repeat> <repeat name="additional_parameters" title="Set additional parameters"> <param name="param_name" type="text" value="parameter_name" label="Choose a parameter name" size="20"> <sanitizer invalid_char=""> <valid initial="string.letters,string.digits"><add value="@_."/></valid>> </sanitizer> </param> <param name="param_value" type="text" value="parameter_value" label="Enter a parameter value" size="50"> <sanitizer> <valid initial="string.printable"> </valid> <mapping initial="none"/> </sanitizer> </param> </repeat> <param name="make_HTML" type="select" label="Create an HTML report with links to all output files and thumbnail links to PDF images" size="60" help="Recommended for presenting complex outputs in an accessible manner. Turn off for simple tools so they just create one output"> <option value="yes">Yes, arrange all outputs produced by my script as an HTML output</option> <option value="" selected="true">No, no HTML output file thanks</option> </param> <conditional name="generate_simple_output"> <param name="make_TAB" type="select" label="Create a new history output alongside the HTML file specified above" help="This is useful if your script creates a single new tabular file you want to appear in the history after the tool executes"> <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> <when value="yes"> <param name="out_format" type="select" label="Select the datatype that your tool/script produces" 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> </when> <when value=""> </when> </conditional> <param name="interpreter" type="select" label="Select the interpreter for your code"> <option value="Rscript" selected="true">Rscript</option> <option value="python">python</option> <option value="perl">perl</option> <option value="sh">sh</option> </param> <param help="The script you are pasting will be run in this image. Make sure it contains the necessary tools" label="Select a docker image" name="docker_image" type="select"> <options from_data_table="docker_scriptrunner_images"/> </param> <param name="dynScript" label="Copy and paste the script to be executed here" type="text" value="" area="True" size="8x120" help="Script must deal with two command line parameters: Path to input tabular file path (or 'None' if none selected) and path to output tabular history file (or 'None')."> <sanitizer> <valid initial="string.printable"> </valid> <mapping initial="none"/> </sanitizer> </param> </inputs> <outputs> <data format_source="input" name="tab_file"> <filter>generate_simple_output['make_TAB'] == "yes"</filter> <actions> <action type="format"> <option type="from_param" name="generate_simple_output.out_format" /> </action> </actions> </data> <data format="html" name="html_file" > <filter>make_HTML == "yes"</filter> </data> </outputs> <tests> <test> <param name='input_tab' value='tf2_test_in.xls' ftype='tabular' /> <param name="make_TAB" value="yes" /> <param name="make_HTML" value="yes" /> <param name="out_format" value="tabular" /> <param name="interpreter" value='python' /> <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'/> </test> </tests> <expand macro="help_macro" /> <expand macro="test_data_macro" /> </tool>