Galaxy | Tool Preview

toolfactory (version 2.00)
Toolshed repository name. Choose thoughtfully to avoid namespace clashes with other tool writers. Lower case, digits and underscores only
Dependencies, optional script and script interpreters
Dependencies, optional script and script interpreter 0
Data file input, output and settings forming the executable or script command lines
Data file input, output and settings forming the executable or script command line 0
';' separated bash commands can be used here for post processing - added at end of autogenerated command line
For arbitrary and artfull command lines. All i/o and parameters must be passed. Choose No unless needed. Not for the faint of heart
Generate, toolshed and local Galaxy installation options
Generate, toolshed and local Galaxy installation options 0

Details and attribution (see GTF)

Local Admins ONLY Only users whose IDs found in the local admin_user configuration setting in universe_wsgi.ini can run this tool.

If you find a bug Please raise an issue, or even better, submit a pull request fixing it, on the github repository GTF

What it does This tool optionally generates normal workflow compatible first class Galaxy tools

Generated tools can run existing binary packages that become requirements, existing scripts, or new scripts pasted into this tool form. Pasted scripts are written so they are part of the new tool and cannot be adjusted by the downstream user. Binary packages are managed by the dependency subsystem - conda usually, so anything in bioconda or conda_forge is available for example.

Any number of parameters can be built into the new tool form for passing in to the script or executable at runtime. These can be editable by the downstream user or baked in.

When you run this tool, your executable or script and supplied parameter values will be run to produce a canonical set of outputs - these are used to construct a test for the new tool.

If tool generation is required, a new tarball compatible with any Galaxy toolshed is created. It can be unpacked in your galaxy/tools directory and manually added to tool_conf.xml, or installed into any toolshed from where it can be installed into your Galaxy.

Note to system administrators This tool offers NO built in protection against malicious scripts. It should only be installed on private/personnal Galaxy instances. Admin_users will have the power to do anything they want as the Galaxy user if you install this tool.

Use on public servers is STRONGLY discouraged for obvious reasons

The tools generated by this tool will run just as securely as any other normal installed Galaxy tool but like any other new tools, should always be checked carefully before installation. We recommend that you follow the good code hygiene practices associated with safe toolshed practices.

Here's a sample python script that can be cut and pasted into the tool form, suitable for positional parameter passing:

# reverse order of text by row
import sys
inp = sys.argv[1]
outp = sys.argv[2]
i = open(inp,'r').readlines()
o = open(outp,'w')
for row in i:
  rs = row.rstrip()
  rs = list(rs)
  rs.reverse()
  o.write(''.join(rs))
  o.write('\n')
o.close()

With argparse style parameters:

# reverse order of text by row
import argparse
parser = argparse.ArgumentParser()
a = parser.add_argument
a('--infile',default='')
a('--outfile',default=None)
args = parser.parse_args()
inp = args.infile
outp = args.outfile
i = open(inp,'r').readlines()
o = open(outp,'w')
for row in i:
  rs = row.rstrip()
  rs = list(rs)
  rs.reverse()
  o.write(''.join(rs))
  o.write('\n')
o.close()

R script to draw some plots - use a collection.

 \# note this script takes NO input because it generates random data
dir.create('plots')
for (i in 1:10) {
    foo = runif(100)
    bar = rnorm(100)
    bar = foo + 0.05*bar
    pdf(paste('plots/yet',i,"anotherplot.pdf",sep='_'))
    plot(foo,bar,main=paste("Foo by Bar plot \#",i),col="maroon", pch=3,cex=0.6)
    dev.off()
    foo = data.frame(a=runif(100),b=runif(100),c=runif(100),d=runif(100),e=runif(100),f=runif(100))
    bar = as.matrix(foo)
    pdf(paste('plots/yet',i,"anotherheatmap.pdf",sep='_'))
    heatmap(bar,main='Random Heatmap')
    dev.off()
}

Paper

Licensing

Copyright Ross Lazarus (ross period lazarus at gmail period com) May 2012 All rights reserved. Licensed under the LGPL