.ncbirc
file used for BLAST.First, as long as the database has been pre-formatted for BLAST, the
.ncbirc
file is not strictly necessary. For example, having pre-processed a FASTA-formatted database file, I can run blastall
specifying full paths to the executable, input file, and database:The .ncbirc file is supposed to make things easier. According to the docs (or see the documentation that comes with the downloaded executable in
blast-2.2.22/doc/blast.html
):To ensure the smooth execution of blast programs, we should set up a BLAST configuration file named .ncbirc to provide the path information for the data and db directories. If we place the blast-#.#.# directory under the home directory of j_smith, we can specify the path to data and db directories using lines below.
[NCBI]
DATA=/home/j_smith/data
[BLAST]
BLASTDB=/home/j_smith/db
This had me confused for quite a while. In the first place, they do not mean that I should literally do
DATA=/home/te...
Rather, the path should be something like DATA=/Users/te...
under OS X. Second, they do not mean that the db
or data
directory should be directly under my home directory (or even directly in the blast-#.#.#
directory). Third, the path should be the path to the directory containing the database, but should not include the name of the database file itself. Using
.ncbirc
does not relieve you of the need to specify a database file (except in the case where you want the default which is the nr database).I put the following into
.ncbirc
in my home directoryThen I did:
This works! However, this shorthand for the home directory does not work:
And all of this can be done without a .ncbirc file by manipulating environment variables. For example:
And this works: