hi RamRS - I actually think I should have been using blastp as swissprot as a protein database...yes it works fine with blastp
Hi - I am trying to run blastn, and then also SIFT standalone. I am having database configuration issues however as I am getting the following:
arron@arron-Ideapad-Z570 ~/Phd/programs/sift4.0.3b $ blastn -query test/lacI.fasta -db db/swissprot/
BLAST Database error: No alias or index file found for nucleotide database [db/swissprot/] in search path [/home/arron/Phd/programs/sift4.0.3b:::]
After some advice from other threads, I downloaded a protein database, for example swissprot:
wget ftp://ftp.ebi.ac.uk/pub/databases/fastafiles/uniprot/uniprotkb_swissprot.gz
zcat uniprotkb_swissprot.gz | awk '{if (/^>/) { print ">" $2} else { print $_}}' > swissprot.fa
and then used makeblastdb to create a blast database:
arron@arron-Ideapad-Z570 ~/Phd/programs/sift4.0.3b/db/swissprot $ makeblastdb -in swissprot.fa -dbtype prot
Building a new DB, current time: 10/27/2014 13:18:57
New DB name: swissprot.fa
New DB title: swissprot.fa
Sequence type: Protein
Keep Linkouts: T
Keep MBits: T
Maximum file size: 1073741824B
Adding sequences from FASTA; added 546439 sequences in 19.0039 seconds.
yet I am still getting the same problem. What am I doing wrong?
3 answers
Once you create the database using makeblastdb, your database name is swissprot.fa
Your command should be:
blastn -query test/lacI.fasta -db <path_to_db>/swissprot.fa
I'd recommend using a custom name with makeblastdb that you can then supply to the -db parameter - that should avoid confusion with existing file-names.
It would seem I have run out of coffee once again - should've seen that bit from a mile away. Or probably because it's Monday.
Anyway, glad you found the solution :-)
I had the same BLAST Database error, which I was able to fix by changing to the directory containing the database files (cd ~/blast/blastdb_custom) and then running the blastn command from within that directory. I suspect that specifying the BLASTDB location in a configuration file as described here would also work, but I haven't tried this yet.
Looking into this a little more deeply, I discovered that it wants you to name the database WITHIN the directory, rather than naming the directory that contains it. So if I have
Seq1.fasta
16S_ribosomal_RNA/16S_ribosomal_RNA.ndb etc
under my working directory, I want to call blast as:
blastn -query "Seq1.fasta" -db "./16S_ribosomal_RNA/16S_ribosomal_RNA" ...
This works.
Use proper code: makeblastdb -in db.fasta -dbtype prot -out DB
then blastp -query test.fasta -db DB -out test.blastp.out
Log in to answer this question.
I'm experiencing a similar issue.
Using a set of genomes/transcriptomes, I invoked makeblastdb as follows:
This is what is reported on screen:
Next, I tried to blastn this db with the .fasta file I used to generate it (all vs. all blast):
You'll see I used the db name exactly. This resulted in the same error message that started this thread. Interestingly, makeblastdb created a number of files, for which I have no idea what they are for: .nhr, .nin, .nog, .nsd, .nsi, and .nsq.
I am not sure why people always choose the same name as their fasta file as the basename for the database.
Are all the ".n" files in the same directory? Could you try to create a new db in a different directory with a different name and see if that helps.
Figure out the problem. For some reason, blastn doesn't like spaces in paths to a file, even if the appropriate symbol to indicate a space in a directory name is used.
Hello! I'm trying to parse the database UNITE to BLAST and I am getting this same error, but actually, not all .n files are generating (just the .nhr, .nin, .nsq).
This is the command I am using:
Is there something missing?
Please open a new question and reference this post in there. Do not add answers unless you're answering the top-level question.
I had this error but fixed it by first "cd"-ing (changing directory) to the actual database-containing directory and then running the blastdbcmd command.