NCBI Bookshelf. A service of the National Library of Medicine, National Institutes of Health.

BLAST® Help [Internet]. Bethesda (MD): National Center for Biotechnology Information (US); 2008-.

Cover of BLAST® Help

BLAST® Help [Internet].

Show details

Standalone BLAST Setup for Windows PC

, Ph.D.
Corresponding author.

Created: ; Last Update: September 23, 2016.

Introduction

In addition to providing BLAST sequence alignment services on the web, NCBI also makes these sequence alignment utilities available for download through FTP. This allows BLAST searches to be performed on local platforms against databases downloaded from NCBI or created locally. These utilities run through DOS-like command windows and accept input through text-based command line switches. There is no graphic user interface.

The following tutorial discusses the steps needed to install BLAST+ and a sample NCBI database on PCs running Windows 7 Operating Systems.

Downloading

The BLAST+ software package is available as self-extracting archives: ncbi-blast-#.#.#+-win64.exe, is for PCs running 64-bit Windows operating systems. In both cases, "#.#.#" denotes the current version number of the package. Archives with the same base name are equivalent.

Please note that the archive with the ".tar.gz" file extension does not have the installer function. The discussion below focuses on archives with an ".exe" extension.

Steps

Steps to download the package are described below.

  • Point a browser to this FTP directory:
    ftp://ftp.ncbi.nlm.nih.gov/blast/executables/LATEST/
  • Right click on a desired archive and select "Save link as…" from the popup menu
  • In the prompt, switch to a desired directory (folder) and click the "Save" button to save the archive to the selected location on the local disk

Examples

These steps for the "ncbi-blast-2.2.29+-win64.exe" archive are given in Figure 1a and 1b, where the first two steps are demonstrated by 1a and the last step is demonstrated by 1b.

Figure 1a. . Download a blast+ package from NCBI through a web browser: Log on to ftp://ftp.

Figure 1a.

Download a blast+ package from NCBI through a web browser: Log on to ftp://ftp.ncbi.nlm.nih.gov/blast/executables/LATEST/ and select "Save link as ..." after right-clicking on "ncbi-blast-2.2.29+-win64.exe".

Figure 1b. . Download a blast+ package from NCBI through a web browser: Change the location in the subsequent prompt to your own directory under "C:" before saving the archive to a desired location.

Figure 1b.

Download a blast+ package from NCBI through a web browser: Change the location in the subsequent prompt to your own directory under "C:" before saving the archive to a desired location.

Installation

The BLAST+ archive downloaded above contains a built-in installer. Accepting the license agreement after double-clicking, the installer will prompt for an installation directory. In this test case "C:\users\tao\desktop\blast-2.2.29+" will be set as the installation directory. Clicking the "Install" button, the installer will create this directory with a "doc" subdirectory containing a link to the BLAST+ user manual, an "uninstaller" for future removal of the installation, and a "bin" subdirectory where the BLAST programs and accessory utilities are kept. Table 1 sums up programs and utilities contained in the BLAST+ package.

Table 1

Programs and utilities contained in the blast+ package

ProgramFunction
blastdbcheckChecks the integrity of a BLAST database
blastdbcmdRetrieves sequences or other information from a BLAST database
blastdb_aliastoolCreates database alias (to tie volumes together for example)
blastnSearches a nucleotide query against a nucleotide database
blastpSearches a protein query against a protein database
blastxSearches a nucleotide query, dynamically translated in all six frames, against a protein database
blast_formatterFormats a blast result using its assigned request ID (RID) or its saved archive
convert2blastmaskConverts lowercase masking into makeblastdb readable data
deltablastSearches a protein query against a protein database, using a more sensitive algorithm
dustmaskerMasks the low complexity regions in the input nucleotide sequences
legacy_blast.plConverts a legacy blast search command line into blast+ counterpart and execute it
makeblastdbFormats input FASTA file(s) into a BLAST database
makembindexIndexes an existing nucleotide database for use with megablast
makeprofiledbCreates a conserved domain database from a list of input position specific scoring matrix (scoremats) generated by psiblast
psiblastFinds members of a protein family, identifies proteins distantly related to the query, or builds position specific scoring matrix for the query
rpsblastSearches a protein against a conserved domain database to identify functional domains present in the query
rpstblastnSearches a nucleotide query, by dynamically translated it in all six-frames first, against a conserved domain database
segmaskerMasks the low complexity regions in input protein sequences
tblastnSearches a protein query against a nucleotide database dynamically translated in all six frames
tblastxSearches a nucleotide query, dynamically translated in all six frames, against a nucleotide database similarly translated
update_blastdb.plDownloads preformatted blast databases from NCBI
windowmaskerMasks repeats found in input nucleotide sequences

