Question: Running R In Galaxy
1
gravatar for Bree, Freddy de
8.2 years ago by
Bree, Freddy de • 90 wrote:
I've been trying to run R in Galaxy. 1. Running it as "R" is a hassle, because Galaxy cannot deal with source and input file and output file using "--args" and "<" (< in xml) and ">" (> in xml). 2. Running it through "perl" is also a hassle, because Galaxy needs to have an input file through the cmd line, whilst "R" needs: - input file (the location of it, not the content) - source file (.R file) - output file BUT you need to pipe -this- input for perl through to R VIA the system() call. Anybody any luck with this? (everything runs without Galaxy btw, but that is not the aim) Freddy
galaxy • 3.3k views
ADD COMMENT • link • modified 8.1 years ago • written 8.2 years ago by Bree, Freddy de • 90
0
gravatar for Sean Davis
8.2 years ago by
Sean Davis • 220
Sean Davis • 220 wrote:
Have you tried littler as a scripting engine? http://dirk.eddelbuettel.com/code/littler.html That is only one potential solution. Sean
ADD COMMENT • link written 8.2 years ago by Sean Davis • 220
0
gravatar for James Taylor
8.2 years ago by
James Taylor ♦ 470
United States
James Taylor ♦ 470 wrote:
We use a small shell script called r_wrapper.sh which is included in the distribution.
ADD COMMENT • link written 8.2 years ago by James Taylor ♦ 470
There is also now RScript http://stat.ethz.ch/R-manual/R-devel/library/utils/html/Rscript.html since R distro before that there was littelr too http://code.google.com/p/littler/ Malcolm Cook Stowers Institute for Medical Research - Bioinformatics Kansas City, Missouri USA To: Bree, Freddy de Cc: galaxy-user@lists.bx.psu.edu Subject: Re: [galaxy-user] running R in Galaxy We use a small shell script called r_wrapper.sh which is included in the distribution. _______________________________________________ galaxy-user mailing list galaxy-user@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-user
ADD REPLY • link written 8.2 years ago by Cook, Malcolm • 30
0
gravatar for Bree, Freddy de
8.2 years ago by
Bree, Freddy de • 90 wrote:
Dear all, In addition tot he previous. I can feed the source file (Rfile) and the data file to the system() call for R, but how do I capture the output back in perl? Freddy
ADD COMMENT • link written 8.2 years ago by Bree, Freddy de • 90
0
gravatar for Bree, Freddy de
8.2 years ago by
Bree, Freddy de • 90 wrote:
Thanks again! This solves it I think. I re-directed this to galaxy-user, because it is clear that some of you do not know this either. ;) ________________________________________ To: Bree, Freddy de Subject: Re: [galaxy-user] running R in Galaxy Yes, tools/stats/r_wrapper.sh
ADD COMMENT • link written 8.2 years ago by Bree, Freddy de • 90
0
gravatar for Bree, Freddy de
8.1 years ago by
Bree, Freddy de • 90 wrote:
Following the discussion on this topic, the solution: You can run R 'straight' in galaxy without a wrapper: <command>R --slave --vanilla --file=$GALAXY_ROOT_DIR/tools/Rscript --args $infile $outfile</command> The input is never a big problem in galaxy, but how to capture the output was not so clear to me. So, Make sure your output file can be seen by galaxy (which was basically my problem): <inputs> <param name="infile" type="data" format="tabular"/> </inputs> <outputs> <data name="outfile" type="data" format="tabular"/> </outputs> And in R making sure, the output file has a name as well: write.table(data, sep="\t", file=out.file, row.names=F) Thanks for all the help!!
ADD COMMENT • link written 8.1 years ago by Bree, Freddy de • 90
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 183 users visited in the last hour