Hello I am trying to run Rscript command in Galaxy. It run completely fine without error. But it shows error ( red color as job status) and when I try to check the error it shows the standard output from the Rscript.
Thanks Snehal
Hello I am trying to run Rscript command in Galaxy. It run completely fine without error. But it shows error ( red color as job status) and when I try to check the error it shows the standard output from the Rscript.
Thanks Snehal
I solved that problem by following this blog: https://github.com/nturaga/bioc-galaxy-integration
<command detect_errors="exit_code">my_r_tool.R --input $galaxy_input --output $galaxy_output ]]></command>
There are indeed many R scripts that write to stderr instead of to stdout.
In the current setup you have whitelisted any message written to stderr. There may however be messages you still want to use to capture as errors, because they may for some reason not throw an invalid error code. What you could do instead is blacklist and whitelist particular stderr messages and use exit codes on top of that.
You can do that using the <stdio/> tags, e.g. like this:
<stdio>
<!-- capture on error codes -->
<exit_code range="1:" level="fatal" />
<!-- common stderr messages in R that really should be considered as errors -->
<regex match="Execution halted"
source="both"
level="fatal"
description="Execution halted." />
<regex match="Error in"
source="both"
level="fatal"
description="An undefined error occured, please check your intput carefully and contact your administrator." />
<regex match="Fatal error"
source="both"
level="fatal"
description="An undefined error occured, please check your intput carefully and contact your administrator." />
<!-- Messages written to stderr without being real error messages -->
<regex match="During startup - Warning messages"
source="stderr"
level="log" />
<regex match="Setting LC_[^ ]+ failed"
source="stderr"
level="warning"
description="LOCALE has not been set correctly" />
<regex match="Loading library"
source="stderr"
level="log" />
</stdio>