In this issue

The Human
Genome Sequence

BLink Enhances
Entrez Exploration

Human Gene


Recent Publications

BLAST Additions


Mirror FTP Site
for GenBank


Blast Lab

How to Set Up a BLAST Web Server

Do you need to provide local Web access‚ with an NCBI-like interface‚ to BLAST‚ PSI-BLAST‚ PHI-BLAST‚ MegaBLAST‚ BLAST2Sequences‚ and RPS-BLAST? Do you need to support batch queries by sequence ID or accession number? NCBI offers a Web Server package that will support these interfaces as well as batch searching‚ XML output‚ and more.

Step 1: FTP the Web Server Package

Download the latest Web Server package by FTP from:

Files are located in the “current_release” directory. Releases are available for Linux/Intel‚ OSF/DEC-Alpha‚ SGI and Solaris/Sun or Intel.

Step 2: Unpack the Archive

Unpack the distribution into any local document directory under the HTTPD server directory that has permission to run CGI programs with a *.cgi file extension. The BLAST Web server package is a Gzipped‚ tarred archive. Gunzip the archive using a command such as:

gzip -d wwwblast.platform.tar.gz
gunzip wwwblast.platform.tar.gz

Next‚ untar the archive using:
tar -xvpf wwwblast.platform.tar

Note the use of the “p”‚ or “preserve” TAR option. This option preserves the file protections as they existed when the files were archived. This is essential to allow the proper access to all files by the server software. Uncompressing the archive will create a directory called “blast”‚ which contains all the files needed to implement the WWW BLAST server.

Step 3: Format Local Databases

Format the local databases that you wish the server to use. This is accomplished in the usual manner using the program “formatdb”‚ included in the server package. The database files should be placed in the “db” directory‚ which is created when you untar the archive. To format a database for BLAST‚ use:

formatdb -i infile -o T

Note that databases to be used with PSI- or PHI-BLAST should always be created using the “-o T” flag.

Step 4: Test the Installation

The server package comes with two BLAST databases called “test_aa_db”—a sample protein database‚ and “test_na_db”—a sample nucleotide database. These databases are configured to be used immediately. Perform a test search on these database using the “blast.html” Web page.

Step 5: Configure Local Databases

To add your own databases to the list used by the server‚ you must edit two configuration files called “blast.rc” and “psiblast.rc”. These files specify the combinations of database names and BLAST program that are considered valid. Below is an excerpt from the file “blast.rc” as it appears “out of the box.”

# Here is list of program/database‚
# that allowed by BLAST service.
# Format:<program> <db> <db> ...


blastn test_na_db
blastp test_aa_db
blastx test_aa_db
tblastn test_na_db
tblastx test_na_db

The line “blastn test_na_db‚” for example‚ specifies that the database named “test_na_db” is valid when used with the blastn program. To add another nucleotide database to the list searchable by blastn‚ simply add its name to this line so that it now reads:

blastn test_na_db new_database

The new database name must also be added to the html search forms in order to appear in the pull-down database menu boxes‚ so the blast.html file also needs to be edited. The relevant lines for blast.html are:

<select name = “DATALIB”>
<option VALUE = “test_na_db”>
<option VALUE = “test_aa_db”>
<option VALUE=
“test_aa_db pdb”>
test_aa_db & pdb
<option VALUE = “pdbaa”> PDB

In this case‚ the first two “option” lines specify the two test databases. The third “option” line specifies that a database labeled “test_aa_db & pdb” can be selected from the pull-down list box. If a user selects this database‚ BLAST will search two databases‚ “test_aa_db” and “pdb‚” as though they were a single database. The fourth “option” line indicates that a database called “pdbaa” will be labeled in the pull-down list box as “PDB.” Other html search forms‚ such as the form for MegaBLAST‚ will also require the same type of alteration when a new database is added.

Step 6: Celebrate

Run your first flawless test of the BLAST server!

The BLAST Lab feature is intended to provide detailed technical information on some of the more specialized uses of the BLAST family of programs. Topics are selected from the range of questions received by the BLAST Help Group.


NCBI News | Fall/Winter 2000Fall/Winter 2000