On Wed, Oct 27, 2010 at 2:14 PM, Freddy <freddy.debree@wur.nl> wrote:
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.
Hi Freddy, Currently Galaxy treats and output to stderr as an error (even though it is conventional to write debug messages and progress information to stderr rather than stdout). Galaxy also ignores the error level return code (conventionally non-zero for an error). See: http://bitbucket.org/galaxy/galaxy-central/issue/325/allow-tool-authors-to-d... As a workaround, you can pipe stderr to /dev/null - probably the simplest solution is to copy the script plotting/r_wrapper.sh or stats/r_wrapper.sh (which are almost but not quite identical). Peter