From d1974a42e5787ef06d4c4d25dbe7178eb26284d5 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Tue, 4 Apr 2017 18:35:37 +0100 Subject: [PATCH] Use detect_errors="exit_code" in Trim tool Prevent job failures due to spurious messages on stderr from the cluster scheduler. --- tools/filters/trimmer.py | 3 +-- tools/filters/trimmer.xml | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/tools/filters/trimmer.py b/tools/filters/trimmer.py index 9c71ff2f8bb..0bebf57a5b5 100644 --- a/tools/filters/trimmer.py +++ b/tools/filters/trimmer.py @@ -6,8 +6,7 @@ import sys def stop_err( msg ): - sys.stderr.write( msg ) - sys.exit() + sys.exit(msg) def main(): diff --git a/tools/filters/trimmer.xml b/tools/filters/trimmer.xml index cf9d176a3d0..344e06664b4 100644 --- a/tools/filters/trimmer.xml +++ b/tools/filters/trimmer.xml @@ -1,20 +1,20 @@ leading or trailing characters - + '$out_file1' +python '$__tool_directory__/trimmer.py' -a -f '$input1' -c $col -s $start -e $end -i '$ignore' $fastq > '$out_file1' ]]> - + - - - - + + + + - + @@ -31,7 +31,7 @@ python $__tool_directory__/trimmer.py -a -f '$input1' -c $col -s $start -e $end - + @@ -63,7 +63,7 @@ python $__tool_directory__/trimmer.py -a -f '$input1' -c $col -s $start -e $end - + @@ -117,24 +117,24 @@ by setting **Trim content of this column only** to *2*, **Trim from the beginnin **Trimming FASTQ datasets** -This tool can be used to trim sequences and quality strings in fastq datasets. This is done by selected *Yes* from the **Is input dataset in fastq format?** dropdown. If set to *Yes*, the tool will skip all even numbered lines (see warning below). For example, trimming last 5 bases of this dataset:: +This tool can be used to trim sequences and quality strings in FASTQ datasets. This is done by selected *Yes* from the **Is input dataset in FASTQ format?** dropdown. If set to *Yes*, the tool will skip all even numbered lines (see warning below). For example, trimming last 5 bases of this dataset:: @081017-and-081020:1:1:1715:1759 GGACTCAGATAGTAATCCACGCTCCTTTAAAATATC + II#IIIIIII$5+.(9IIIIIII$%*$G$A31I&&B - + cab done by setting **Remove everything from this position to the end** to 31:: @081017-and-081020:1:1:1715:1759 GGACTCAGATAGTAATCCACGCTCCTTTAAA + - II#IIIIIII$5+.(9IIIIIII$%*$G$A3 - + II#IIIIIII$5+.(9IIIIIII$%*$G$A3 + **Note** that headers are skipped. .. class:: warningmark -**WARNING:** This tool will only work on properly formatted fastq datasets where (1) each read and quality string occupy one line and (2) '@' (read header) and "+" (quality header) lines are evenly numbered like in the above example. +**WARNING:** This tool will only work on properly formatted FASTQ datasets where (1) each read and quality string occupy one line and (2) '@' (read header) and "+" (quality header) lines are evenly numbered like in the above example.