Install Blast+

  • DB

Make directory /db and mount it as separated partition.
Copy update script from Blast+ bin directory.

# cp /usr/share/ncbi-blast-2.6.0+/bin/update_blastdb.pl /db/

# apt-get install liblist-moreutils-perl

List database names

# cd /db
# ./update_blastdb.pl --showall

Download/update database

# cd /db
# ./update_blastdb.pl --decompress --verbose swissprot
  • Blast+

Download and install

# wget ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/ncbi-blast-2.6.0+-x64-linux.tar.gz
# tar xzf ncbi-blast-2.6.0+-x64-linux.tar.gz
# mv ncbi-blast-2.6.0+ /usr/share/
# chown -R root:root /usr/share/ncbi-blast-2.6.0+
# changemod -R 755 /usr/share/ncbi-blast-2.6.0+

User script to activate Blast+

export PATH=/usr/share/ncbi-blast-2.6.0+/bin:$PATH
export BLASTDB=/db

Test installation

$ blastp -db swissprot -query testseq.fasta
  • Schedule DB update

Copy update script in directory /db.

condupdatedb.sh
#!/bin/bash
        cd /db
        date > "update.log"
 
	#verify lock db
        echo "verifica lock" >> "update.log"
        DIRS=$(find "/home/" -mindepth 1 -maxdepth 1 -type d)
        for user in $DIRS
        do
                filelock=$user"/dblock"
                if [ -e $filelock ] && [ -f $filelock ]
                then
                        echo $filelock" -> NO update" >> "update.log"
                        exit
                fi
        done
        echo "SI Update" >> "update.log"
        ./update_blastdb.pl --decompress swissprot 16SMicrobial refseq_protein >> "update.log"
        echo "DONE" >> "update.log"
        exit

Schedule cron job

crontab -e

50 12 * * * /db/condupdatedb.sh > /dev/null 2>&1

NB
Before blast execution, user must create a file named “dblock” in his home directory to avoid update while blast is running. At the end of the process the file must be removed.

 
 
rxr/blast.txt · Last modified: 2017/01/11 15:28 by giancarlo

Developers: CNR Ceris IT Office and Library
Giancarlo Birello (g.birello _@_ ceris.cnr.it) and Anna Perin (a.perin _@_ ceris.cnr.it)
BioInfo@TO.CNR is licensed under: Creative Commons License
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Drupal Garland Theme for Dokuwiki