Skip to content

Instantly share code, notes, and snippets.

@semenko
Created August 25, 2015 23:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save semenko/c7f8c7c5b6a1d44f70bf to your computer and use it in GitHub Desktop.
Save semenko/c7f8c7c5b6a1d44f70bf to your computer and use it in GitHub Desktop.
BLAST to BLAST+ upgrade annoyer
#!/bin/sh
# Get called script name (e.g. myscript.sh)
SCRIPTNAME=$(basename $0)
if tty -s
then
USER_TTY=`tty`
# Be annoying.
echo "\a@@@ WARNING @@@:\nThe $SCRIPTNAME tool has been discontinued by the NCBI." > $USER_TTY
echo "Please consider converting your scripts to use the new BLAST+ tools.\n" > $USER_TTY
# Hide errors if they pass something incorrect to the tool.
if `legacy_blast.pl "$SCRIPTNAME" "$@" --print_only >/dev/null 2>&1`
then
echo -n "You should test updating your scripts to use the following command instead:\n\t" > $USER_TTY
echo `legacy_blast.pl "$SCRIPTNAME" "$@" --print_only` > $USER_TTY
fi
fi
sleep 1
/srv/cgs/local/ncbi-blast/blast-2.2.25/bin/"$SCRIPTNAME" "$@"
#END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment