View Single Post
Old 10-26-2016, 06:51 AM   #5
Senior Member
Location: USA, Midwest

Join Date: May 2008
Posts: 1,178

You originally created your BLASTDB files in a subdirectory of your current working directory.

makeblastdb -in test2.fasta -out MV1SDB_a/MV1SDB_a -parse_seqids -dbtype nucl
I will assume that when you run the your BLAST command you are still in that same directory. Your first attempt just provided a directory name to BLAST.

blastn -query HPV2-C2_E1.fasta -db MV1SDB_a/ -out testblastout.txt
BLAST can not work with a directory name, it needs the DB name. The second attempt, removing the trailing slash, is telling BLAST to look for a database named MV1SDB_a in your current working directory. BLAST is unable to find it because it is not in your current working directory, it's in the subdirectory. Try

blastn -query HPV2-C2_E1.fasta -db MV1SDB_a/MV1SDB_a -out testblastout.txt
This assumes that you are in the same directory you were in when you ran makeblastdb and your query fasta file is also present in that directory.

A better solution is to create and store all your BLAST DBs in a single, common directory and set the environment variable BLASTDB to point to that directory. That way you can run BLAST from any directory location on your computer without having to worry about explicitly stating the path to your database.
kmcarr is offline   Reply With Quote