This page was prepared for the people who want to
use NCBI Blast+ on local machines, because we found most of the
NCBI Blast+ information available on the Internet is out-dated
or inaccurate.
Procedure below is confirmed to
work fine on Mac OS X 10.5 Leopard, and 10.6 Snow
Leopard with Intel processors. It is assumed that Firefox
web browser is installed on your Mac and set as a default
browser. If you do not have Firefox, you can download it from
here
for free. This instruction does not
cover all blast derivatives, such as blastx, mega blast or
psiblast. If you want to use these blast programs, please
refer to
http://www.ncbi.nlm.nih.gov/books/NBK1763/. We hope
information there is correct.
NCBI Blast+ 2.2.25 works on Mac OS X
10.6 Snow Leopard and Mac OS X 10.5 Leopard. However, it displays "dyld: unknown required
load command 0x8000001C
Trace/BPT trap" error message
and won't start on Mac OS X 10.4 Tiger. NCBI Blast+ 2.2.24 built
by us works on all of Mac OS X 10.6 Snow Leopard, 10.5
Leopard and 10.4 Tiger without any problem, though.
We have not yet prepared 64 bit NCBI Blast+
2.2.25 for download. If you need it, please post your request
below or try
BlastStation-Local64
which has built-in 64 bit NCBI Blast+ 2.2.25.
Blast+ searches can be performed on the NCBI
Blast servers with NCBI Blast+ executables using -remote option.
However, blast searches with this option is not so fast.
Please visit here for
details.
If you don't understand any part of the
instruction below, we
recommend you to try
BlastStation-Local or
BlastStation-Local64
to save time.
You can start Blast search in less than five minutes with the intuitive manner of operation, amazing easy-to-use interface,
and useful extra functions including summary table exporting in
CSV format and hit sequence exporting in FASTA format.
2.1. Make .ncbirc text file
in home folder. One example is shown
below. Your account is assumed to be MyAccount.
; Start the section
for BLAST configuration
[BLAST]
; Specifies the path where BLAST
databases are installed
BLASTDB=/Users/MyAccount/blast/db
; Specifies the data sources to use for
automatic resolution
; for sequence identifiers
DATA_LOADERS=none ; Specifies the
BLAST database to use resolve protein
sequences
;BLASTDB_PROT_DATA_LOADER=nr
; Specifies the BLAST database to use
resolve protein sequences
;BLASTDB_NUCL_DATA_LOADER=nt
; Windowmasker settings (experimental)
[WINDOW_MASKER]
WINDOW_MASKER_PATH=/Users/MyAccount/blast/db/windowmasker
; end of file
2.2. Create BLAST database
directory.
2.2.1. Open
Applications/Utilities/Terminal. 2.2.2. Type "mkdir
-p
~/blast/db"
and type return.
2.3 Set path. Mac
OS X 10.4 Tiger only. Installer will install
/etc/paths.d/ncbi_blast to set path on Mac OS X
10.5 and 10.6.
2.3.1. Open
Applications/Utilities/Terminal.
2.3.2. Type echo "PATH=\$PATH:/usr/local/ncbi/blast/bin"
>> ~/.bash_profile
and type return. 2.3.3 Type source ~/.bash_profile and type
return.
3. Download database
3.1. Click the link
to visit NCBI ftp server.
ftp://ftp.ncbi.nih.gov/blast/db/
3.2. Click the database file you
want to download, such as nt.00.tar.gz.
3.3. Save the file in
~/blast/db 3.4. Open
Applications/Utilities/Terminal. 3.5.
Type "cd
~/blast/db"
and type return. 3.6. Type "tar xfz
nt.00.tar.gz" and type return.
nt.00.tar.gz should be the file name you
downloaded. Downloaded file will
be extracted in ~/blast/db.
4. Create database
4.1. Download or
create FASTA file. File name is
assumed to be testdb.fasta. 4.2. Copy
testdb.fasta
to ~/blast/db. 4.3. Open
Applications/Utilities/Terminal. 4.4. Type "cd
~/blast/db"
and type return. 4.5. Type "makeblastdb
-in
testdb.fasta -out testdb -dbtype nucl"
for DNA or "makeblastdb
-in
testdb.fasta -out testdb -dbtype prot"
for Protein and type
return to get the database named testdb.
4.6. Type "makeblastdb -help" for
advanced options. Sample output is
shown below.
DESCRIPTION
Application to create BLAST databases,
version 2.2.25+
OPTIONAL ARGUMENTS
-h
Print USAGE and DESCRIPTION; ignore
other arguments
-help
Print USAGE, DESCRIPTION and ARGUMENTS
description; ignore other arguments
-version
Print version number; ignore other
arguments
*** Input options
-in <File_In>
Input file/database name; the data type
is automatically detected, it may
be any of the following:
FASTA file(s) and/or
BLAST database(s)
Default = `-'
-dbtype <String, `nucl', `prot'>
Molecule type of input
Default = `prot'
*** Configuration options
-title <String>
Title for BLAST database
Default = input file name provided to
-in argument
-parse_seqids
Parse Seq-ids in FASTA input
-input_type <String, `asn1_bin',
`asn1_txt', `blastdb', `fasta', `xml'>
Type of the data specified in input_file
(if not specified it will be
guessed)
-hash_index
Create index of sequence hash values.
*** Sequence masking options
-mask_data <String>
Comma-separated list of input files
containing masking data as produced by
NCBI masking applications (e.g.
dustmasker, segmasker, windowmasker)
-gi_mask
Create GI indexed masking data.
* Requires: parse_seqids
-gi_mask_name <String>
Comma-separated list of masking data
output files.
* Requires: mask_data, gi_mask
*** Output options
-out <String>
Name of BLAST database to be created
Default = input file name provided to
-in argumentRequired if multiple
file(s)/database(s) are provided as
input
-max_file_sz <String>
Maximum file size for BLAST database
files
Default = `1GB'
*** Taxonomy options
-taxid <Integer, >=0>
Taxonomy ID to assign to all sequences
* Incompatible with: taxid_map
-taxid_map <File_In>
Text file mapping sequence IDs to
taxonomy IDs.
Format:<SequenceId> <TaxonomyId><newline>
* Incompatible with: taxid
-logfile <File_Out>
File to which the program log should be
redirected
4.7. makeblastdb 2.2.24 never
finishes with -parse-seqids option.
This bug is
fixed in makeblastdb 2.2.25. However, when we tried to
format ftp://ftp.ncbi.nih.gov/blast/db/FASTA/nr
on Mac OS X 10.5.8 with 1GB memory with -parse_seqids
option, makeblastdb failed with malloc
error. This
error did not happen with smaller FASTA file
such as sts or Mac OS X 10.5.8 with 2GB
memory. We recommend to use Mac with at least 2GB memory
when trying to format large FASTA file with
-parse_seqids option or use formatdb in NCBI
Blast package.
5. Launch NCBI-Blast+ commands.
5.0. Create dna or
protein query FASTA file. It can contain multi FASTA
data. File name is assumed
to be test_dna.fasta and
test_protein.fasta here. nt.00 is
a dna database file and nr.00 is a
protein database file available at ftp://ftp.ncbi.nih.gov/blast/db/.
These database files are assumed to be
downloaded already.
5.1. blastn
5.1.1. Open
Applications/Utilities/Terminal.
5.1.2. Type "blastn -query test_dna.fasta
-db nt.00 -out test.html -html" and type return. 5.1.3.
Type "blastn -help" for advanced
options.
5.2. blastp
5.2.1. Open
Applications/Utilities/Terminal.
5.2.2. Type "blastp -query test_protein.fasta
-db nr.00 -out test.html -html" and type return. 5.2.3.
Type "blastp -help" for advanced
options.
5.3. How to use
multi cores for Blast search
5.3.1. Add "-num_threads
2" to use 2 cores.
5.4. How to
perform Blast+ search on the NCBI Blast servers.