Test BLAST database

In addition to BLAST programs and accessory utilities, target database are also a key component of a standalone BLAST setup. The common set of pre-formatted NCBI BLAST databases is available as compressed archives from NCBI FTP site. Databases can also be prepared de novo from custom FASTA sequences locally using the makeblastdb utility. To manage available BLAST databases, create a directory to store them. In this test case it will be "C:\users\tao\desktop\blastdb".

Similar procedures in Figure 1 can be used to download the BLAST databases. Steps for downloading pre-formatted BLAST databases from NCBI are:

  • Right-click on a desired file (refseq_rna.00.tar.gz in this example case)
  • Select "Save link as …" from the popup menu
  • When prompted, use the "Save in" to change the directory to "C:\users\tao\desktop\blastdb"

This downloaded database is blast-ready, after inflation and extraction with a decompression utility, such as WinZip or 7zip. Note that these steps described above download and install only the first volume of the refseq_rna database. For the complete set, download all the refseq_rna.##.tar.gz files. The database alias file (refseq_rna.nal) in the first volume will tie all volumes back into the complete database. Figure 2 below shows an example inflation/extraction procedure using WinZip.

Figure 2. . Extract the downloaded refseq_rna.

Figure 2.

Extract the downloaded refseq_rna.00.tar.gz archive using WinZip: Right click on the database archive, then select “WinZip” and “Extract to here …”

A utility included in the BLAST+ package, update_blastdb.pl, can be used to streamline the downloading of preformatted BLAST databases from NCBI. It requires the installation of the Perl package and execution from the command prompt under the "C:\users\tao\desktop\blastdb\" directory. The base command is:

perl update_blastdb.pl --passive base_database_name

where "base_database_name" is the name of the target database, without the "##.tar.gz" extension.

Configuration

To facilitate the execution of BLAST+, the PC must be configured to recognize BLAST programs installed under the "C:\users\tao\desktop\blast-2.2.29+\bin\" directory. To do this, a user environment variable named Path needs to be created with "C:\users\tao\desktop\blast-2.2.29+\bin\" as its value. The value of BLASTDB environment variable need to be set to point to the "C:\users\tao\desktop\blastdb\" directory where the refseq_rna.00 database files are kept.

Environment Variables

Steps to create or modify environment variables are summarized below:

  • Click “Start” button then the "Control Panel" link to open the Control Panel
  • Click the "System" icon to open the system prompt
  • Click the "Advanced system settings" link in the left column to open the “System properties” prompt
  • Click the "Environment Variables" button to see the available list
  • Click the "New" button under the "User variable for ..." panel
  • Type the environment variable name and enter the absolute path
  • Click "OK" to close the prompts

Example Screen Shots

Screen shots of these steps are shown in Figures 3a, 3b, and 3c.

Figure 3a. . Configure standalone blast+ using Windows' environment variables: In the initial System popup, click the “Advanced system settings” link to open the “System Properties” popup.

Figure 3a.

Configure standalone blast+ using Windows' environment variables: In the initial System popup, click the “Advanced system settings” link to open the “System Properties” popup. Click the “Environment Variables …” (more...)

Figure 3b. . Configure standalone BLAST using Windows' environment variables: Clicking "Environment Variables …" button on 3a opens this popup, which provides access to existing environment variables and allows the creation of new ones, using the “Edit” and "New" buttons, respectively.

Figure 3b.

Configure standalone BLAST using Windows' environment variables: Clicking "Environment Variables …" button on 3a opens this popup, which provides access to existing environment variables and allows the creation of new ones, using the “Edit” (more...)

Figure 3c. . Configure standalone BLAST using Windows' environment variables: Clicking the "New" button in Figure 3c brings out this popup, where the new variable's name and path can be specified.

Figure 3c.

