changeset 40:8603867451d8 draft

Uploaded
author fubar
date Thu, 28 Aug 2014 06:18:31 -0400
parents 64f7bd086146
children 8d28e32c71ff
files README.txt rgToolFactory.py rgToolFactory.xml tool_dependencies.xml
diffstat 4 files changed, 58 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- a/README.txt	Thu Aug 28 03:05:01 2014 -0400
+++ b/README.txt	Thu Aug 28 06:18:31 2014 -0400
@@ -16,14 +16,6 @@
 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. 
 
-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:
-
-# By default, all tool output served as 'text/html' will be sanitized
-sanitize_all_html = False
-
-*More Detail*
-
 To use the ToolFactory, you should have prepared a script to paste into a text box,
 and a small test input example ready to select from your history to test your new script.
 There is an example in each scripting language on the Tool Factory form. You can just
@@ -48,6 +40,31 @@
 
 Tool factory tools are perfect for workflow components. One input, one output, no variables.
 
+*Reasons to read further*
+
+If you use Galaxy to support your research;
+
+You and fellow users are sometimes forced to take data out of Galaxy, process it with ugly
+little perl/awk/sed/R... scripts and put it back;
+
+You do this when you can't do some transformation in Galaxy (the 90/10 rule);
+
+You don't have enough developer resources for wrapping dozens of even relatively simple tools;
+
+Your research and your institution would be far better off if those feral scripts were all tucked 
+safely in your local toolshed and Galaxy histories.
+
+*The good news* If it can be trivially scripted, it can be running safely in your
+local Galaxy via your own local toolshed in a few minutes - with functional tests.
+
+
+*Value proposition* The ToolFactory allows Galaxy to efficiently take over most of your lab's 
+dark script matter, making it reproducible in Galaxy and shareable through the ToolShed.
+
+That's what this tool does. You paste a simple script and the tool returns 
+a new, real Galaxy tool, ready to be installed from the local toolshed to local servers.
+Scripts can be wrapped and online literally within minutes.
+
 *To fully and safely exploit the awesome power* of this tool, Galaxy and the ToolShed,
 you should be a developer installing this tool on a private/personal/scratch local instance where you 
 are an admin_user. Then, if you break it, you get to keep all the pieces
@@ -55,10 +72,9 @@
 
 ** Installation **
 This is a Galaxy tool. You can install it most conveniently using the administrative "Search and browse tool sheds" link.
-Find the Galaxy Main toolshed at https://toolshed.g2.bx.psu.edu/ and search for the toolfactory repository.
+Find the Galaxy Test toolshed (not main) 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::
@@ -69,8 +85,11 @@
 
 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.
-)
+to your local data_types_conf.xml. 
+
+Ensure that html sanitization is set to False and uncommented in universe_wsgi.ini
+
+You'll have to restart the server for the new tool to be available.
 
 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 be easy enough. Please make suggestions as bitbucket issues and code.
@@ -118,6 +137,18 @@
 
 Patches and suggestions welcome as bitbucket issues please? 
 
+long route to June 2012 product
+derived from an integrated script model  
+called rgBaseScriptWrapper.py
+Note to the unwary:
+  This tool allows arbitrary scripting on your Galaxy as the Galaxy user
+  There is nothing stopping a malicious user doing whatever they choose
+  Extremely dangerous!!
+  Totally insecure. So, trusted users only
+
+
+
+
 copyright ross lazarus (ross stop lazarus at gmail stop com) May 2012
 
 all rights reserved
--- a/rgToolFactory.py	Thu Aug 28 03:05:01 2014 -0400
+++ b/rgToolFactory.py	Thu Aug 28 06:18:31 2014 -0400
@@ -7,9 +7,6 @@
 # Licensed under the LGPL
 # suggestions for improvement and bug fixes welcome at https://bitbucket.org/fubar/galaxytoolfactory/wiki/Home
 #
-# august 2014
-# added some additional output datatypes
-# john added citations
 # march 2014
 # had to remove dependencies because cross toolshed dependencies are not possible - can't pre-specify a toolshed url for graphicsmagick and ghostscript
 # grrrrr - night before a demo
