You can avoid working with wrappers to run 3 scripts (your R-script, a
perl or shell wrapper and the necessary xml file)
to make 1 actually run what you want to do.
I've struggled with this in the previous digests, which are not so
accessible to search-find.
simply put in your tool.xml file:
R --slave --vanilla --file=$GALAXY_ROOT_DIR/tools/<your
Rscript.R> --args $inputFile $<any nr of input args> $outputFile
This way you can run any R script in galaxy.
Unfortunately, (also in one of the previous digests), "warnings" in R
are causing an error status, so that once in a while
you will need to add to the end of the cmd line in the above: 2>&-
to ignore these warnings (but also any error message)
My advice is to build and test in shell and galaxy without it and later
add it to get to your output file(s).
So far this has worked for me.
Freddy de Bree
Date: Tue, 9 Nov 2010 15:20:52 +0100
From: Anthony Ferrari<ferraria(a)gmail.com>
Subject: [galaxy-user] plugging R into galaxy
Content-Type: text/plain; charset="iso-8859-1"
Dear galaxy users,
My team is involved in the NGS field. We have our own local cluster and we
are looking for a workflow management system. Currently we are trying to set
up and test galaxy.
For our quality control analysis pipeline, R statistical software will be
used. So we want to be able to call R scripts from galaxy.
I know that it is possible and the xy_plot.xml is a really good example
(conditional& when, repeat tags). Also, in this example a<configfile> tag
is used. Within this tag you put your R code. And moreover you can add lines
beginning with only one '#' which will be interpreted with *cheetah template
engine*. This is helpful to create dynamic content of your R code with
respect to your submitted parameters. (an old screencast introduces this
My question is : is there a way to avoid the<configfile> section and to let
all the R code be outside the tool's xml config file? If yes, how can we
specify an output file in the xml conf that will catch, for instance, a
write.table() call in the R script ?