Recently I needed to install NCBI wwwblast on my local workstation to enable some software that needed to interface with BLAST via the web service. It was straightforward to install, but I took some notes, because there were a few changes required with respect to the official wwwblast documentation at NCBI. These instructions are for Ubuntu 8.04, but probably will work with many recent flavours of Debian.
Download and install
Download NCBI wwwblast from ftp://ftp.ncbi.nih.gov/blast/executables/LATEST/ (The version I used was wwwblast-2.2.18-ia32-linux.tar.gz).
Untar it into /var/www/ , preserving permissions.
$ cd /var/www/
$ sudo tar zxvpf wwwblast-2.2.18-ia32-linux.tar.gz
You will also need to make sure csh (the “C-shell”) is installed, since the blast.cgi script needs this to run:
$ sudo apt-get install csh
Set up Apache2
The instructions in the official wwwblast manual didn’t seem to work for Apache2 .. (could be a typo: Follow SymLinks should be FollowSymLinks … one camel-case word without the space). I put this in into the VirtualHost definition in the standard /etc/apache2/sites-available/default file used by Apache2 in Ubuntu 8.04.
AddHandler cgi-script cgi REAL
Options Indexes FollowSymLinks MultiViews +ExecCGI
Allow from all
The code above was inserted just before the </VirtualHost> closing tag.
Restart Apache for good measure.
$ sudo /etc/init.d/apache2 restart
Configure your wwwblast to see your databases
Assuming you already have some existing BLAST formatted databases made with formatdb, you will then need to configure wwwblast to find them, as per the manual. In short, this involves putting the BLAST database files into /var/www/blast/db/ (or symlinking to the files), modifying /var/www/blast/blast.rc (or one of the other *.rc files, for other BLAST programs, eg psiblast) to associate the database name with a BLAST program, and modifying the dropdown database list in /var/www/blast/blast.html (or one of the other *.html files for other BLAST programs) to add the name of the database(s).
My BLAST databases live in /data/databases/blast/, so I simply moved the example database directory /var/www/blast/db to /var/www/blast/db.orig:
$ sudo mv /var/www/blast/db /var/www/blast/db.orig
then symlinked /var/www/blast/db to /data/databases/blast:
$ sudo ln -s /data/databases/blast /var/www/blast/db
In /var/www/blast/blast.rc I changed the line:
blastp nr swissprot pdbaa
(you may also want to configure blastn etc in the same way)
In /var/www/blast/blast.html, I changed the test database code:
<option VALUE = "test_aa_db"> test_aa_db
<option VALUE = "test_na_db"> test_na_db
<option VALUE = "nr"> nr
<option VALUE = "swissprot"> swissprot
<option VALUE = "pdbaa"> pdbaa
(you may want to do this for other BLAST programs too, eg also edit psiblast.html)
This will allow be to search the nr, swissprot and pdbaa databases I have installed using plain-vanilla BLAST.
Test it out
You should find the wwwblast interface, with a dropdown box featuring the database(s) you added. Run a test search with your favorite sequences (ensure you also select the correct blast program, eg blastp !). Enjoy using your own CPU time !