If I understand you correctly what you want to do you should be able to just do that by a tool.xml config calling an R script and providing a data file. The R script can open that file and process it into some output file known by galaxy.... But maybe I oversee something.
In your tool_config grab an R-file and some datafile:
<command>
R --slave -f $in_r --args $in_data $out_data
</command>
<inputs>
<param name="in_data" type="data" format="tabular" label="Test data file" />
<param name="in_r" type="data" format="text" label="R script to load and execute" />
</inputs>
<outputs>
<data name="out_data" type="data" format="tabular" label="R script output" />
</outputs>
The R script provided will grab the args from the cmd line as you indiciated earlier:
# R script file to grab input and output filenames from cmdline and just copy
args <- commandArgs()
output <- read.table(args[6], header=T)
write.table(output,sep="\t",file=args[7],row.names=F)
#end script
Hope this helped,
Alex
________________________________________
Van:
galaxy-dev-bounces@lists.bx.psu.edu [
galaxy-dev-bounces@lists.bx.psu.edu] namens Freddy [
freddy.debree@wur.nl]
Verzonden: woensdag 13 oktober 2010 14:19
Aan:
galaxy-dev@lists.bx.psu.eduOnderwerp: Re: [galaxy-dev] rpy or perl
I am not using perl, but bash, which makes things much easier on the
cmd line.
However, maybe you know how to retrieve the R output or:
what exactly is the problem for Galaxy
for how to handle the system output from R through the shell?
We have seen it here with other tools as well.
R should work straight from the cmd line as well.
And everything - incl R - does when use bash in a shell, but as soon
as you put galaxy in between you and the program the output,
is nowhere to be seen
so far, we've been able to simply 'mv' the output from the program
towards bash and that will push it to galaxy.
But with R this didn't work. (so far)
On 10/13/2010 12:47 PM, Leandro Hermida wrote:
Just to note for those Perl people developing tools with Galaxy and
wanting to interface with R there are a couple of libraries out there
to do this for you:
RSPerl
http://www.omegahat.org/RSPerl/
Statistics::R
http://search.cpan.org/search?query=Statistics%3A%3AR
_______________________________________________
galaxy-dev mailing list
galaxy-dev@lists.bx.psu.eduhttp://lists.bx.psu.edu/listinfo/galaxy-dev_______________________________________________
galaxy-dev mailing list
galaxy-dev@lists.bx.psu.edu
http://lists.bx.psu.edu/listinfo/galaxy-dev