galaxytools icon indicating copy to clipboard operation
galaxytools copied to clipboard

can we somehow capture and show trimgalore's errors?

Open martenson opened this issue 8 years ago • 15 comments

original shared history https://usegalaxy.org/u/bradlanghorst/h/custom-adapter-trimming

there was an error fetching fastqs and the inputs contained only HTML so trim galore failed, however it provided this useless message:

Trim Galore! on data 2 and data 1: trimmed reads pair 2
An error occurred with this dataset:
1.8
Cutadapt terminated with exit signal: '256'.
Terminating Trim Galore run, please check error message(s) to get an idea what went wrong...

martenson avatar Apr 12 '16 13:04 martenson

Not sure how I can improve this. I don't remove any output. Maybe it is written to the repooort? https://github.com/bgruening/galaxytools/blob/master/tools/trim_galore/trim_galore.xml#L253

bgruening avatar Apr 12 '16 14:04 bgruening

ping @bwlang

bgruening avatar Apr 12 '16 14:04 bgruening

not sure if warnings will cause any other trouble... seems to be ok in my local instance.

bwlang avatar Apr 12 '16 14:04 bwlang

now with invalid input i see:

Input file './input_singles' seems to be completely empty. Consider respecifying!

Path to Cutadapt set as: 'cutadapt' (default)
1.5
Cutadapt seems to be working fine (tested command 'cutadapt --version')


AUTO-DETECTING ADAPTER TYPE
===========================
Attempting to auto-detect adapter type from the first 1 million sequences of the first file (>> ./input_singles <<)

Found perfect matches for the following adapter sequences:
Adapter type    Count   Sequence    Sequences analysed  Percentage

bwlang avatar Apr 12 '16 14:04 bwlang

@bgruening report will be filled only if trim_galore succeeds, as <command> is written now.

nsoranzo avatar Apr 12 '16 14:04 nsoranzo

@nsoranzo this is what I'm saying maybe we can improve this. But the supress_warn options can also be a way to solve this. @bwlang not sure why this is failing now :(

bgruening avatar Apr 12 '16 14:04 bgruening

@bwlang my best guess is that without supress_warn trim_galore returns an error code != 0. So we might want to use <stdio> here.

bgruening avatar Apr 12 '16 14:04 bgruening

stdio block rescues a couple of tests... the rest have changed output. any preference on whether to change the expected output to match what's generated with warnings on vs. a modification to the tests to be more flexible (e.g. re_match?)

bwlang avatar Apr 12 '16 16:04 bwlang

re_match :) Thanks @bwlang!

bgruening avatar Apr 12 '16 18:04 bgruening

@bwlang @bgruening Is this still in progress? Would be very helpful to have the reasons. Tx!

jennaj avatar Sep 19 '16 18:09 jennaj

Maybe I can find some time tonight to wrap this up... sorry about the delay.

bwlang avatar Sep 20 '16 15:09 bwlang

ping @bwlang :)

bgruening avatar May 30 '17 08:05 bgruening

I think this is ready to go now - tests pass.

bwlang avatar May 31 '17 02:05 bwlang

Original version reported: 0.4.1 Version on http://usegalaxy.org (that still does not present useful error message): 0.4.2

Latest version in Tool Shed 6/1/2017 that appears to be the one with @bwlang 's change: 0.4.3.1

@davebx @martenson Could we please update Main?

jennaj avatar Jun 09 '17 19:06 jennaj

Update - 0.4.3.1 was installed at http://usegalaxy.org.

When given a truncated fastq input, the error is still non-specific.

Cutadapt terminated with exit signal: '256'. Terminating Trim Galore run, please check error message(s) to get an idea what went wrong...

@bwlang Is this still expected? I haven't looked at the test cases yet, but this one is pretty common, so if not included yet, perhaps could include it next update?

jennaj avatar Aug 22 '17 21:08 jennaj