Mercurial > repos > mvdbeek > docker_scriptrunner
view scriptrunner.xml @ 2:495946ffc2d6 draft default tip
planemo upload for repository https://github.com/mvdbeek/docker_scriptrunner/ commit dded837d19aeb3f06b84e5076282cedeeaf713fa
author | mvdbeek |
---|---|
date | Sun, 22 Jul 2018 13:38:01 -0400 |
parents | 315a7e9ed6eb |
children |
line wrap: on
line source
<tool id="docker_scriptrunner" name="docker scriptrunner" version="0.1.7"> <description>Runs scripts using docker</description> <macros> <import>macros.xml</import> </macros> <requirements> <requirement type="package" version="3.4.1">docker-py</requirement> </requirements> <command detect_errors="exit_code"> python '$__tool_directory__/scriptrunner.py' --script_path '$runme' --interpreter '$interpreter' --user_email '$__user_email__' #if $generate_simple_output.make_file=="yes": --output_file "$output_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_file #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_file" 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 file that 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 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="output_file"> <filter>generate_simple_output['make_file'] == "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_file" value="tf2_test_in.xls" ftype="tabular"/> <param name="make_file" 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="output_file" 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>