[BioC] Is anyone developing an extensible Galaxy-like interface for Bioconductor?

Henrik Bengtsson hb at stat.berkeley.edu
Tue Aug 5 01:25:50 CEST 2008


Hi,

comment on commandArgs() below.

On Sat, Aug 2, 2008 at 7:11 PM, Ross Lazarus
<ross.lazarus at channing.harvard.edu> wrote:
> Hi, Mark - if you need any help finessing Galaxy, please don't hesitate to
> ask me directly as I'd be very happy to help. If you keep notes on your
> progress that we can repurpose as developer documentation for BioC/R
> developers, please send it along and I'll make sure it gets added to the
> Galaxy wiki.
>
> Thanks for the pointers - I haven't looked at any of those - all the
> non-interactive R batch commands I've ever created have used the R
> commandArgs vector which allows direct access to the CL parameters without
> any muss or fuss - the counting is a bit strange because of the way R has to
> be called to run in batch mode, but something like this at the end of a
> script can be made to work easily in my experience - at least on linux:
>
> (...R functions and package loading stuff to setup the main function
> htmlPlots in this case deleted for brevity...)
>
>
> ca = commandArgs()
> nargs = length(ca)
> if (nargs < 7) # must be 7 if called correctly so whinge and bailout
> {
> print("Usage: R --vanilla --slave --args froot abspath imageurl <
> rgPlot.R\n")
> print("Please supply a file root for the input .xls file and an absolute
> path for output and an url for images\n")
> stop("terminating\n")
> }

At least since some release cycles ago you can do:

ca <- commandArgs(trailingOnly=TRUE);

which will exclude everything before and include '--args', as well as
using options '--file' to start a script instead of piping it in, e.g.

R --vanilla --slave --file=rgPlot.R --args froot abspath imageurl

My $0.02

Henrik

>
> froot = ca[5]
> workdir = ca[6]
> imageurl = ca[7]
> # if testing, see what we got
> # cat(paste('workdir=',workdir,'froot=',froot,'imageurl=',imageurl))
> htmlPlots(froot,workdir,imageurl)
>
>
> Mark Cowley wrote:
>>
>> Hi list,
>> We have been thinking about plugging in some of our generic routines (like
>> QC) into the Galaxy interface.
>> There are at least 3 useful ways of making R code more 'script-like',
>> including the built in RScript, 'littler', and the CRAN library getopt.
>>
>> URLs:
>> http://dirk.eddelbuettel.com/code/littler.html
>> relative merits of littler vs RScript:
>> http://dirk.eddelbuettel.com/code/littler/README
>>
>> littler looks to be the most convenient of the three, but on OSX, littler
>> requires R to be compiled as a dylib, which I'm currently doing, but is
>> towards the bottom of my list of things to do, thus I don't have any
>> feedback on how useful it really is.
>>
>> If anyone else has tried this, then some feedback would be great!
>
> --
> Ross Lazarus MBBS MPH, Director of Bioinformatics
> Channing Laboratory, 181 Longwood Ave., Boston MA 02115, USA.
>
>
> The information transmitted in this electronic communica...{{dropped:16}}
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>



More information about the Bioconductor mailing list