Skip to content

Commit

Permalink
Set failing exit status to 1 and redirect all output to STDERR
Browse files Browse the repository at this point in the history
  • Loading branch information
arendsee committed Feb 11, 2022
1 parent ed41e1e commit b91d212
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions octoFLU.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# Auth: Jennifer Chang
# Date: 2019/03/13

# begin block that redirect all output to STDERR
{

set -e
set -u

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

0 comments on commit b91d212

Please sign in to comment.