Hi all, I am using one tool which gives stdout and stderr . it is showing red color (job failed) in browser.How can i resolve such type of problem. Regards shashi shekhar
You need a wrapper to capture the stderr It would be nice if there were an option to base a tools status on the unix return value (for well behaved programs) On May 26, 2011, at 8:36 AM, "shashi shekhar" <meshashi29@gmail.com> wrote:
Hi all,
I am using one tool which gives stdout and stderr . it is showing red color (job failed) in browser.How can i resolve such type of problem.
Regards shashi shekhar ___________________________________________________________ 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:
On Thu, May 26, 2011 at 1:36 PM, shashi shekhar <meshashi29@gmail.com> wrote:
Hi all, I am using one tool which gives stdout and stderr . it is showing red color (job failed) in browser.How can i resolve such type of problem.
Regards shashi shekhar
See issue 325, https://bitbucket.org/galaxy/galaxy-central/issue/325/ Until that is fixed, you'll probably need a wrapper script, there is an example of this in tools/ncbi_blast_plus/hide_stderr.py Peter
Alternatively you can redirect your STDOUT and/or STDERR into a LOG txt file as additional output to the tool. I do many times the same since it allows the realtime tracking in the log file of the process where it is and when it's expected to be finished. Indeed a wrapper can be used but if you just have a plain cmdline with options in your tool xml you can use 1>dev/null and 2>dev/null (or 2>&- and 1>&- in short). For the XML to keep it valid you need to encode the > and & into: 2>&- Or port both into a logfile which you specify as output. 2>$logfile (2>$logfile) Alex Van: galaxy-dev-bounces@lists.bx.psu.edu [mailto:galaxy-dev-bounces@lists.bx.psu.edu] Namens shashi shekhar Verzonden: donderdag 26 mei 2011 14:36 Aan: galaxy-dev@lists.bx.psu.edu Onderwerp: [galaxy-dev] stdout and stderr Hi all, I am using one tool which gives stdout and stderr . it is showing red color (job failed) in browser.How can i resolve such type of problem. Regards shashi shekhar
PS: 2 is STDERR and 1 is STDOUT. One could do a redirect of STDERR to STDOUT and STDOUT to a logfile. You won't get a red box though when errors occur! Van: galaxy-dev-bounces@lists.bx.psu.edu [mailto:galaxy-dev-bounces@lists.bx.psu.edu] Namens Bossers, Alex Verzonden: donderdag 26 mei 2011 15:19 Aan: 'shashi shekhar' CC: galaxy-dev@lists.bx.psu.edu Onderwerp: Re: [galaxy-dev] stdout and stderr Alternatively you can redirect your STDOUT and/or STDERR into a LOG txt file as additional output to the tool. I do many times the same since it allows the realtime tracking in the log file of the process where it is and when it's expected to be finished. Indeed a wrapper can be used but if you just have a plain cmdline with options in your tool xml you can use 1>dev/null and 2>dev/null (or 2>&- and 1>&- in short). For the XML to keep it valid you need to encode the > and & into: 2>&- Or port both into a logfile which you specify as output. 2>$logfile (2>$logfile) Alex Van: galaxy-dev-bounces@lists.bx.psu.edu [mailto:galaxy-dev-bounces@lists.bx.psu.edu] Namens shashi shekhar Verzonden: donderdag 26 mei 2011 14:36 Aan: galaxy-dev@lists.bx.psu.edu Onderwerp: [galaxy-dev] stdout and stderr Hi all, I am using one tool which gives stdout and stderr . it is showing red color (job failed) in browser.How can i resolve such type of problem. Regards shashi shekhar
On Thu, May 26, 2011 at 2:42 PM, Bossers, Alex <Alex.Bossers@wur.nl> wrote:
PS: 2 is STDERR and 1 is STDOUT. One could do a redirect of STDERR to STDOUT and STDOUT to a logfile. You won’t get a red box though when errors occur!
Right - if you need to detect an error state via the return code, currently you have to do this with a wrapper script. If you don't ever expect any errors, then you can treat stderr as an output, or just redirect to to /dev/nul - but I don't like that idea - silent failures are bad. I regard fixing issue 325 as one of the top priorities in Galaxy, but in the short term I'd settle for treating any output on stderr OR a non-zero return code as a failure. i.e. Something like this patch, even if more work is needed for PBS jobs: https://bitbucket.org/galaxy/galaxy-central/issue/325/#comment-331776 Peter
Peter, can't agree more. Its more a workaround to get warnings not turning up red. Porting it to the log file would mean you have to check the logfile! Alex ________________________________________ Van: Peter Cock [p.j.a.cock@googlemail.com] Verzonden: donderdag 26 mei 2011 16:04 Aan: Bossers, Alex CC: shashi shekhar; galaxy-dev@lists.bx.psu.edu Onderwerp: Re: [galaxy-dev] stdout and stderr On Thu, May 26, 2011 at 2:42 PM, Bossers, Alex <Alex.Bossers@wur.nl> wrote:
PS: 2 is STDERR and 1 is STDOUT. One could do a redirect of STDERR to STDOUT and STDOUT to a logfile. You won’t get a red box though when errors occur!
Right - if you need to detect an error state via the return code, currently you have to do this with a wrapper script. If you don't ever expect any errors, then you can treat stderr as an output, or just redirect to to /dev/nul - but I don't like that idea - silent failures are bad. I regard fixing issue 325 as one of the top priorities in Galaxy, but in the short term I'd settle for treating any output on stderr OR a non-zero return code as a failure. i.e. Something like this patch, even if more work is needed for PBS jobs: https://bitbucket.org/galaxy/galaxy-central/issue/325/#comment-331776 Peter
participants (5)
-
Bossers, Alex
-
Florent Angly
-
Glen Beane
-
Peter Cock
-
shashi shekhar