Re: [galaxy-dev] How to manage stderr output from R?

2012-01-30 Thread Jeremy Goecks

> I still wonder if this is the best way to run R's scripts? I would
> have thought there would be a simpler option. I wonder if
> "r_wrapper.sh" could be improved to absorb stderr messages, I would
> guess Bash has these capabilities.

Ah, this would be ideal. If you can get this to work, it would be nice to 
include in the Galaxy repository.

J.___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/

Re: [galaxy-dev] How to manage stderr output from R?

2012-01-30 Thread Carlos Borroto
Hi Jeremy,

Thanks for your quick response.

I'll try switching from using 'tools/plotting/r_wrapper.sh' from
Galaxy distribution, to my own wrapper using python, so I can use your
advice.

I still wonder if this is the best way to run R's scripts? I would
have thought there would be a simpler option. I wonder if
"r_wrapper.sh" could be improved to absorb stderr messages, I would
guess Bash has these capabilities.

Thanks,
Carlos

On Mon, Jan 30, 2012 at 1:41 PM, Jeremy Goecks  wrote:
> Carlos,
>
> You'll want to have your wrapper collect output to stderr and report only if 
> the tool fails. See the Cufflinks/compare/diff wrappers for examples of how 
> this can be done.
>
> Good luck,
> J.
>
> On Jan 30, 2012, at 1:01 PM, Carlos Borroto wrote:
>
>> Hi all,
>>
>> I'm working on integrating cummeRbund[1] into Galaxy. This is a very
>> helpful tool for analysis and visualization of cuffdiff output.
>>
>> My problem is any text output from running R code, puts the galaxy
>> output in error state. Even if everything is working correctly and the
>> outputs are generated as intended. I tried this code from
>> 'tools/plotting/xy_plot.xml':
>> ## Setup R error handling to go to stderr
>> options( show.error.messages=F,
>>    error = function () { cat( geterrmessage(), file=stderr() ); q(
>> "no", 1, F ) } )
>>
>> But it didn't help. Even for loading the library I had to go with:
>> suppressPackageStartupMessages(library("cummeRbund"))
>>
>> Nothing else would work. Now the tool is outputting some messages
>> while running R functions, which is putting the output in galaxy in
>> error state. I'm thinking about asking the upstream developer to
>> provide a way to run the functions in the library in 'quite' mode. Is
>> there any other option?
>>
>> Right now I'm using the path of creating a R script in the XML file
>> and using r_wrapper.sh to run it. I tried first with rpy, as it would
>> give me more freedom, but cummeRbund use ggplot2 which seems to be
>> supported only on rpy2.
>>
>> [1]http://compbio.mit.edu/cummeRbund/
>>
>> Thanks in advance,
>> Carlos
>> ___
>> Please keep all replies on the list by using "reply all"
>> in your mail client.  To manage your subscriptions to this
>> and other Galaxy lists, please use the interface at:
>>
>>  http://lists.bx.psu.edu/
>

___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/

Re: [galaxy-dev] How to manage stderr output from R?

2012-01-30 Thread Jeremy Goecks
Carlos,

You'll want to have your wrapper collect output to stderr and report only if 
the tool fails. See the Cufflinks/compare/diff wrappers for examples of how 
this can be done.

Good luck,
J.  

On Jan 30, 2012, at 1:01 PM, Carlos Borroto wrote:

> Hi all,
> 
> I'm working on integrating cummeRbund[1] into Galaxy. This is a very
> helpful tool for analysis and visualization of cuffdiff output.
> 
> My problem is any text output from running R code, puts the galaxy
> output in error state. Even if everything is working correctly and the
> outputs are generated as intended. I tried this code from
> 'tools/plotting/xy_plot.xml':
> ## Setup R error handling to go to stderr
> options( show.error.messages=F,
>error = function () { cat( geterrmessage(), file=stderr() ); q(
> "no", 1, F ) } )
> 
> But it didn't help. Even for loading the library I had to go with:
> suppressPackageStartupMessages(library("cummeRbund"))
> 
> Nothing else would work. Now the tool is outputting some messages
> while running R functions, which is putting the output in galaxy in
> error state. I'm thinking about asking the upstream developer to
> provide a way to run the functions in the library in 'quite' mode. Is
> there any other option?
> 
> Right now I'm using the path of creating a R script in the XML file
> and using r_wrapper.sh to run it. I tried first with rpy, as it would
> give me more freedom, but cummeRbund use ggplot2 which seems to be
> supported only on rpy2.
> 
> [1]http://compbio.mit.edu/cummeRbund/
> 
> Thanks in advance,
> Carlos
> ___
> Please keep all replies on the list by using "reply all"
> in your mail client.  To manage your subscriptions to this
> and other Galaxy lists, please use the interface at:
> 
>  http://lists.bx.psu.edu/


___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:

  http://lists.bx.psu.edu/