Hands-on Exercise 1: Blast installation

Content

  1. Blast Installation on General Linux Environment
  2. Notes for MAC OS users

1. Blast Installation on General Linux Environment

First, the standalone Blast program must be correctly installed:

  1. Please download the Blast (v2.2.23) Program and optimized database (64bits only), and then unzip it.
  2. To execute the standalone Blast program, go into the blast main directory and try to run it with this command:
  3. bin/blastx -query query_file -db dataBase_DIR/dataBase_NAME -outfmt 6 -seg no -out output_FileName
    Parameter Description
    query_file The full path of the query file, e.g. ~/blast/input/celllines_1.fa
    dataBase_DIR The name of the directory relative to Blast Database, e.g. ~/blast/db/
    dataBase_NAME The name of formatted Blast Database, e.g. nr
    output_FileName The name of the output file, e.g. out.txt
    cd ~
    mkdir blast
    wget http://salsahpc.indiana.edu/tutorial/apps/BlastProgramAndDB.tar.gz
    tar -zxvf BlastProgramAndDB.tar.gz -C blast
    cd blast
    bin/blastx -query ~/blast/input/celllines_1.fa -db ~/blast/db/nr -outfmt 6 -seg no -out out.txt

2. Notes for MAC OS users

Blast installation in MAC OS has few differences from general Linux environment, please follow the instruction below to install Blast correctly:

A. Install BLAST package

  1. Download a BLAST+ installer for Mac provided by NCBI and install it. BLAST+ executables (including blastx which is used in our tutorials) and a user manual will be installed under /usr/local/ncbi/blast. This is the directory should be set as $BLAST_HOME environment variable.
  2. To setup $BLAST_HOME, add the following in.bashrc (re-login is required).
    export BLAST_HOME=/usr/local/ncbi/blast

B. Install BLAST DB

Our tutorials need NR db installed, which the installation above doesn't provide by default. Installation of NR db requires the following additional steps.

  1. Create a directory (e.g., $HOME/blastdb) for saving blast dbs and use update_blastdb.pl command.
    mkdir $HOME/blastdb
    cd $HOME/blastdb
    $BLAST_HOME/bin/update_blastdb.pl nr
    Then, it will download a few files directly from a NCBI's repository.
  2. We need to set a $BLASTDB environment variable to specify the directoy where NR db is stored. Add the following line in .bashrc (re-login is required).
    export BLASTDB=$HOME/blastdb

Next: Exercise 2: Setting up an Apache Hadoop Cluster for Hadoop-Blast