Previous changeset 117:b1a29d3d50d6 (2020-12-06) Next changeset 119:8ea1133b9d9a (2021-01-05) |
Commit message:
Uploaded |
modified:
toolfactory/rgToolFactory2.py toolfactory/rgToolFactory2.xml |
b |
diff -r b1a29d3d50d6 -r e43c43396a70 toolfactory/rgToolFactory2.py --- a/toolfactory/rgToolFactory2.py Sun Dec 06 01:21:06 2020 +0000 +++ b/toolfactory/rgToolFactory2.py Fri Dec 11 04:23:48 2020 +0000 |
[ |
@@ -571,11 +571,11 @@ safertext = "\n".join([cheetah_escape(x) for x in helptext]) if self.args.script_path: scr = [x for x in self.spacedScript if x.strip() > ""] - scr.insert(0,'\n------\n\nScript::\n') + scr.insert(0,'\n------\n\n\nScript::\n') if len(scr) > 300: scr = ( scr[:100] - + [">300 lines - stuff deleted", "......"] + + [" >300 lines - stuff deleted", " ......"] + scr[-100:] ) scr.append('\n') @@ -990,10 +990,8 @@ def main(): """ - This is a Galaxy wrapper. It expects to be called by a special purpose tool.xml as: - <command interpreter="python">rgBaseScriptWrapper.py --script_path "$scriptPath" - --tool_name "foo" --interpreter "Rscript" - </command> + This is a Galaxy wrapper. It expects to be called by a special purpose tool.xml + """ parser = argparse.ArgumentParser() a = parser.add_argument |
b |
diff -r b1a29d3d50d6 -r e43c43396a70 toolfactory/rgToolFactory2.xml --- a/toolfactory/rgToolFactory2.xml Sun Dec 06 01:21:06 2020 +0000 +++ b/toolfactory/rgToolFactory2.xml Fri Dec 11 04:23:48 2020 +0000 |
[ |
b'@@ -1,11 +1,11 @@\n-<tool id="rgtf2" name="toolfactory" version="2.00" profile="16.04" >\n+<tool id="rgtfd" name="toolfactory" version="2.00" profile="16.04" >\n <description>Scripts into tools v2.0</description>\n <macros>\n <xml name="tool_metadata">\n <param name="tool_version" label="Tool Version - bump this to warn users trying to redo old analyses" type="text" value="0.01"\n help="If you change your script and regenerate the \'same\' tool, you should inform Galaxy (and users) by changing (bumping is traditional) this number"/>\n- <param name="tool_desc" label="Tool Description" type="text" value=""\n- help="Supply a brief tool description for the Galaxy tool menu entry (optional - appears after the tool name)" />\n+ <param name="tool_desc" label="Tool Synopsis" type="text" value=""\n+ help="Supply a brief tool description for the Galaxy tool menu entry" />\n <param name="help_text" label="Tool form documentation and help text for users" type="text" area="true"\n value="**What it Does**"\n help="Supply user documentation to appear on the new tool form as reStructured text - http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html" >\n@@ -39,7 +39,8 @@\n </repeat>\n </xml>\n <xml name="io">\n- <repeat name="history_inputs" title="zero or more input data file parameters to appear on the tool form to be passed to the executable"\n+ <section name="io" title="Input and output files" expanded="true">\n+ <repeat name="history_inputs" title="zero or more input data files to pass as parameters to the executable."\n help="USE SMALL SAMPLES for the new tool\'s test. Prompts will form a history item selector as input for users of this new tool">\n <param name="input_files" type="data" format="data" label="Select an input file from your history" optional="true" multiple="false"\n help=""/>\n@@ -67,7 +68,7 @@\n help="If you will pass positional parameters, enter the integer ordinal for this parameter. If Argparse style, \'--\' will be prepended or \'-\' if single character" value="">\n </param>\n </repeat>\n- <repeat name="history_outputs" title="one or more output file parameters generated by the tool to be added to the user history"\n+ <repeat name="history_outputs" title="one or more new history items output by the executable to appear in the user history after the tool runs"\n help="The name will become a history item for users of the new tool you are making containing one of it\'s outputs">\n <param name="history_name" type="text" label="Name for this output to appear in new history" optional="false"\n help="No spaces! Argparse will also use this name as --[name]">\n@@ -85,17 +86,19 @@\n <param name="history_CL" type="text" label="Positional: ordinal integer. Use STDOUT if \'>\' required. Otherwise ignored if argparse because name is used"\n help="If positional parameters, enter the integer ordinal expected for this parameter. If argparse, ignore unless STDOUT needed" value=""/>\n <param name="history_test" type="text" label="Test pass decision criterion for this output compared to test generation"\n- help="Available options are diff:[lines], sim_size:[delta (integer) or delta_frac (float)" value="sim_size:0.01"/>\n+ help="Available options are diff:[lines], sim_size:[delta (integer) or delta_frac (float)" value="diff:0"/>\n </repeat>\n+ </section>\n </xml>\n <xml name="additparam">\n- <param name="edit_params" type="select" display="radio" label="Make parameters on the generated tool form user editable?"\n- 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">\n+ <sect'..b' \'0\':\n+ #if str($io_param.ppass.addparam.edit_params) == "yes":\n --edit_additional_parameters\n #end if\n- #for apar in $ppass.additional_parameters:\n+ #for apar in $io_param.ppass.addparam.additional_parameters:\n --additional_parameters "$apar.param_name~~~$apar.param_value~~~$apar.param_label~~~$apar.param_help~~~$apar.param_type~~~$apar.param_CL~~~$apar.param_CLprefixed"\n #end for\n #end if\n- #for $intab in $ppass.history_inputs:\n+ #for $intab in $io_param.ppass.io.history_inputs:\n --input_files "$intab.input_files~~~$intab.input_CL~~~$intab.input_formats~~~$intab.input_label~~~$intab.input_help"\n #end for\n- #for $otab in $ppass.history_outputs:\n+ #for $otab in $io_param.ppass.io.history_outputs:\n --output_files "$otab.history_name~~~$otab.history_format~~~$otab.history_CL~~~$otab.history_test"\n #end for\n --galaxy_root "$__root_dir__"\n@@ -202,7 +205,7 @@\n ]]></command>\n <configfiles>\n <configfile name="runme">\n-$usescript.dynScript\n+$deps.usescript.dynScript\n </configfile>\n <configfile name="commandoverride">\n #if $cover.commover == "yes" and len(str($cover.command_override).strip()) > 1:\n@@ -215,15 +218,15 @@\n #end if\n </configfile>\n <configfile name="helpme">\n- #if $makeMode.make_Tool != "runonly":\n-${makeMode.help_text}\n+ #if $make.makeMode.make_Tool != "runonly":\n+${make.makeMode.help_text}\n #else\n $tool_name help goes here\n #end if\n </configfile>\n <configfile name="citeme">\n-#if $makeMode.make_Tool != "runonly":\n- #for $citation in $makeMode.citations:\n+#if $make.makeMode.make_Tool != "runonly":\n+ #for $citation in $make.makeMode.citations:\n #if $citation.citation_type.type == "bibtex":\n **ENTRY**bibtex\n ${citation.citation_type.bibtex}\n@@ -244,6 +247,9 @@\n </valid>\n </sanitizer>\n </param>\n+\n+ <section name="deps" title="Dependencies, optional script and script interpreter" expanded="true">\n+\n <param name="packages" type="text" value="" label="Conda dependencies as package name[:version, name:version...]. These will always be available when this tool executes"\n optional="false" help="Use =[ver] or :[ver] for specific version - \'bwa=0.17.0\'. Default is latest. Will be used every time the tool is (re)run. Only Conda is currently supported" />\n \n@@ -276,7 +282,8 @@\n </param>\n </when>\n </conditional>\n-\n+ </section>\n+ <section name="io_param" title="Data file input, output and settings forming the executable or script command line" expanded="true">\n <conditional name="ppass">\n <param name="parampass" type="select" display="radio" label="Command line parameter passing method to use">\n <option value="argparse" selected="true">Argparse: passed in the form of --clname value</option>\n@@ -295,6 +302,7 @@\n <expand macro="io"/>\n </when>\n </conditional>\n+ </section>\n <param name="cl_prefix" type="text" value="" label="Prefix for generated command line. Prepends generated i/o and parameter CL. Use override below to replace completely"\n help="Text will replace generated executable/script elements. Sometimes required before i/o and parameters in the generated command line." />\n <conditional name="cover">\n@@ -326,7 +334,7 @@\n </param>\n </when>\n </conditional>\n-\n+ <section name="make" title="Generate, toolshed and local Galaxy installation options" expanded="true">\n <conditional name="makeMode">\n <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"\n help="Installation in this Galaxy is optional" >\n@@ -381,11 +389,10 @@\n <mapping initial="none"/>\n </sanitizer>\n </param>\n-\n <expand macro="tool_metadata" />\n </when>\n </conditional>\n-\n+ </section>\n </inputs>\n <outputs>\n \n' |