I’m working on a very simple tool.

<tool id="gc_stat" name="GC Stat" version="0.1.0">
        <requirement type="binary">Rscript</requirement>
        <requirement type="package" version="1.1">samtools</requirement>
<requirement type="package" version="3.0.3">R</requirement>
        <exit_code range="1:" />

samtools view $bam | Rscript simple_script.R > $output
<param name='bam' type='data' format='bam' label='Mapped reads' help='BAM 
<data format='tabular' name='output' label='GC Statistic on ${on_string}'/>
Calculates a GC statistic for the specified BAM file.

this won’t work because Rscript is not running in the tool install directory 
and can’t find simple_script.R…

I’ve just been reading


and it seems that  I have to add another file…

<?xml version="1.0"?>
<set_environment version="1.0">
<environment_variable name="TOOL_INSTALL_DIR" 

and add a set_enviornment dependency to bring it in.
<requirement type="set_environment">TOOL_INSTALL_DIR</requirement>
samtools view $bam | Rscript $TOOL_INSTALL_DIR/simple_script.R > $output

I did that but the tool still won’t execute, in fact the .
Maybe because I have to put this into a toolshed - or maybe I’ve done something 

I think this complexity could be avoided by setting an TOOL_INSTALL_DIR 
environment var as a tool is executed (though John doesn’t seem to like that 
idea due to a responsibility mixing issue)

I think it’s a worthy goal to make tool development as frictionless as possible.
Is there a simpler way to do this?


Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

To search Galaxy mailing lists use the unified search at:

Reply via email to