Mercurial > repos > fubar > tool_factory_2
diff README.md @ 26:db35d39e1de9 draft
Passes planemo test
Uses galaxyxml to generate new tool.
More outputs will be added...
author | fubar |
---|---|
date | Thu, 30 Jul 2020 06:48:45 -0400 |
parents | 9fe74bd23af2 |
children |
line wrap: on
line diff
--- a/README.md Mon Mar 02 05:18:21 2015 -0500 +++ b/README.md Thu Jul 30 06:48:45 2020 -0400 @@ -34,20 +34,14 @@ A copy of the actual script is provided for provenance - be warned, it exposes real file paths. - -tldr; - -``` +**WARNING before you start** -# WARNING before you start -# Install this tool on a private Galaxy ONLY -# Please NEVER on a public or production instance -# updated august 2014 by John Chilton adding citation support -# -# updated august 8 2014 to fix bugs reported by Marius van den Beek -# please cite the resource at +Install this tool on a private Galaxy ONLY +Please NEVER on a public or production instance +Please cite the resource at http://bioinformatics.oxfordjournals.org/cgi/reprint/bts573?ijkey=lczQh1sWrMwdYWJ&keytype=ref -# if you use this tool in your published work. +if you use this tool in your published work. + *Short Story* @@ -78,16 +72,14 @@ pdfs, tabular analysis results and run logs,the tool factory can optionally auto-generate a linked Html page with separate sections showing a thumbnail grid for all pdfs and the log text, grouping all artifacts sharing a file -name and log name prefix:: - - eg: if "foo.log" is emitted then *all* other outputs matching foo_* will - all be grouped together - eg - foo_baz.pdf - foo_bar.pdf and - foo_zot.xls - would all be displayed and linked in the same section with foo.log's contents - - to form the "Foo" section of the Html page. Sections appear in alphabetic - order and there are no limits on the number of files or sections. +name and log name prefix.if "foo.log" is emitted then *all* other outputs matching foo_* will +all be grouped together - eg +- foo_baz.pdf +- foo_bar.pdf and +- foo_zot.xls + +would all be displayed and linked in the same section with foo.log's contents to form the "Foo" section of the Html page. +Sections appear in alphabetic order and there are no limits on the number of files or sections. *Automated generation of new Galaxy tools for installation into any Galaxy* @@ -98,16 +90,15 @@ and work exactly like all other Galaxy tools for your users. If you use the Html output option, please ensure that sanitize_all_html is -set to False and uncommented in universe_wsgi.ini - it should show:: +set to False and uncommented in universe_wsgi.ini - it should show - # By default, all tool output served as 'text/html' will be sanitized - sanitize_all_html = False +By default, all tool output served as 'text/html' will be sanitized +Change ```sanitize_all_html = False``` This opens potential security risks and may not be acceptable for public sites where the lack of stylesheets may make Html pages damage onlookers' eyeballs but should still be correct. - *More Detail* To use the ToolFactory, you should have prepared a script to paste into a @@ -152,23 +143,24 @@ toolshed at https://toolshed.g2.bx.psu.edu/ and search for the toolfactory repository. Open it and review the code and select the option to install it. -( + If you can't get the tool that way, the xml and py files here need to be -copied into a new tools -subdirectory such as tools/toolfactory Your tool_conf.xml needs a new entry -pointing to the xml -file - something like:: - +copied into a new tools subdirectory such as tools/toolfactory +Your tool_conf.xml needs a new entry pointing to the xml \file - something like +``` <section name="Tool building tools" id="toolbuilders"> <tool file="toolfactory/rgToolFactory.xml"/> </section> - +``` If not already there (I just added it to datatypes_conf.xml.sample), please add: + +``` <datatype extension="toolshed.gz" type="galaxy.datatypes.binary:Binary" mimetype="multipart/x-gzip" subclass="True" /> +``` to your local data_types_conf.xml. -) + Of course, R, python, perl etc are needed on your path if you want to test scripts using those interpreters. Adding new ones to this tool code should @@ -275,7 +267,7 @@ Bash and sh will see any additional parameters on their command lines and the 3 named parameters in their environment magically - well, using env on the CL - +``` ***python***:: # argparse for 3 possible comma separated lists @@ -345,7 +337,7 @@ print $fh "INPATHS=$INPATHS\n INNAMES=$INNAMES\n OUTPATH=$OUTPATH\n"; close $fh; - +``` Galaxy as an IDE for developing API scripts If you need to develop Galaxy API scripts and you like to live dangerously, @@ -383,6 +375,7 @@ the main toolshed) and try adding complexity with few rerun/edit/rerun cycles. Eg tool factory api script +``` import sys from blend.galaxy import GalaxyInstance ourGal = 'http://x.x.x.x:xxxx' @@ -399,6 +392,7 @@ outf=open(sys.argv[2],'w') outf.write('\n'.join(res)) outf.close() +``` **Attribution** Creating re-usable tools from scripts: The Galaxy Tool Factory @@ -415,9 +409,9 @@ Licensed under the LGPL -**Obligatory screenshot** +**screenshot** -http://bitbucket.org/fubar/galaxytoolmaker/src/fda8032fe989/images/dynamicScriptTool.png +![example run](/images/dynamicScriptTool.png) ```