Previous changeset 14:3635f4518c4d (2015-01-20) Next changeset 16:0027d2f66096 (2015-01-28) |
Commit message:
Uploaded |
modified:
README.md README.txt getlocalrpackages.py rgToolFactory2.py rgToolFactory2.xml test-data/tf2_test.html test-data/tf2_test.toolshed.gz |
added:
tool_test_output.html |
b |
diff -r 3635f4518c4d -r dd6cf2ddaac7 README.md --- a/README.md Tue Jan 20 19:03:18 2015 -0500 +++ b/README.md Wed Jan 28 19:28:32 2015 -0500 |
b |
@@ -2,14 +2,15 @@ ============= This is an upgrade to the tool factory but with added parameters -(optionally editable in the generated tool form - otherwise fixed) and multiple input files. +(optionally editable in the generated tool form - otherwise fixed) and +multiple input files. Any number of parameters up to the limit of your patience with repeat groups -These are optionally editable by the user - names cannot be changed - no overwriting $JAVA_HOME_DIR -or else permanently fixed and not editable at run time. +These are optionally editable by the user - names cannot be changed so +no overwriting $JAVA_HOME_DIR or else permanently fixed and not editable at run time. Any number of input files can be passed to your script, but of course it -has to deal with them. Both path and metadata name are supplied either in the environment (bash/sh) or -as command line parameters (python,perl,rscript) that need to be parsed and +has to deal with them. Both path and metadata name are supplied either in the environment +(bash/sh) or as command line parameters (python,perl,rscript) that need to be parsed and dealt with in the script. |
b |
diff -r 3635f4518c4d -r dd6cf2ddaac7 README.txt --- a/README.txt Tue Jan 20 19:03:18 2015 -0500 +++ b/README.txt Wed Jan 28 19:28:32 2015 -0500 |
[ |
b'@@ -1,177 +1,226 @@\n-# WARNING before you start\n+\xef\xbb\xbf# WARNING before you start\n # Install this tool on a private Galaxy ONLY\n # Please NEVER on a public or production instance\n # updated august 2014 by John Chilton adding citation support\n #\n # updated august 8 2014 to fix bugs reported by Marius van den Beek\n-# please cite the resource at http://bioinformatics.oxfordjournals.org/cgi/reprint/bts573?ijkey=lczQh1sWrMwdYWJ&keytype=ref \n+# please cite the resource at\n+http://bioinformatics.oxfordjournals.org/cgi/reprint/bts573?ijkey=lczQh1sWrMwdYWJ&keytype=ref\n # if you use this tool in your published work.\n \n *Short Story*\n \n This is an unusual Galaxy tool capable of generating new Galaxy tools.\n-It works by exposing *unrestricted* and therefore extremely dangerous\n-scripting to all designated administrators of the host Galaxy server, allowing them to run scripts \n-in R, python, sh and perl over multiple selected input data sets, writing a single new data set as output.\n+It works by exposing *unrestricted* and therefore extremely dangerous scripting\n+to all designated administrators of the host Galaxy server, allowing them to\n+run scripts in R, python, sh and perl over multiple selected input data sets,\n+writing a single new data set as output.\n+\n+*Differences between TF2 and the original Tool Factory*\n+\n+1. TF2 (this one) allows any number of either fixed or user-editable parameters to be defined\n+for the new tool. If these are editable, the user can change them but otherwise, they are passed\n+as fixed and invisible parameters for each execution. Obviously, there are substantial security\n+implications with editable parameters, but these are always sanitized by Galaxy\'s inbuilt \n+parameter sanitization so you may need to "unsanitize" characters - eg translate all "__lt__" \n+into "<" for certain parameters where that is needed. Please practise safe toolshed.\n+\n+2. Any number of (the same datatype) of input files may be defined.\n+\n+These changes substantially complicate the way your supplied script is supplied with\n+all the new and variable parameters. Examples in each scripting language are shown\n+in the tool help\n \n *Automated outputs in named sections*\n \n-If your script writes to the current directory path, arbitrary mix of (eg) pdfs, tabular analysis results and run logs,\n-the tool factory can optionally auto-generate a linked Html page with separate sections showing a thumbnail grid\n-for all pdfs and the log text, grouping all artifacts sharing a file name and log name prefix::\n+If your script writes to the current directory path, arbitrary mix of (eg)\n+pdfs, tabular analysis results and run logs,the tool factory can optionally\n+auto-generate a linked Html page with separate sections showing a thumbnail\n+grid for all pdfs and the log text, grouping all artifacts sharing a file\n+name and log name prefix::\n \n- eg: if "foo.log" is emitted then *all* other outputs matching foo_* will all be grouped together - eg\n+ eg: if "foo.log" is emitted then *all* other outputs matching foo_* will\n+ all be grouped together - eg\n foo_baz.pdf\n foo_bar.pdf and\n foo_zot.xls\n- would all be displayed and linked in the same section with foo.log\'s contents - to form the "Foo" section of the Html page.\n- Sections appear in alphabetic order and there are no limits on the number of files or sections.\n+ would all be displayed and linked in the same section with foo.log\'s contents\n+ - to form the "Foo" section of the Html page. Sections appear in alphabetic\n+ order and there are no limits on the number of files or sections.\n \n-*Automated generation of new Galaxy tool shed tools for installation into any Galaxy*\n+*Automated generation of new Galaxy tools for installation into any Galaxy*\n \n-Once a script is working correctly, this tool optionally generates a new Galaxy tool, effectively\n-freezing the supplied script into a new, ordinary Galaxy tool that runs it over one or more input files\n-selected by the user. Generated tools are installed via a too'..b"p Galaxy API scripts and you like to live dangerously,\n+please read on.\n \n Galaxy as an IDE?\n-Amazingly enough, blend-lib API scripts run perfectly well *inside* Galaxy when pasted into a Tool Factory form. No need to generate a new tool. Galaxy+Tool_Factory = IDE I think we need a new t-shirt. Seriously, it is actually quite useable.\n+Amazingly enough, blend-lib API scripts run perfectly well *inside*\n+Galaxy when pasted into a Tool Factory form. No need to generate a new\n+tool. Galaxy+Tool_Factory = IDE I think we need a new t-shirt. Seriously,\n+it is actually quite useable.\n \n Why bother - what's wrong with Eclipse\n-Nothing. But, compared with developing API scripts in the usual way outside Galaxy, you get persistence and other framework benefits plus at absolutely no extra charge, a ginormous security problem if you share the history or any outputs because they contain the api script with key so development servers only please!\n+Nothing. But, compared with developing API scripts in the usual way outside\n+Galaxy, you get persistence and other framework benefits plus at absolutely\n+no extra charge, a ginormous security problem if you share the history or\n+any outputs because they contain the api script with key so development\n+servers only please!\n \n Workflow\n Fire up the Tool Factory in Galaxy.\n \n-Leave the input box empty, set the interpreter to python, paste and run an api script - eg working example (substitute the url and key) below.\n+Leave the input box empty, set the interpreter to python, paste and run an\n+api script - eg working example (substitute the url and key) below.\n \n-It took me a few iterations to develop the example below because I know almost nothing about the API. I started with very simple code from one of the samples and after each run, the (edited..) api script is conveniently recreated using the redo button on the history output item. So each successive version of the developing api script you run is persisted - ready to be edited and rerun easily. It is ''very'' handy to be able to add a line of code to the script and run it, then view the output to (eg) inspect dicts returned by API calls to help move progressively deeper iteratively.\n+It took me a few iterations to develop the example below because I know\n+almost nothing about the API. I started with very simple code from one of the\n+samples and after each run, the (edited..) api script is conveniently recreated\n+using the redo button on the history output item. So each successive version\n+of the developing api script you run is persisted - ready to be edited and\n+rerun easily. It is ''very'' handy to be able to add a line of code to the\n+script and run it, then view the output to (eg) inspect dicts returned by\n+API calls to help move progressively deeper iteratively.\n \n-Give the below a whirl on a private clone (install the tool factory from the main toolshed) and try adding complexity with few rerun/edit/rerun cycles.\n+Give the below a whirl on a private clone (install the tool factory from\n+the main toolshed) and try adding complexity with few rerun/edit/rerun cycles.\n \n Eg tool factory api script\n import sys\n@@ -258,16 +331,17 @@\n libs = gi.libraries.get_libraries()\n res = []\n # libs looks like\n-# u'url': u'/galaxy/api/libraries/441d8112651dc2f3', u'id': u'441d8112651dc2f3', u'name':.... u'Demonstration sample RNA data',\n-for lib in libs: \n+# u'url': u'/galaxy/api/libraries/441d8112651dc2f3', u'id':\n+u'441d8112651dc2f3', u'name':.... u'Demonstration sample RNA data',\n+for lib in libs:\n res.append('%s:\\n' % lib['name'])\n res.append(str(gi.libraries.show_library(lib['id'],contents=True)))\n outf=open(sys.argv[2],'w')\n outf.write('\\n'.join(res))\n outf.close()\n \n-**Attribution** \n-Creating re-usable tools from scripts: The Galaxy Tool Factory \n+**Attribution**\n+Creating re-usable tools from scripts: The Galaxy Tool Factory\n Ross Lazarus; Antony Kaspi; Mark Ziemann; The Galaxy Team\n Bioinformatics 2012; doi: 10.1093/bioinformatics/bts573\n \n" |
b |
diff -r 3635f4518c4d -r dd6cf2ddaac7 getlocalrpackages.py --- a/getlocalrpackages.py Tue Jan 20 19:03:18 2015 -0500 +++ b/getlocalrpackages.py Wed Jan 28 19:28:32 2015 -0500 |
[ |
@@ -20,9 +20,13 @@ fver = [x.split(os.path.sep)[-4:-1] for x in fpaths] # >>> foo.split(os.path.sep)[-4:-1] # ['fubar', 'package_r_3_1_1', '63cdb9b2234c'] - res = [['%s rev %s owner %s' % (x[1],x[2],x[0]),fpaths[i],False] for i,x in enumerate(fver)] - res.insert(0,['Use default (system) interpreter','system',False]) - if len(res) > 1: + if len(fpaths) > 0: + res = [['%s rev %s owner %s' % (x[1],x[2],x[0]),fpaths[i],False] for i,x in enumerate(fver)] + res.insert(0,['Use default (system) interpreter','system',False]) + else: + res = [['Use default (system) interpreter','system',False], + ['**WARNING** NO package env.sh files found - is the "locate" system command working? Are any interpreters installed?','system',True]] + if len(res) > 2: res[1][2] = True # selected if more than one # return a triplet - user_sees,value,selected - all unselected if False return res |
b |
diff -r 3635f4518c4d -r dd6cf2ddaac7 rgToolFactory2.py --- a/rgToolFactory2.py Tue Jan 20 19:03:18 2015 -0500 +++ b/rgToolFactory2.py Wed Jan 28 19:28:32 2015 -0500 |
[ |
b'@@ -8,6 +8,8 @@\n # suggestions for improvement and bug fixes welcome at https://bitbucket.org/fubar/galaxytoolfactory/wiki/Home\n #\n # January 2015\n+# unified all setups by passing the script on the cl rather than via a PIPE - no need for treat_bash_special so removed\n+#\n # in the process of building a complex tool\n # added ability to choose one of the current toolshed package_r or package_perl or package_python dependencies and source that package\n # add that package to tool_dependencies\n@@ -120,6 +122,16 @@\n """\n return time.strftime(\'%d/%m/%Y %H:%M:%S\', time.localtime(time.time()))\n \n+def quote_non_numeric(s):\n+ """return a prequoted string for non-numerics\n+ useful for perl and Rscript parameter passing?\n+ """\n+ try:\n+ res = float(s)\n+ return s\n+ except ValueError:\n+ return \'"%s"\' % s\n+\n html_escape_table = {\n "&": "&",\n ">": ">",\n@@ -154,12 +166,9 @@\n return citation_tuples\n \n def shell_source(script):\n- """need a way to source a Galaxy tool interpreter env.sh so we can use that dependency\n- package \n- see http://pythonwise.blogspot.fr/2010/04/sourcing-shell-script.html\n- Sometime you want to emulate the action of "source" in bash,\n- settings some environment variables. Here is a way to do it.\n- Note that we have to finesse the automagic exports using nulls as newlines for env"""\n+ """need a way to source a Galaxy tool interpreter env.sh to point at the right dependency package \n+ This based on the idea in http://pythonwise.blogspot.fr/2010/04/sourcing-shell-script.html\n+ Note that we have to finesse any wierdly quoted newlines in automagic exports using nulls (env -0) as newlines"""\n pipe = subprocess.Popen("env -i ; . %s ; env -0" % script, stdout=subprocess.PIPE, shell=True)\n output = pipe.communicate()[0]\n outl = output.split(\'\\0\')\n@@ -176,7 +185,7 @@\n """\n \n \n- def __init__(self,opts=None,treatbashSpecial=True):\n+ def __init__(self,opts=None):\n """\n cleanup inputs, setup some outputs\n \n@@ -313,7 +322,6 @@\n self.useIM = cmd_exists(\'convert\')\n self.useGS = cmd_exists(\'gs\')\n self.temp_warned = False # we want only one warning if $TMP not set\n- self.treatbashSpecial = treatbashSpecial\n if opts.output_dir: # simplify for the tool tarball\n os.chdir(opts.output_dir)\n self.thumbformat = \'png\'\n@@ -380,7 +388,7 @@\n value = html_unescape(psplit[1])\n a(\'%s="%s"\' % (param,value))\n if (self.opts.interpreter == \'Rscript\'):\n- # pass params on command line\n+ # pass params on command line as expressions which the script evaluates - see sample\n if self.opts.input_tab:\n a(\'INPATHS="%s"\' % self.infile_paths)\n a(\'INNAMES="%s"\' % self.infile_names)\n@@ -391,23 +399,21 @@\n psplit = p.split(\',\')\n param = html_unescape(psplit[0])\n value = html_unescape(psplit[1])\n- a(\'%s="%s"\' % (param,value))\n+ a(\'%s=%s\' % (param,quote_non_numeric(value)))\n if (self.opts.interpreter == \'perl\'):\n- # pass params on command line\n+ # pass positional params on command line - perl script needs to discombobulate the path/name lists\n if self.opts.input_tab:\n a(\'%s\' % self.infile_paths)\n a(\'%s\' % self.infile_names)\n if self.opts.output_tab:\n a(\'%s\' % self.opts.output_tab)\n for p in opts.additional_parameters:\n+ # followed by any additional name=value parameter pairs\n p = p.replace(\'"\',\'\')\n psplit = p.split(\',\')\n param = html_unescape(psplit[0])\n value = html_unescape(psplit[1])\n- if (value.find(\' \') <> -1):\n- a(\'%s="%s"\' % (param,value))\n- else:\n- '..b'015 = package_[interp]_v0_v1_v2... = version v0.v1.v2.. is in play\n-\n+ # this ONLY happens at tool generation by an admin - the generated tool always uses the default of system so path is from local env.sh\n packdetails = opts.envshpath.split(os.path.sep)[-4:-1] # eg [\'fubar\', \'package_r_3_1_1\', \'63cdb9b2234c\']\n self.interpreter_owner = packdetails[0]\n self.interpreter_pack = packdetails[1]\n@@ -631,7 +634,7 @@\n else:\n tooldepcontent = self.toolhtmldepinterpskel % readme_dict\n else:\n- tooldepcontent = self.emptytoolhtmldepskel % readme_dictls -l\n+ tooldepcontent = self.emptytoolhtmldepskel % readme_dict\n depf = open(os.path.join(tdir,\'tool_dependencies.xml\'),\'w\')\n depf.write(tooldepcontent)\n depf.write(\'\\n\')\n@@ -860,50 +863,44 @@\n \n def run(self):\n """\n- scripts must be small enough not to fill the pipe!\n+ Some devteam tools have this defensive stderr read so I\'m keeping with the faith\n+ Feel free to update. \n """\n if self.opts.envshpath <> \'system\':\n shell_source(self.opts.envshpath)\n- if self.treatbashSpecial and self.opts.interpreter in [\'bash\',\'sh\']:\n- retval = self.runBash()\n- else:\n- if self.opts.output_dir:\n- ste = open(self.elog,\'w\')\n- sto = open(self.tlog,\'w\')\n- sto.write(\'## Toolfactory generated command line = %s\\n\' % \' \'.join(self.cl))\n- sto.flush()\n- p = subprocess.Popen(self.cl,shell=False,stdout=sto,stderr=ste,cwd=self.opts.output_dir)\n- else:\n- p = subprocess.Popen(self.cl,shell=False)\n+ # this only happens at tool generation - the generated tool relies on the dependencies all being set up\n+ # at toolshed installation by sourcing local env.sh \n+ if self.opts.output_dir:\n+ ste = open(self.elog,\'wb\')\n+ sto = open(self.tlog,\'wb\')\n+ s = \' \'.join(self.cl)\n+ sto.write(\'## Executing Toolfactory generated command line = %s\\n\' % s)\n+ sto.flush()\n+ p = subprocess.Popen(self.cl,shell=False,stdout=sto,stderr=ste,cwd=self.opts.output_dir)\n retval = p.wait()\n- if self.opts.output_dir:\n- sto.close()\n- ste.close()\n- err = open(self.elog,\'r\').readlines()\n- if retval <> 0 and err: # problem\n- print >> sys.stderr,err\n- if self.opts.make_HTML:\n- self.makeHtml()\n- return retval\n-\n- def runBash(self):\n- """\n- cannot use - for bash so use self.sfile\n- """\n+ sto.close()\n+ ste.close()\n+ tmp_stderr = open( self.elog, \'rb\' )\n+ err = \'\'\n+ buffsize = 1048576\n+ try:\n+ while True:\n+ err += tmp_stderr.read( buffsize )\n+ if not err or len( stderr ) % buffsize != 0:\n+ break\n+ except OverflowError:\n+ pass\n+ tmp_stderr.close()\n+ else:\n+ p = subprocess.Popen(self.cl,shell=False)\n+ retval = p.wait()\n if self.opts.output_dir:\n- s = \'## Toolfactory generated command line = %s\\n\' % \' \'.join(self.cl)\n- sto = open(self.tlog,\'w\')\n- sto.write(s)\n- sto.flush()\n- p = subprocess.Popen(self.cl,shell=False,stdout=sto,stderr=sto,cwd=self.opts.output_dir)\n- else:\n- p = subprocess.Popen(self.cl,shell=False) \n- retval = p.wait()\n- if self.opts.output_dir:\n- sto.close()\n+ if retval <> 0 and err: # problem\n+ print >> sys.stderr,err\n if self.opts.make_HTML:\n self.makeHtml()\n return retval\n+\n \n \n def main():\n' |
b |
diff -r 3635f4518c4d -r dd6cf2ddaac7 rgToolFactory2.xml --- a/rgToolFactory2.xml Tue Jan 20 19:03:18 2015 -0500 +++ b/rgToolFactory2.xml Wed Jan 28 19:28:32 2015 -0500 |
b |
@@ -1,4 +1,4 @@ -<tool id="rgTF2" name="Tool Factory Two" version="1.16"> +<tool id="rgTF2" name="Tool Factory Two" version="1.17"> <description>Scripts into tools</description> <requirements> <requirement type="package" version="9.10">ghostscript</requirement> |
b |
diff -r 3635f4518c4d -r dd6cf2ddaac7 test-data/tf2_test.html --- a/test-data/tf2_test.html Tue Jan 20 19:03:18 2015 -0500 +++ b/test-data/tf2_test.html Wed Jan 28 19:28:32 2015 -0500 |
b |
@@ -8,18 +8,18 @@ <body> <div class="toolFormBody"> -<div class="infomessage">Galaxy Tool "tf2_test" run at 15/01/2015 11:06:33</div><br/> +<div class="infomessage">Galaxy Tool "tf2_test" run at 29/01/2015 11:24:54</div><br/> <div class="toolFormTitle">tf2 log output</div> tf2_test_error.log is empty<br/> <div class="toolFormTitle">Other log output</div> -/tmp/tmp5bLHi4/job_working_directory/000/2/dataset_3_files/tf2_test_runner.log is empty<br/> +/tmp/tmpdRM3H0/job_working_directory/000/2/dataset_3_files/tf2_test_runner.log is empty<br/> <div class="toolFormTitle">All output files available for downloading</div> <div><table class="colored" cellpadding="3" cellspacing="3"><tr><th>Output File Name (click to view)</th><th>Size</th></tr> <tr><td><a href="tf2_test.python">tf2_test.python</a></td><td>0 B</td></tr> <tr class="odd_row"><td><a href="tf2_test_error.log">tf2_test_error.log</a></td><td>0 B</td></tr> -<tr><td><a href="tf2_test_runner.log">tf2_test_runner.log</a></td><td>216 B</td></tr> +<tr><td><a href="tf2_test_runner.log">tf2_test_runner.log</a></td><td>226 B</td></tr> </table></div><br/> </div></body></html> |
b |
diff -r 3635f4518c4d -r dd6cf2ddaac7 test-data/tf2_test.toolshed.gz |
b |
Binary file test-data/tf2_test.toolshed.gz has changed |
b |
diff -r 3635f4518c4d -r dd6cf2ddaac7 tool_test_output.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_test_output.html Wed Jan 28 19:28:32 2015 -0500 |
[ |
b'@@ -0,0 +1,356 @@\n+<!DOCTYPE html>\n+<html lang="en">\n+ <head>\n+ <meta charset="utf-8">\n+ <meta http-equiv="X-UA-Compatible" content="IE=edge">\n+ <meta name="viewport" content="width=device-width, initial-scale=1">\n+ <title>Tool Test Results (powered by Planemo)</title>\n+\n+ <!-- Bootstrap -->\n+ <style>/*!\n+ * Bootstrap v3.3.1 (http://getbootstrap.com)\n+ * Copyright 2011-2014 Twitter, Inc.\n+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n+ *//*! normalize.css v3.0.2 | MIT License | git.io/normalize */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:before,:after{color:#000!important;text-shadow:none!important;background:transparent!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}select{background:#fff!important}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}@font-face{font-family:\'Glyphicons Halflings\';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format(\'embedded-opentype\'),url(../fonts/glyphicons-halflings-regular.woff) format(\'woff\'),url(../fonts/glyphicons-halflings-regular.ttf) format(\'truetype\'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format(\'svg\')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:\'G'..b'l;\n+\t\tthis.command = null;\n+\t}\n+\tthis.problems = [];\n+\tvar outputProblems = data["data"]["output_problems"] || [];\n+\tvar executionProblem = data["data"]["execution_problem"];\n+\tthis.problems.push.apply(this.problems, outputProblems);\n+\tif(executionProblem) {\n+\t\tthis.problems.push(executionProblem);\n+\t}\n+\tthis.problemLog = data["data"]["problem_log"];\n+\tthis.passed = (this.status == "success");\n+}\n+\n+\n+// http://stackoverflow.com/questions/19491336/get-url-parameter-jquery\n+function getUrlParameter(sParam)\n+{\n+ var sPageURL = window.location.search.substring(1);\n+ var sURLVariables = sPageURL.split(\'&\');\n+ for (var i = 0; i < sURLVariables.length; i++) \n+ {\n+ var sParameterName = sURLVariables[i].split(\'=\');\n+ if (sParameterName[0] == sParam) \n+ {\n+ return sParameterName[1];\n+ }\n+ }\n+}\n+</script>\n+ <script>\n+ var testDataUrl = getUrlParameter("test_data_url");\n+ if(testDataUrl) {\n+ $.ajax(\n+ {\'url\': testDataUrl,\n+ \'type\': \'GET\',\n+ }\n+ )\n+ .success(function(content) { renderTestResults( $.parseJSON(content) ); })\n+ .failure(function() { alert("Failed to load test data.")} );\n+ } else {\n+ var test_data = {"tests": [{"data": {"status": "success", "inputs": {"input_formats": "tabular", "interp|interpreter": "python", "makeMode|include_deps": "yes", "makeMode|tool_version": "0.01", "make_TAB": "yes", "tool_name": "tf2_test", "input_tab": {"src": "hda", "id": "2891970512fa2d5a"}, "makeMode|help_text": "help text goes here", "interp|envpath": "system", "makeMode|tool_desc": "testing_tf2", "output_format": "tabular", "makeMode|make_Tool": "yes", "make_HTML": "yes"}, "job": {"inputs": {"input_tab": {"src": "hda", "id": "2891970512fa2d5a"}}, "update_time": "2015-01-29T00:25:34.597549", "tool_id": "rgTF2", "outputs": {"html_file": {"src": "hda", "id": "54f2a3a23292eb07"}, "output1": {"src": "hda", "id": "5729865256bc2525"}, "new_tool": {"src": "hda", "id": "8155e4b4bf1581ff"}}, "stdout": "", "command_line": "python /home/rlazarus/tools-iuc/tools/tool_factory_2/rgToolFactory2.py --script_path \\"/tmp/tmpIrcstV/job_working_directory/000/2/tmpLJbD4Y\\" --interpreter \\"python\\" --tool_name \\"tf2_test\\" --user_email \\"test@bx.psu.edu\\" --citations \\"/tmp/tmpIrcstV/job_working_directory/000/2/tmp_KHuqv\\" --envshpath \\"system\\" --output_tab \\"/tmp/tmpIrcstVfiles/000/dataset_2.dat\\" --output_format \\"tabular\\" --make_Tool \\"yes\\" --tool_desc \\"testing_tf2\\" --tool_version \\"0.01\\" --new_tool \\"/tmp/tmpIrcstVfiles/000/dataset_4.dat\\" --help_text \\"/tmp/tmpIrcstV/job_working_directory/000/2/tmp1FqjyF\\" --include_dependencies \\"yes\\" --output_dir \\"/tmp/tmpIrcstV/job_working_directory/000/2/dataset_3_files\\" --output_html \\"/tmp/tmpIrcstVfiles/000/dataset_3.dat\\" --make_HTML \\"yes\\" --input_formats \\"tabular\\" --input_tab \\"/tmp/tmpIrcstVfiles/000/dataset_1.dat,tf2_test_in.xls\\"", "exit_code": 0, "state": "ok", "create_time": "2015-01-29T00:25:30.494658", "params": {"input_formats": "\\"tabular\\"", "additional_parameters": "[]", "make_TAB": "\\"yes\\"", "interp": "{\\"interpreter\\": \\"python\\", \\"__current_case__\\": 1, \\"envpath\\": \\"system\\"}", "dbkey": "\\"hg17\\"", "makeMode": "{\\"tool_desc\\": \\"testing_tf2\\", \\"make_Tool\\": \\"yes\\", \\"tool_version\\": \\"0.01\\", \\"citations\\": [], \\"include_deps\\": \\"yes\\", \\"__current_case__\\": 0, \\"help_text\\": \\"help text goes here\\"}", "dynScript": "\\"\\"", "edit_params": "\\"no\\"", "output_format": "\\"tabular\\"", "chromInfo": "\\"/home/rlazarus/galaxy/tool-data/shared/ucsc/chrom/hg17.len\\"", "tool_name": "\\"tf2_test\\"", "make_HTML": "\\"yes\\""}, "stderr": "", "job_metrics": [], "model_class": "Job", "id": "5729865256bc2525"}}, "id": "functional.test_toolbox.TestForTool_rgTF2.test_tool_000000", "has_data": true}], "version": "0.1", "summary": {"num_skips": 0, "num_errors": 0, "num_failures": 0, "num_tests": 1}};\n+ renderTestResults(test_data);\n+ }\n+ </script>\n+ </body>\n+</html>\n' |