Center for Plant Molecular Biology

Stand-alone Blast Search

Nils Muthreich; February 5th 2009

Manual for using the stand-alone Blast Search on the server of Lab Hochholdinger:

  1. Stand-Alone-Blast
  2. DOS command prompt
  3. Database preparation
    1. Nucleotide
    2. Protein
  4. Blast search

1. Stand-Alone-Blast

The Stand-Alone-Blast program is a command-line program that runs under any version of Windows or DOS. The most important files are:

This program is very useful to perform blast searches against a “private” database, which is not available on the public blast servers of NCBI or PlantGDB. It can also be used to check if a gene or protein of interest was differentially expressed or accumulated in a previous experiment. In that case a database with differential genes/proteins is generated and the gene/protein of interest is blasted against this database.

Important hint: In the DOS-command-line go to the specific subfolder containing your program of interest and type the name of your program followed by a blank and a question mark to get a list of all possible options, like:

formatdb ?

or

blastall ?

2. DOS command prompt

Since formatdb.exe and blastall.exe can only be used in a DOS-like environment (like DOS-command-line in Windows), it is essential to know some important commands.

First of all, to start the DOS-command-line in Windows, go to Startà run and type “cmd” to open the command-line. A window running the cmd.exe will open. This window looks like an old MS-DOS screen with white characters on black background. By default you will be located in C:\Documents and Settings\your_username.

The most important DOS commands are:

This command can be used to show a specific file-type only like:

dir .exeto show *.exe-files only

dir .txt to show *.txt-files only

This is possible for all file types located in that folder

cd (change directory) will allow you to go to a subfolder (lower folder) or a higher folder

cd desktop will change to the subfolder named “desktop”

cd.. will change to the higher folder (“C:\Documents and Settings” in this case)

cd\ will change to root-directory of the drive (“C:\”)

To start a program in DOS it is sufficient to type the name of the program located in that folder without adding the filetype-extension, like:

“formatdb” to run the formatdb.exe or “blastall” to run the blastall.exe.

Important: There are different file-types in DOS that can be executed directly by typing the name of the file. These file types are *.exe (Executable), *.com (Command) and *.bat (Batch). In the very unlikely case that different file-types with the same name are located in a directory (e.g. abc.exe, abc.com and abc.bat) it is necessary to type the full name including the file-type (e.g. “abc.exe”) to run the specific program otherwise DOS will pick the program located on top (probably the abc.bat).

To get a full list of DOS commands, type “help”.

3. Database preparation

For database preparation the program formatdb.exe and a fasta-file containing all sequences including the accession numbers for your database is necessary and sufficient. Both files have to be located in X:\Lab_Hochholdinger\SA-Blast\databases\. Make sure that both files are present.

Run the Create_Database.lnk in the database-folder (X:\Lab_Hochholdinger\SA-Blast\databases). A window running cmd.exe will open. The bottom line of that window should look like "X:\Lab_Hochholdinger\SA_Blast\Databases>"

a.: For nucleotide databases:

"X:\Lab_Hochholdinger\SA_Blast\databases". xy should be the name of the final database.

"formatdb -i xy.txt -p F -o T -n xy" [enter]

This will create up to seven database-files named "xy.*". The name of your database will be "xy".

The used parameters are:

-i tells the program the name of the input-file. Should be *.txt or *.fasta

-p specifies the kind of database (F=nucleotide)

-o specifies parse options (don’t ask); (T=create index True)

-n specifies the name of the database that will be created

b.: For protein databases:

"X:\Lab_Hochholdinger\SA_Blast\databases". xy should be the name of the final database.

"formatdb -i xy.txt -p T -o T -n xy" [enter]

If you get a message that the database is too big, try the following:

"formatdb -i xy.txt -p T -o T -v 20000 -n xy" [enter]

This will create up to seven database-files named "xy.*". The name of your database will be "xy".

The used parameters are:

-i tells the program the name of the input-file. Should be *.txt or *.fasta

-p specifies the kind of database (T=protein)

-o specifies parse options (don’t ask); (T=create index True)

-n specifies the name of the database that will be created

-v volume size. Necessary for large databases. Number can be increased.

4. Blast Search

Before you start the blast search you need to know which database to use. Have a look in databases.xls in the databases subfolder to check whether your database has already been created by someone else. If not, you have to create to create your own new database. To do so, have a look in part 3. Database preparation within this document. If the database I already present:

Hint 1: You can choose whatever name you like for query-file like “This_is_my_nice_and _shiny_query_file_that_I_would_like_to_blast.txt” OK, do so. But keep in mind that you have to enter the FULL NAME of that file in the DOS-command-line when performing the search. Shorter is better.

Hint 2: Get a list of all options used with the blastall.exe by typing “blastall ?”

Performing the blast search:

“blastall -p blastn -d xy -i abc_in.txt -o abc_out.txt” [enter]

IMPORTANT: Replace xy by the name of your database! abc_in.txt is your query-file! abc_out.txt will be the Blast-Output-file created by the search! Replace blastn by blastp if you would like to perform a protein search.

“blastall -p blastn -e 0.0000000001 -d xy -i abc_in.txt -o abc_out.txt” [enter]

This will exclude all hits with an e-value higher than e-10!

“blastall -p blastn -m 4 -d xy -i abc_in.txt -o abc_out.txt” [enter]

This will make the output-file more "user-friendly" :-)

The used parameters are:

-p specifies the program (blastn, blastp, etc.)

-d Database name. Will use the files database_name.* for search

-i tells the program the name of the input-file. Should be *.txt

-e Expectation value (“cut-off value”)

-o name of the output-file. Can be *.txt or *.xml. (à -m !!!)

-m alignment view options. Adds different alignment views to the output-file. When “-m 7” is chosen the output-file must be *.xml. Otherwise the ouput-file must be *.txt. The *.xml-output might be very useful if you want to continue with the sequences in the output. *.xml-spreadsheets can easily be imported to Microsoft Excel.

See “blastall ?” for further information regarding alignment view options.

Example for command-line when *.xml output-file is preferred:

“blastall -p blastn -m 7 -d xy -i abc_in.txt -o abc_out.xml” [enter]

"X:\Lab_Hochholdinger\SA_Blast\bin>"! Otherwise the bin-folder will get messed up soon! Make sure that you saved your database in the databases-folder previously.



Infos and Downloads

Blast-Downloads NCBI:

http://www.ncbi.nlm.nih.gov/BLAST/download.shtml

ZMBP Download Version 2.2.18



Have fun using the blast tool.

Nils

x

[Letzte Änderung: 05.02.2009]