--- a/rgToolFactory.xml	Thu Aug 28 03:05:01 2014 -0400
+++ b/rgToolFactory.xml	Thu Aug 28 06:18:31 2014 -0400
@@ -1,5 +1,5 @@
-<tool id="rgTF" name="Tool Factory" version="1.12">
-  <description>Run a script; make a tool!</description>
+<tool id="rgTF" name="Tool Factory" version="1.11">
+  <description>Makes scripts into tools</description>
    <requirements>
       <requirement type="package" version="9.10">ghostscript</requirement>
       <requirement type="package" version="1.3.20">graphicsmagick</requirement>
@@ -105,22 +105,15 @@
         <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>
-    <param name="out_format" type="select" label="Galaxy datatype for your tool's output file if any" help="You may need to edit the xml to extend this list">
-    <option value="tabular" selected="true">Tabular</option>
-    <option value="interval">Interval</option>
-    <option value="gz">gz</option>
-    <option value="text">text</option>
-    <option value="sam">sam</option>
-    <option value="bam">bam</option>
-    <option value="fastqsanger">fastqsanger</option>
-    <option value="fastq">fastq</option>
-    <option value="fasta">fasta</option>
+   <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>
     <param name="interpreter" type="select" label="Select the interpreter for your code. This must be available on the path of the execution host">
         <option value="Rscript" selected="true">Rscript</option>
         <option value="python">python</option>
         <option value="perl">perl</option>
-        <option value="bash">bash</option>
         <option value="sh">sh</option>
     </param>   
     <param name="dynScript" label="Cut and paste the script to be executed here" type="text" value="" area="True" size="8x120"  
@@ -133,17 +126,13 @@
      </param>
   </inputs>
   <outputs>
-    <data format="tabular" name="tab_file" label="${tool_name}.${out_format}">
-        <filter>make_TAB=="yes"</filter>
-        <change_format>
-            <when input="out_format" value="interval"  format="interval" />
-            <when input="out_format" value="gz" format="gz" />
-            <when input="out_format" value="text"  format="text"  />
-            <when input="out_format" value="sam" format="sam" />
-            <when input="out_format" value="bam"  format="bam"  />
-            <when input="out_format" value="fastqsanger" format="fastqsanger" />
-            <when input="out_format" value="fastq"  format="fastq"  />
-         </change_format>
+    <data format="input" name="tab_file" label="${tool_name}.${out_format}">
+      <filter>make_TAB == "yes"</filter>
+        <actions>
+          <action type="format">
+                <option type="from_param" name="out_format" />
+          </action>
+        </actions>
     </data>
     <data format="html" name="html_file" label="${tool_name}.html">
         <filter>make_HTML == "yes"</filter>
--- a/tool_dependencies.xml	Thu Aug 28 03:05:01 2014 -0400
+++ b/tool_dependencies.xml	Thu Aug 28 06:18:31 2014 -0400
@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
 <tool_dependency>
     <package name="ghostscript" version="9.10">
-        <repository changeset_revision="a285e78179bd" name="package_ghostscript_9_10" owner="devteam" toolshed="https://toolshed.g2.bx.psu.edu/" />
+        <repository changeset_revision="a285e78179bd" name="package_ghostscript_9_10" owner="devteam" toolshed="http://toolshed.g2.bx.psu.edu/" />
     </package>
     <package name="graphicsmagick" version="1.3.20">
-        <repository changeset_revision="4967d833d196" name="package_graphicsmagick_1_3_20" owner="fubar" toolshed="https://toolshed.g2.bx.psu.edu/" />
+        <repository changeset_revision="d87c457bbbc2" name="package_graphicsmagick_1_3_20" owner="iuc" toolshed="http://toolshed.g2.bx.psu.edu/" />
     </package>
         <readme>
             Only Admins can use this tool generator but please do NOT install on a public facing Galaxy as it exposes unrestricted scripting as your Galaxy user