Al Simons wrote:
Hi,
I'm relatively new to Galaxy, but I believe that this is one of the major reasons people use tool wrappers. The wrappers, usually written in Python, capture the standard error output stream and redirect it to a related file.
The current Galaxy behavior is that anything written to stderr is interpreted as an error. I've seen a comment on this list a few days ago that the G-team realizes that they should move away from this and use the tool's exit status; however, that is for some future version. For now, wrappers are the way to go.
To clarify, we settled on checking stderr because it was determined that many tools did not set a non-zero exit code upon error, and thus relying on the exit code was not a reliable way to detect failure. The simplest workaround for tools which do set exit codes and write unsuppressable warnings or info to stderr is to wrap them and capture their stderr and return code. If the code is 0, do not display stderr or print info/warnings to stdout. If the code is non-zero, print something (including the captured stderr) to stderr. The proposed change to this behavior is to allow the tool author to decide whether Galaxy should consider the return code, the stderr, or both in determining failure. An issue exists for it in our tracker here: http://bitbucket.org/galaxy/galaxy-central/issue/325/ Freddy, if you have a look at the R tools we've included in the distribution, you'll see that many of them suppress warnings for this very reason.
Regards, -Al
-----Original Message----- From: galaxy-dev-bounces@lists.bx.psu.edu [mailto:galaxy-dev-bounces@lists.bx.psu.edu] On Behalf Of Freddy Sent: Wednesday, October 27, 2010 9:14 AM To: galaxy-dev@lists.bx.psu.edu Subject: [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
_______________________________________________ galaxy-dev mailing list galaxy-dev@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-dev