The current Galaxy job runner does not respect the tool unix exit flag
unfortunately and will assume an error if the tool writes anything to
stderr - there's a ticket on this but no progress at
- writing to stdout should (AFAIK) not cause the job to error out?
Escaping redirection on the command line param is a pain, but you
could (eg) use something based on the shell code in
tools/bigbedwig/discard_stderr_wrapper.sh written by Assaf Gordon -
[rerla@beast galaxy]$ cat tools/bigbedwig/discard_stderr_wrapper.sh
# STDERR wrapper - discards STDERR if command execution was OK.
# This script executes a given command line,
# while saving the STDERR in a temporary file.
# When the command is completed, it checks to see if the exit code was zero.
# if so - the command is assumed to have succeeded - the STDERR file
# if not - the command is assumed to have failed, and the STDERR file
is dumped to the real STDERR
# Use this wrapper for tools which insist on writting stuff to STDERR
even if they succeeded -
# which throws galaxy off balance.
# Copyright 2009 (C) by Assaf Gordon
# This file is distributed under the BSD license.
TMPFILE=$(mktemp) || exit 1
"$@" 2> $TMPFILE
# Exitcode != 0 ?
if [ "$EXITCODE" -ne "0" ]; then
cat $TMPFILE >&2
On Fri, Sep 3, 2010 at 12:53 PM, Branden Timm <btimm(a)wisc.edu> wrote:
I'm writing some wrappers for Galaxy and am finding it difficult to debug
proper redirection of stderr and stdout in my wrapper subprocesses. When
Galaxy detects an error running a tool, it highlights the output files in
red and gives you the "bug" icon so that you can view stderr and stdout.
However, when Galaxy interprets the tool as having run successfully, I'm
unable to find a way to view what was in stdout.
Long story short, Galaxy is interpreting my tool to have run successfully
even when it hasn't. I'm redirecting stderr to sdtout on my <command>
in the tool conf file so that Galaxy only relies on return codes to detect
an error in the tool, not stderr.
Is there a way to view stdout when a tool has run "successfully"?
Great Lakes Bioenergy Research Center
galaxy-dev mailing list
Ross Lazarus MBBS MPH
Associate Professor, Harvard Medical School
Director of Bioinformatics, Channing Laboratory
181 Longwood Ave., Boston MA 02115, USA.
Tel: +1 617 505 4850