Configure standalone BLAST using Windows' environment variables: Clicking the "New" button in Figure 3c brings out this popup, where the new variable's name and path can be specified. In this example, a user variable called “path” is being (more...)

Execution and validation

Standalone BLAST+ programs do NOT have a graphical user interface (GUI) and must be executed from a command prompt window (CMD). This window can be opened by clicking on "Start ⇨ All Programs ⇨ Accessories ⇨ Command Prompt" or by clicking "Start ⇨ Run …," followed by typing "cmd" (minus quotes) in the input box and pressing enter. These processes are shown in Figures 4a and 4b.

Figure 4a. . Open a command prompt in Windows 7: Click the "Start" button followed by “All Programs” link to see list of available programs.

Figure 4a.

Open a command prompt in Windows 7: Click the "Start" button followed by “All Programs” link to see list of available programs. Open the Accessories fold by clicking to see the Command Prompt (highlighted). Click it to launch.

Figure 4b. . Open a command prompt in Windows 7: Alternatively, click “Start” button, then the "Run …" link in the right-hand column.

Figure 4b.

Open a command prompt in Windows 7: Alternatively, click “Start” button, then the "Run …" link in the right-hand column. In the popup, type “cmd” in the input box to open the Command Prompt.

Example Execution

In the command prompt, the working directory can be changed to "C:\users\tao\desktop\blast-2.2.29+" by typing "cd \" followed by "cd users\tao\desktop\blast-2.2.29+". If the initial prompt is a drive other than "C:\", type "C:" instead of "cd \" to change set the drive to “C:” first. Figure 5 contains example commands and their console output from a work session that tests a blast-2.2.29+ installation.

Figure 5. . The output of a work session testing the blast+ installation: The input commands are in red boxes.

Figure 5.

The output of a work session testing the blast+ installation: The input commands are in red boxes. Output files produced by blastdbcmd and blastn command executions are marked by red arrows. The last command is for checking BLASTDB environmental variable (more...)

Explanation of the test commands

The first command changes the working directory from initial “C:\” drive to the blast-2.2.29+ directory. The "dir" lists the files and subdirectories under this directory. The error-free console outputs from "blastn -version" and "blastdbcmd -db refseq_rna.00 -info" command lines validate the installation.

A realistic test of this installation should be actual searches, which requires an input query. The next blastdbcmd command line dumps out a sequence from the installed database for use as such a query.

blastdbcmd –db refseq_rna.00 –entry nm_000122 –outfmt "%f" –out test_query.txt

The exact meaning of the command line is (from left to right) to:

a.

execute blastdbcmd

b.

use refseq_rna.00 as the target database

c.

get the database sequence with nm_000122 as its accession

d.

dump the sequence in FASTA format, and

e.

send the output to a file named test_query.txt

The sequence in this file is used subsequently as the query in a test blastn search in the following command line:

blastn –query text_query.txt –db refseq_rna.00 –out output.txt

This command instructs the system to:

  • execute blastn program to search a nucleotide query against a nucleotide database
  • use the sequence(s) in test_query.txt as the query
  • search against the database refseq_rna.00 database, and
  • save the result in a file named output.txt

Parameters not specified explicitly will assume default values. To further customize the search, other search parameters with customized input values should be added. Typing "program -help" followed by enter key stroke will print out the complete list of program parameters and their accepted options to the console for quick reference. Further details are in the included user manual. The final "dir" examines the directory content again to show that new output files are indeed generated as marked by red arrows.

The last command ‘set | find “BLASTDB”’ demonstrates a way to examine the environmental variables setting in the command prompt. It calls “set” to get all the environment variables, and passes it to “find” to search for BLASTDB. A returned value marked by the last set of arrows indicates that this variable is set.

Technical Assistance

Questions, feedback, and technical assistance requests should be sent to blast-help at:

vog.hin.mln.ibcn@pleh-tsalb

Questions on other NCBI resources should be addressed to NCBI Service Desk at:

vog.hin.mln.ibcn@ofni
Copyright Notice

BLAST is a Registered Trademark of the National Library of Medicine

Bookshelf ID: NBK52637

Views

Other titles in this collection

Contact us

Recent Activity

Your browsing activity is empty.

Activity recording is turned off.

Turn recording back on

See more...