I can sink() any messages/warnings to dev/null in R, I'll give that a try. On 10/27/2010 4:48 PM, Bossers, Alex wrote:
Freddy,
what we also did for some of the MUMmer tools I am porting that also has occasional additional output... We capture stderror en stdout and either pipe it to dev/null like Peter says or what I prefer for developemnt is to pipe-append all stdout and/or stderr to a log file as output in galaxy. Since for the R scripts to run you will use a wrapper anyway you could also check the stderr status in that wrapper.
To grab sterr and stdout you can use: 1>&- or 2>&- to pipe them to dev/null. I have it conditional in my galaxy_too config to choose if you want the log yes or no.
Hope it helps and is what you mean!
Cheers Alex
________________________________________ Van: galaxy-dev-bounces@lists.bx.psu.edu [galaxy-dev-bounces@lists.bx.psu.edu] namens Freddy [freddy.debree@wur.nl] Verzonden: woensdag 27 oktober 2010 15:14 Aan: galaxy-dev@lists.bx.psu.edu Onderwerp: [galaxy-dev] suppress screen messages in R
I am trying to include R modules in Galaxy.
A few of the things I encounter:
a) warnings: any warnings() message in R makes Galaxy stop! For R in the shell this means nothing. It simply warns you and that is all, there is no problem or error, just a potential problem with for example rownames in a data.frame which is usually not a big deal to the user.
b) screen messages: this is for example the outcome of a boolean somewhere in the function you are then using in R. It simply outputs a vector with the outcome from a boolean somewhere in the function. However, for Galaxy this is enough reason to see this as an error! and thus: stops!
(this happened with function image() when making pdf of array images)
In principle this is wrong, because Galaxy should only stop in case of an error, not because of one of the above. Still, you do want to see screen output, cause it is helpful in the devel stage.
How to go around this?
And I think, the galaxy team will probably have to answer this one.
_______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev