You are on page 1of 8

Prepared by Asif M.

Khan

1. Download the BLAST+ client program for MacOSX from the URL below:
http://blast.ncbi.nlm.nih.gov/Blast.cgi?
CMD=Web&PAGE_TYPE=BlastDocs&DOC_TYPE=Download.

2. Double click on the downloaded file to install the program.


3. The file is installed in “/usr/local/ncbi/blast/bin” by default.
You may not be able to see this folder in your Finder because it is hidden. For
example, in the snapshot below, you don’t find the folder “usr”

To unhide these folders, run the terminal application (look for it in the
applications folder, subfolder utilities, or search for it using Spotlight) and type
the following code:

defaults write com.apple.finder AppleShowAllFiles TRUE


killall Finder

e.g
Prepared by Asif M. Khan

These commands will show you all of the hidden files and folders on your
operating system. If you want to reverse the command replace TRUE with
FALSE.

After the above two commands, the Finder now shows the hidden folders, in
particular the folder “usr” which we are interested in.

Now that we have located the usr folder, lets locate the “bin” folder in
“/usr/local/ncbi/blast/bin”
Prepared by Asif M. Khan

To run our blast search, we need to place our query file and the fasta file that needs to
be formatted into a blast searchable database. See the snapshot below

Now, we are ready to make the blast searchable database. Go back to the Terminal
application and navigate to the “bin” folder: “/usr/local/ncbi/blast/bin”. Note the
following when using the Terminal application, use
- “ls” to see the content of the present working directory.
- “pwd” to find out what is the present working directory.
- “cd” followed by the name of the folder to navigate to a folder
- “cd ..” to navigate back, out of a folder.
Prepared by Asif M. Khan

Below is an example of how I navigated to “/usr/local/ncbi/blast/bin” on my computer using


the Terminal

Now that you are in the “bin” folder and have your database file, you are now ready
Prepared by Asif M. Khan

to execute the command to make the searchable database.

If the process was successful, you will see few new files created, with the name
“nfkb_all” but with different extensions. In my case, unfortunately, the new files were
not created. I am not sure why this is happening, but this can happen on Windows too.
A solution that works for this, both on Windows and MacOSX, is to place a copy of
the “bin” folder to the Desktop and repeat the “makeblastdb” command.

The snapshot below shows the re-run of the “makeblastdb” command on the “bin”
folder at the Desktop.
Prepared by Asif M. Khan
Prepared by Asif M. Khan

This time our “makeblastdb” command was successful as we can see that three new
files have been created:
i) nfkb.psq
ii) nfkb.pin
iii) nfkb.phr
Prepared by Asif M. Khan

You are now ready to perform blastp (or any other flavour search). Example:
blastp -db nfkb -query query.fas -evalue 1e-5 -out output.txt

If it does not work and prompts you an error, study the error and try to fix it. Usually,
the error could be because you copied the command from a Word document and
pasted into the Terminal. Though this is usually fine, it does not work well when
special characters are involved, such as “-“. To fix this, avoid copying and pasting
commands directly to the Terminal when special characters are involved, or manually
fix the special character signs by rewriting them directly in the Terminal.

Remember, once all this is done, you can hide back your hidden folders (like the “usr”
folder) using the following command:

You might also like