You're right, Peter, I know R very well and I can sort argv elements. Indeed, I tried to run R scripts straight in galaxy without wrappers. For some reason it didn't capture the script and what is not so clear to me is how the input/output direction works in galaxy. I know how it works in R and shell, but then in connection with galaxy is not clear. I started using the wrapper that is in the dist (r_wrapper.sh) But that only accepts the input file through galaxy as first argv element. I tried adding output file variable etc to the shell script, but that doesn't work (so far). Thus, I thought, let's see what people think of using rpy/rpy2. On 10/12/2010 10:51 AM, Peter wrote:
On Tue, Oct 12, 2010 at 7:44 AM, Freddy<freddy.debree@wur.nl> wrote:
Hi all,
Anybody some suggestions for this? Should I learn how to use rpy or simply stick with perl to get R running in galaxy.
I've been browsing through the existing tool scripts in the galaxy dist, but basically everything is written in rpy to run R tools. There's 2 things I could do: either run R through perl scripts or learn rpy, which looks pretty simple at first glance.
Freddy
Hi Freddy,
It sounds like you know R already, but do you know Python? ;)
I would agree rpy is pretty simple, and following the existing convention of using Python and rpy would make it easier for other Galaxy developers to understand/reused/change your script.
However, rpy is no longer actively maintained and at some point Galaxy will need to move to rpy2 which is more flexible but not backwards compatible. See: http://bitbucket.org/galaxy/galaxy-central/issue/103/upgrade-rpy-to-latest-v...
As an alternative, how about just using R to write the script, and calling it directly from the Galaxy tool XML file? You can do command line parsing in R, right? You might find that simpler if you know R well.
Peter