Hi Anthony,
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:
<command>
R --slave --vanilla --file=$GALAXY_ROOT_DIR/tools/<your
Rscript.R> --args $inputFile $<any nr of input args> $outputFile
</command>
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
Bioinformatics
CVI, Lelystad
The Netherlands
> Date: Tue, 9 Nov 2010 15:20:52 +0100
> From: Anthony Ferrari<ferraria(a)gmail.com>
> To: galaxy-user(a)lists.bx.psu.edu
> Subject: [galaxy-user] plugging R into galaxy
> Message-ID:
> <AANLkTikNp+d9E2068H=pXd8_VH1a8cZF+rQ3zTM9rAQD(a)mail.gmail.com>
> 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
> example)
>
> 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 ?
>
> Best regards,
>
> Anthony