You are here: BeGenDiv » LocalBlast

LocalBlast

This is a description of how to perform a BLAST search on your local machine. Complete documentation can be found at NCBI.

Install NCBI BLAST

Ubuntu:
sudo apt-get install ncbi-blast+
Linux/Unix Cluster:
# download sources
wget ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/ncbi-blast-2.2.28+-x64-linux.tar.gz
# unpack sources
tar -xvzf ncbi-blast-2.2.28+-x64-linux.tar.gz
Now the BLAST executables are located in ncbi-blast-2.2.28+/bin. Make sure to include the complete path when calling any BLAST executable, e.g.:
/home/digga/src/ncbi-blast-2.2.28+/bin/blastn [...]

(By the time this HOWTO was written 2.2.28 was the latest version. Make sure that you change the version number to the latest one when donloading BLAST.)

Target Database

What sequences should the input be mapped to?

NCBI Database

Example: nt database:
# choose an appropriate location for the database files
cd ~/blastdb
# download database files
update_blastdb nt
# unpack database files
for f in nt.??.tar.gz
do tar -xvzf $f
done

Custom Database

Example: SILVA database:
# choose an appropriate location for the database files
cd ~/blastdb
# download FASTA files
wget wget http://www.arb-silva.de/fileadmin/silva_databases/release_115/Exports/SSURef_NR99_115_tax_silva.fasta.tgz
# unpack database file
tar -xvzf SSURef_NR99_115_tax_silva.fasta.tgz
# format FASTA sequences for use as BLAST db
makeblastdb -in SSURef_NR99_115_tax_silva.fasta -dbtype nucl -out silva_ssu

Run BLAST

blastn -query SSURef_NR99_115_tax_silva.fasta \
       -db ~/blastdb/silva_ssu \
       -out blast_results \
       -outfmt 6 \
       -num_threads 8

Comments

 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback