How to set up a local Blast database

I presume that you have already downloaded and installed Blast (if not, then click here) and downloaded the FastA-formatted sequence file that will serve as the basis for the Blast database (if not, then do it).

Blasting the contigs against the genome of an organism proceeds in two stages. First, you need to let Blast analyze the genome sequence to create a database it can understand. Later you'll run Blast to compare each contig to that database.

Action
Explanation and notes
Get to a DOS window The Blast you downloaded is a DOS-based program. You can get to DOS in one of several ways: (a) You may find shortcut if you click on Start and then on Programs, or (b) Click on Start and then Run. Type in Command or Cmd
Get to directory where you put Blast files Type in something like CD \Blast
Type in the following:
makeblastdb -in file -out name -dbtype prot
-hash_index
    (for a database of proteins)
            OR
makeblastdb -in file -out name -dbtype nucl
-hash_index
    (for a database of DNA or RNA)
What it means:
  • makeblastdb invokes the Blast accessory program to create the database
  • -in tells the program that the path that follows leads to the input file.
  • -out tells the program that the characters that follow should be used as the name of the database (you can name it anything you want, so long as you use 8 or fewer legal characters).
  • -dbtype prot Tells the program "the file does consist of protein sequences".
    -dbtype nucl
    tells the program "the file consists of nucleotide sequences"
  • -hash_index tells the program "you should make an index of the identification numbers for the sequences" Frankly, I don't know what good the index does, but it's cheap.
WARNING #1: Upper/Lower case matters for the commands following -!

WARNING #2: Windows XP and NT users may experience trouble cutting and pasting the command line makeblastdb. Evidently the system does something strange to the hyphens. Type the command in instead.