Hi all,

I have been trying to wrap a test r script into my local galaxy install using r_wrapper.sh but have been running with problems. When I run the tool, I get the following error in the side bar. For reference, I've pasted the xml file below.

Error: 
Error in file(file, "rt") : cannot open the connection Calls: read.table -> file Error during wrapup: object 'l' not found Lost warning messages Execution halted

The xml file:
<tool id="r_script_test" name="Test R Script">
  <description>for proof of concept</description>
  <command interpreter="bash">r_wrapper.sh $script_file</command>
  <inputs>
    <param name="in_data" type="data" format="tabular" label="Test source file"/>
  </inputs>
  <outputs>
    <data name="out_data" format="tabular" />
  </outputs>
  <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", l, F)})

      ## Read in tab file
      data1 = read.table("{$in_data}", sep="\t")

      ## Output tab file 
      write.table(data1, file="{$out_data}", quote=FALSE, sep="\t", eol = "\n", row.names=FALSE, col.names=FALSE)

      ## Close the session
      dev.off()
    </configfile>
  </configfiles>

  <help>
    This tools tests a R script to do simple file I/O
  </help>
 
</tool>

I have r_wrapper.sh copied in the same directory as the xml file. Any help would be appreciated!

Thanks!
Jeremy Liu