From b91d212432aeef8118a55e0405a9987a015c4401 Mon Sep 17 00:00:00 2001 From: Zebulun Arendsee Date: Fri, 11 Feb 2022 09:26:30 -0600 Subject: [PATCH] Set failing exit status to 1 and redirect all output to STDERR --- octoFLU.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/octoFLU.sh b/octoFLU.sh index 32ddd17..cb080bc 100755 --- a/octoFLU.sh +++ b/octoFLU.sh @@ -2,6 +2,9 @@ # Auth: Jennifer Chang # Date: 2019/03/13 +# begin block that redirect all output to STDERR +{ + set -e set -u @@ -69,7 +72,7 @@ echo "===== Dependencies check =====" if [[ $ERR -eq 1 ]] then echo "Link or install any of your 'need to install' programs above" - exit + exit 1 fi set -v @@ -78,7 +81,7 @@ cat ${INPUT} | sed 's/[| ]/_/g' > ${BASENAME}.clean # ===== Create your Blast Database # ${MAKEBLASTDB} -in ${REFERENCE} -parse_seqids -dbtype nucl # requires no spaces in header -${MAKEBLASTDB} -in ${REFERENCE} -dbtype nucl # allows spaces in header +${MAKEBLASTDB} -in ${REFERENCE} -dbtype nucl # allows spaces in header # ===== Search your Blast Database ${BLASTN} -db ${REFERENCE} -query ${BASENAME}.clean -num_alignments 1 -outfmt 6 -out ${OUTDIR}/blast_output.txt @@ -146,3 +149,5 @@ echo "==== Final results in ${BASENAME}_Final_Output.txt" echo "alignment and tree files in the '${OUTDIR}' folder" echo "Tree files are listed below: " ls -ltr ${OUTDIR}/*.tre + +} > /dev/stderr