changeset 45:7b34711416d2 draft

Uploaded
author fubar
date Sun, 01 Mar 2015 05:57:52 -0500
parents 417cba94d862
children dbe3825e385c
files README.txt rgToolFactory.py rgToolFactory.xml
diffstat 3 files changed, 38 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/README.txt	Tue Oct 07 20:23:23 2014 -0400
+++ b/README.txt	Sun Mar 01 05:57:52 2015 -0500
@@ -1,26 +1,47 @@
 # 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:
-http://bioinformatics.oxfordjournals.org/cgi/reprint/bts573?ijkey=lczQh1sWrMwdYWJ&keytype=ref 
-if you use this tool in your published work.
+# 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.
 
 *Short Story*
 
-This is an unusual Galaxy tool that exposes unrestricted and therefore extremely dangerous
-scripting to designated administrative users of a Galaxy server, allowing them to run scripts 
-in R, python, sh and perl over a single input data set, writing a single new data set as output.
+This is an unusual Galaxy tool capable of generating new Galaxy tools.
+It works by exposing *unrestricted* and therefore extremely dangerous
+scripting to all designated administrators of the host Galaxy server, allowing them to run scripts 
+in R, python, sh and perl over multiple selected input data sets, writing a single new data set as output.
+
+*Automated outputs in named sections*
+
+If your script writes to the current directory path, arbitrary mix of (eg) 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::
 
-In addition, this tool optionally generates very simple new Galaxy tools, that effectively
-freeze the supplied script into a new, ordinary Galaxy tool that runs it over a single input file, 
-working just like any other Galaxy tool for your users. 
+ 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.
+
+*Automated generation of new Galaxy tool shed tools for installation into any Galaxy*
+
+Once a script is working correctly, this tool optionally generates a new Galaxy tool, effectively
+freezing the supplied script into a new, ordinary Galaxy tool that runs it over one or more input files
+selected by the user. Generated tools are installed via a tool shed by an administrator 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:
+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
+ 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*
 
@@ -77,7 +98,7 @@
 The HTML file code automatically shrinks R's bloated pdfs, and depends on ghostscript. The thumbnails require imagemagick .
 
 * Restricted execution *
-The new tool factory tool will then be usable ONLY by admin users - people with IDs in admin_users in universe_wsgi.ini
+The tool factory tool itself will then be usable ONLY by admin users - people with IDs in admin_users in universe_wsgi.ini
 **Yes, that's right. ONLY admin_users can run this tool** Think about it for a moment. If allowed to run any
 arbitrary script on your Galaxy server, the only thing that would impede a miscreant bent on destroying all your
 Galaxy data would probably be lack of appropriate technical skills.
--- a/rgToolFactory.py	Tue Oct 07 20:23:23 2014 -0400
+++ b/rgToolFactory.py	Sun Mar 01 05:57:52 2015 -0500
@@ -645,8 +645,8 @@
           retval = self.runBash()
         else:
             if self.opts.output_dir:
-                ste = open(self.elog,'w')
-                sto = open(self.tlog,'w')
+                ste = open(self.elog,'a')
+                sto = open(self.tlog,'a')
                 sto.write('## Toolfactory generated command line = %s\n' % ' '.join(self.cl))
                 sto.flush()
                 p = subprocess.Popen(self.cl,shell=False,stdout=sto,stderr=ste,stdin=subprocess.PIPE,cwd=self.opts.output_dir)
--- a/rgToolFactory.xml	Tue Oct 07 20:23:23 2014 -0400
+++ b/rgToolFactory.xml	Sun Mar 01 05:57:52 2015 -0500
@@ -10,7 +10,7 @@
 #else:
     rgToolFactory.py --script_path "$runme" --interpreter "$interpreter" 
      --tool_name "$tool_name"  --user_email "$__user_email__"
-    #if $make_TAB=="yes":
+    #if $make_TAB.value=="yes":
        --output_tab "$tab_file"
        --output_format "$output_format"
     #end if
@@ -24,7 +24,7 @@
       --include_dependencies "yes"
     #end if
 
-    #if $make_HTML=="yes":
+    #if $make_HTML.value=="yes":
         --output_dir "$html_file.files_path" --output_html "$html_file" --make_HTML "yes"
     #else:
        --output_dir "."