mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Many changes related to tool interfaces and jobs (DATABASE CHANGE, READ)
#) An "xy_plot" tool and a new "build_ucsc_custom_track" tool that
demonstrate the various features added here.
#) Grouping constructs for tool parameters:
- "repeat" element allows for a set of parameters to be repeated an
arbitrary number of times
- "conditional" element allows choosing a set of parameters to display
based on the value of another parameter
These constructs can be arbitrarily nested. Their values are structured
and can be used in hooks, validation, et cetera
#) Support for generating arbitrary config files to pass to a tool
#) Command lines are now full Cheetah templates
#) Better job error reporting, includes tracebacks for internal errors
preparing the job (database change required, see below!)
#) Preparation of command line, config files, exec_before_job hook moved
into job execution stage
#) Parameter values now jsonified before storing in database (this is much
more rigorous that before, and restoring from the database now works
properly)
DATABASE CHANGE:
alter table job add column traceback text;
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
<tool id="XY_Plot_1" name="XY Plot">
|
||||
<description></description>
|
||||
<command interpreter="bash">r_wrapper.sh $script_file</command>
|
||||
|
||||
<inputs>
|
||||
|
||||
<param name="main" type="text"
|
||||
value="" size="30"
|
||||
label="Plot Title"/>
|
||||
<param name="xlab" type="text"
|
||||
value="" size="30"
|
||||
label="Label for x axis"/>
|
||||
<param name="ylab" type="text"
|
||||
value="" size="30"
|
||||
label="Label for y axis"/>
|
||||
|
||||
<repeat name="series" title="Series">
|
||||
<param name="input"
|
||||
type="data" format="tabular"
|
||||
label="Dataset"/>
|
||||
<param name="xcol" type="integer"
|
||||
value="1" size="30"
|
||||
label="Column for x axis"/>
|
||||
<param name="ycol" type="integer"
|
||||
value="1" size="30"
|
||||
label="Column for y axis"/>
|
||||
<conditional name="series_type">
|
||||
<param name="type" type="select" label="Series Type">
|
||||
<option value="line" selected="true">Line</option>
|
||||
<option value="points">Points</option>
|
||||
</param>
|
||||
<when value="line">
|
||||
<param name="lty" type="select" label="Line Type">
|
||||
<option value="1">Solid</option>
|
||||
<option value="2">Dashed</option>
|
||||
<option value="3">Dotted</option>
|
||||
</param>
|
||||
<param name="col" type="select" label="Line Color">
|
||||
<option value="1">Black</option>
|
||||
<option value="2">Red</option>
|
||||
<option value="3">Green</option>
|
||||
<option value="4">Blue</option>
|
||||
<option value="5">Cyan</option>
|
||||
<option value="6">Magenta</option>
|
||||
<option value="7">Yellow</option>
|
||||
<option value="8">Gray</option>
|
||||
</param>
|
||||
<param name="lwd" type="float" label="Line Width" value="1.0"/>
|
||||
</when>
|
||||
<when value="points">
|
||||
<param name="pch" type="select" label="Point Type">
|
||||
<option value="1">Circle (hollow)</option>
|
||||
<option value="2">Triangle (hollow)</option>
|
||||
<option value="3">Cross</option>
|
||||
<option value="4">Diamond (hollow)</option>
|
||||
<option value="15">Square (filled)</option>
|
||||
<option value="16">Circle (filled)</option>
|
||||
<option value="17">Triangle (filled)</option>
|
||||
</param>
|
||||
<param name="col" type="select" label="Point Color">
|
||||
<option value="1">Black</option>
|
||||
<option value="2">Red</option>
|
||||
<option value="3">Green</option>
|
||||
<option value="4">Blue</option>
|
||||
<option value="5">Cyan</option>
|
||||
<option value="6">Magenta</option>
|
||||
<option value="7">Yellow</option>
|
||||
<option value="8">Gray</option>
|
||||
</param>
|
||||
<param name="cex" type="float" label="Point Scale" value="1.0"/>
|
||||
</when>
|
||||
</conditional>
|
||||
</repeat>
|
||||
</inputs>
|
||||
|
||||
<configfiles>
|
||||
<configfile name="script_file">
|
||||
## Setup R error handling to go to stderr
|
||||
options( show.error.messages=F,
|
||||
error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } )
|
||||
## Determine range of all series in the plot
|
||||
xrange = c( NULL, NULL )
|
||||
yrange = c( NULL, NULL )
|
||||
#for $i, $s in enumerate( $series )
|
||||
s${i} = read.table( "${s.input.file_name}" )
|
||||
x${i} = s${i}[,${s.xcol}]
|
||||
y${i} = s${i}[,${s.ycol}]
|
||||
xrange = range( x${i}, xrange )
|
||||
yrange = range( y${i}, yrange )
|
||||
#end for
|
||||
## Open output PDF file
|
||||
pdf( "${out_file1}" )
|
||||
## Dummy plot for axis / labels
|
||||
plot( NULL, type="n", xlim=xrange, ylim=yrange, main="${main}", xlab="${xlab}", ylab="${ylab}" )
|
||||
## Plot each series
|
||||
#for $i, $s in enumerate( $series )
|
||||
#if $s.series_type['type'] == "line"
|
||||
lines( x${i}, y${i}, lty=${s.series_type.lty}, lwd=${s.series_type.lwd}, col=${s.series_type.col} )
|
||||
#elif $s.series_type.type == "points"
|
||||
points( x${i}, y${i}, pch=${s.series_type.pch}, cex=${s.series_type.cex}, col=${s.series_type.col} )
|
||||
#end if
|
||||
#end for
|
||||
## Close the PDF file
|
||||
devname = dev.off()
|
||||
</configfile>
|
||||
</configfiles>
|
||||
|
||||
<outputs>
|
||||
<data format="pdf" name="out_file1" />
|
||||
</outputs>
|
||||
|
||||
</tool>
|
||||
Reference in New Issue
Block a user