Skip to content

Instantly share code, notes, and snippets.

@ar0ch
Last active May 6, 2022 03:38
Show Gist options
  • Save ar0ch/2efb5d86ed3b7165443326cec52f2637 to your computer and use it in GitHub Desktop.
Save ar0ch/2efb5d86ed3b7165443326cec52f2637 to your computer and use it in GitHub Desktop.
Automatically create blastdb + restart sequence server
#!/bin/bash
j=$(basename $1)
/usr/bin/makeblastdb -in $1 -dbtype $2 -title $j
killall sequenceserver
/usr/bin/screen -dmS ss /usr/local/bin/sequenceserver -d=/home//blast/public/blast/ -H 127.0.0.1 -p 4567 > /dev/null
exit

incrontab entries

Edit your incrontab with incrontab -e

*/2 * * * * /home/blast/public/blast/genomic/ IN_MOVED_TO /home/blast/addblastdb.sh $@$# nucl
*/2 * * * * /home/blast/public/blast/protein/ IN_MOVED_TO /home/blast/addblastdb.sh $@$# prot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment