Mercurial > repos > fubar > tool_factory_2
diff toolfactory/rgToolFactory2.xml @ 50:bf432f4486c7 draft
Uploaded
author | fubar |
---|---|
date | Sun, 30 Aug 2020 01:45:27 -0400 |
parents | 35a912ce0c83 |
children | e8bf01166d74 |
line wrap: on
line diff
--- a/toolfactory/rgToolFactory2.xml Thu Aug 27 23:11:01 2020 -0400 +++ b/toolfactory/rgToolFactory2.xml Sun Aug 30 01:45:27 2020 -0400 @@ -1,7 +1,7 @@ <tool id="rgTF2" name="toolfactory" version="2.00" profile="16.04" > <description>Scripts into tools</description> <macros> - <xml name="planemo_steps"> + <xml name="tool_metadata"> <param name="tool_version" label="Tool Version - bump this to warn users trying to redo old analyses" type="text" value="0.01" help="If you change your script and regenerate the 'same' tool, you should inform Galaxy (and users) by changing (bumping is traditional) this number"/> <param name="tool_desc" label="Tool Description" type="text" value="" @@ -130,22 +130,16 @@ </repeat> </xml> </macros> - <requirements> - <requirement type="package">python</requirement> - <requirement type="package">perl</requirement> - <requirement type="package">r-base</requirement> - <requirement type="package">galaxyxml</requirement> - <requirement type="package">planemo</requirement> - <requirement type="package">yaml</requirement> - <requirement type="package">lxml</requirement> - </requirements> - <command interpreter="python"><![CDATA[ +<requirements> + <requirement type="package" version="0.1">planemoenv</requirement> +</requirements> + <command ><![CDATA[ #import os #set dev_env = os.environ.get('GALAXY_DEVELOPMENT_ENVIRONMENT', '0') == '1' #if not $dev_env and ( $__user_email__ not in $__admin_users__ ): -$__tool_directory__/rgToolFactory2.py --bad_user $__user_email__ +python3 $__tool_directory__/rgToolFactory2.py --bad_user $__user_email__ #else: -$__tool_directory__/rgToolFactory2.py +python3 $__tool_directory__/rgToolFactory2.py #if len(str($cl_prefix)) > 3: --cl_prefix "$cl_prefix" #end if @@ -191,9 +185,7 @@ ]]></command> <configfiles> <configfile name="runme"> -#if $usescript.choosescript == 'yes': $usescript.dynScript -#end if </configfile> <configfile name="commandoverride"> #if $cover.commover == "yes" and len(str($cover.command_override).strip()) > 1: @@ -239,32 +231,32 @@ <conditional name="interexe"> <param name="dependency_model" type="select" label="Dependency model: Conda managed external dependency or existing system executable" help = "If managed, the supplied package will become a requirement so must match the tool dependency resolver package name in conda."> - <option value="managed" selected="true" >Use Conda managed dependencies</option> - <option value="system" >Use a non-dependency managed system executable like bash or awk</option> + <option value="managed" selected="true" >Use Conda managed dependencies for scripting (python, R,....) or command line packages (bwa,samtools)</option> + <option value="system" >Use a non-dependency managed system executable for scripting like bash or command line driven like sed or awk</option> </param> <when value="managed"> - <param name="packages" type="text" value="" label="Package name[:version, name:version...] for Conda. First will be called on generated command line" optional="false" - help="Use colon to append specific versiion like 'bwa:0.17.0'. Default is latest if no version. Will be used every time the tool is (re)run." /> + <param name="packages" type="text" value="" label="Package name[:version, name:version...] for Conda. First (e.g. python) will be called on generated command line" + optional="false" help="Use :[ver] for specific version - 'bwa:0.17.0'. Default is latest. Will be used every time the tool is (re)run." /> <param name="sysexe" type="hidden" value="" /> </when> <when value="system"> - <param name="sysexe" type="text" value="" label="System executable to run. Supplied/managed by the operating system - not Conda" optional="false" + <param name="sysexe" type="text" value="" label="System executable to run. OS version - not Conda managed" optional="false" help=".e.g bash, awk or other standard and relatively invariant unix utilities"/> <param name="packages" type="hidden" value="" /> </when> </conditional> <conditional name="usescript"> - <param name="choosescript" type="select" display="radio" label="Choose whether to run a supplied script - useful only if the dependency can use them" - help = "Useful for script interpreters like Python or bash. All i/o and parameters must be passed. Choose No unless script is needed."> + <param name="choosescript" type="select" display="radio" label="Run a supplied script if the dependency reads one (e.g. python/R/bash)" + help = "For script interpreters like Python or bash. Parameters and i/o below must match script's expectations"> <option value="no" selected="true">No script required for the first dependency above - just parameters on the command line</option> - <option value="yes">A script is ready to be pasted below.</option> + <option value="yes">Yes, a script is ready to be pasted below for the chosen package</option> </param> <when value="no"> <param name="dynScript" type="hidden" value="" /> </when> <when value="yes"> - <param name="dynScript" type="text" area="True" value="" label="Script for first dependency to interpret. " - help="Script must handle all i/o and parameters as specified below using the parameter passing method chosen above"> + <param name="dynScript" type="text" area="True" value="" label="Script for first dependency above (e.g. python) to interpret. " + help="Script must handle all i/o and parameters as specified below using the parameters and passing method chosen below"> <sanitizer> <valid initial="string.printable"> </valid> @@ -275,9 +267,9 @@ </conditional> <conditional name="ppass"> <param name="parampass" type="select" display="radio" label="Command line parameter passing method to use"> - <option value="argparse" selected="true">Argparse style: passed in the form of --clname value</option> + <option value="argparse" selected="true">Argparse: passed in the form of --clname value</option> <option value="positional">Positional: Passed in the order of positional ordinals ...foo.bam bar.idx zot.xls</option> - <option value="0">Tool reads selected input file from STDIN and writes STDOUT with new history output with no parameters</option> + <option value="0">Tool reads selected input file from STDIN and writes STDOUT with no parameters</option> </param> <when value="argparse"> <expand macro="io" /> @@ -296,8 +288,8 @@ <conditional name="cover"> <param name="commover" type="select" display="radio" label="Add Human wrought code to override the generated XML command and/or test section - DIY" help = "For arbitrary and artfull command lines. All i/o and parameters must be passed. Choose No unless needed. Not for the faint of heart"> - <option value="no" selected="true">Use automatically generated command/test XML </option> - <option value="yes">DIY XML needed to replace autogenerated command and/or test segments will be pasted below</option> + <option value="no" selected="true">No. Use automatically generated command/test XML </option> + <option value="yes">Yes. XML needed to override autogenerated command and/or test segments will be pasted below</option> </param> <when value="no"> <param name="command_override" type="hidden" value="" /> @@ -324,30 +316,22 @@ </conditional> <conditional name="makeMode"> - <param name="make_Tool" type="select" display="radio" label="Choose the steps you want to run. Docker is recommended if you want local installation" - help="Testing and installation in this Galaxy is optional. Planemo run must be used if you are providing XML overrides for the command or test sections" > - <option value="runonly">Run this configuration. NOT suitable for Executable command/test overriden tools</option> - <option value="generate" selected="true">Run and generate toolshed archive containing the new tool. NOT suitable for command/test overriden tools</option> - <option value="gentest">Run, generate and test the new tool with planemo. NOT suitable for command/test overriden tools</option> - <option value="gentestinstall">Run, generate, planemo test and install (via the local toolshed) the new tool. NOT suitable for command/test overriden tools</option> - <option value="planemogenerate">Planemo test twice - once to generate test outputs. Suitable for tools with or without command/test overrides but takes time</option> - <option value="planemogeninstall">Planemo test twice and install. Suitable for tools with or without command/test overrides.</option> + <param name="make_Tool" type="select" display="radio" label="Choose the steps you want to run. The TF Docker container is recommended for local installation" + help="Testing and installation in this Galaxy are optional" > + <option value="runonly">Run this configuration in Galaxy (will run Planemo if command or test override in play)</option> + <option value="generate">Generate a toolshed ready archive.</option> + <option value="gentest" selected="true">Test with planemo after generating.</option> + <option value="gentestinstall">Install in this Galaxy after generation and testing. Must have local ToolShed as in the TF Docker container</option> </param> <when value="runonly"/> <when value="generate"> - <expand macro="planemo_steps" /> + <expand macro="tool_metadata" /> </when> <when value="gentest"> - <expand macro="planemo_steps" /> + <expand macro="tool_metadata" /> </when> <when value="gentestinstall"> - <expand macro="planemo_steps" /> - </when> - <when value="planemogenerate"> - <expand macro="planemo_steps" /> - </when> - <when value="planemogeninstall"> - <expand macro="planemo_steps" /> + <expand macro="tool_metadata" /> </when> </conditional> @@ -361,11 +345,10 @@ <collection name="TF_run_report" type="list" label="${tool_name} outputs"> <discover_datasets pattern="__name_and_ext__" directory="TF_run_report_tempdir" /> </collection> - - </outputs> <tests> <test> + <param name="user_email" value="admin@galaxy.org"/> <param name="input_files" value="input1_sample" /> <param name="input_CL" value="1" /> <param name="input_formats" value="txt" /> @@ -377,13 +360,14 @@ <param name="tool_version" value="0.01" /> <param name="tool_desc" value="positional reverse" /> <param name="help_text" value="help text goes here" /> - <param name="interpreter" value="python"/> - <param name="history_name" value="output2_sample" /> + <param name="packages" value="python"/> + <param name="history_name" value="output2" /> <param name="history_format" value="txt" /> <param name="history_CL" value="2" /> <param name="dynScript" value="import sys; inp = sys.argv[1]; outp = sys.argv[2]; inlist = open(inp,'r').readlines(); o = open(outp,'w'); rs = [''.join(list(reversed(x.rstrip()))) for x in inlist]; o.write('\n'.join(rs)); o.close()"/> + <param name="choosescript" value="yes" /> + <param name="script_path" value="$runme"/> <output name="new_tool" file="toolfactory_pyrevpos_tgz_sample" compare="sim_size" delta="6000" /> - <!-- <output name="output" file="output2_sample" ftype="txt" compare="diff" lines_diff = "10" /> --> </test> </tests> <help> @@ -472,13 +456,10 @@ o.close() -Paper_ : -Creating re-usable tools from scripts: The Galaxy Tool Factory -Ross Lazarus; Antony Kaspi; Mark Ziemann; The Galaxy Team -Bioinformatics 2012; doi: 10.1093/bioinformatics/bts573 +Paper_ -**Licensing** +*Licensing* Copyright Ross Lazarus (ross period lazarus at gmail period com) May 2012 All rights reserved.