SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
BLAST Database error: No alias or index file found for nucleotide database [nt] chris_s Bioinformatics 14 03-24-2019 07:11 AM
BLAST Database error: No alias or index file found for protein database gt259 Bioinformatics 2 05-24-2015 11:31 PM
BLAST+ and blasting against the NCBI database kevluv93 Bioinformatics 4 04-25-2015 01:25 AM
How to create a BLAST database aliealexandre Bioinformatics 22 02-02-2015 03:34 AM
Create local BLAST database SeqClark Bioinformatics 2 03-07-2011 01:17 AM

Reply
 
Thread Tools
Old 10-19-2016, 06:30 AM   #1
rvgill
Junior Member
 
Location: Allentown

Join Date: Oct 2016
Posts: 6
Exclamation NCBI-Blast Database Error. I NEED to create .nal file

Hello,

So I am making my own databases from fasta files using Blast version ncbi-blast-2.5.0+.dmg and getting an error that is linking back to by database creation by not having a .nal file created.
I am entering in:
makeblastdb -in test2.fasta -out MV1SDB_a/MV1SDB_a -parse_seqids -dbtype nucl

And getting the following files outputs:
MV1SDB_a.nhr
MV1SDB_a.nin
MV1SDB_a.nog
MV1SDB_a.nsd
MV1SDB_a.nsi
MV1SDB_a.nsq

I am not opening them after creating. But when then trying to run my query sequence against my database that was created, I get this:

blastn -query HPV2-C2_E1.fasta -db MV1SDB_a/ -out testblastout.txt
BLAST Database error: No alias or index file found for nucleotide database [MV1SDB/] in search path [/Users/richardkliman/Research/HPV/Regina/SRS_Mid_Vagina/SRS014466::]

I have been searching for weeks on how to fix this .nal probelm but have had no luck. I did use the old version of ncbi-blast-2.25.... and thought that it may have had a error in it but updating my blast version did not fix my problem.

So how to I create a .nal file to run my query sequence against on my Mac computer (with 4 terabytes of storage) on my UNIX terminal.
rvgill is offline   Reply With Quote
Old 10-19-2016, 08:17 AM   #2
maubp
Peter (Biopython etc)
 
Location: Dundee, Scotland, UK

Join Date: Jul 2009
Posts: 1,543
Default

My guess is this line has an extra slash:

Code:
blastn -query HPV2-C2_E1.fasta -db MV1SDB_a/ -out testblastout.txt

Try:

Code:
blastn -query HPV2-C2_E1.fasta -db MV1SDB_a -out testblastout.txt
The database argument is the filename stem - everything up to but excluding the .nai or .nhr etc extension.
maubp is offline   Reply With Quote
Old 10-26-2016, 05:05 AM   #3
rvgill
Junior Member
 
Location: Allentown

Join Date: Oct 2016
Posts: 6
Default

So I did that and still got the same answer. I needs the .nal file, thats what blast looks for as the Nucleotide database

blastn -query HPV2-C2_E1.fasta -db MV1SDB_a -out testblastout.txt

BLAST Database error: No alias or index file found for nucleotide database [MV1SDB_a] in search path [/Users/richardkliman/Research/HPV/Regina/SRS_Mid_Vagina/SRS014466::]
Richards-Mac-Pro:SRS014466 richardkliman$
rvgill is offline   Reply With Quote
Old 10-26-2016, 06:33 AM   #4
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,075
Default

What command did you use to create the original database (makeblastdb)? Can you provide that?
GenoMax is online now   Reply With Quote
Old 10-26-2016, 06:51 AM   #5
kmcarr
Senior Member
 
Location: USA, Midwest

Join Date: May 2008
Posts: 1,177
Default

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

Code:
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.

Code:
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

Code:
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
Old 10-26-2016, 06:55 AM   #6
maubp
Peter (Biopython etc)
 
Location: Dundee, Scotland, UK

Join Date: Jul 2009
Posts: 1,543
Default

Well spotted kmcarr, I had missed the sub-directory problem.
maubp is offline   Reply With Quote
Old 10-28-2016, 05:20 AM   #7
rvgill
Junior Member
 
Location: Allentown

Join Date: Oct 2016
Posts: 6
Default

No, when you end with a slash it created a separate folder with all of my output files within it names MV1SDB_a. That is not my issue here. But thank you for trying to trouble shoot that.

From a different posting i was looking at I found out that I have to now figure out how to combine my individual databases into one larger database that is then the .na

Last edited by rvgill; 10-28-2016 at 05:45 AM.
rvgill is offline   Reply With Quote
Old 10-28-2016, 05:36 AM   #8
kmcarr
Senior Member
 
Location: USA, Midwest

Join Date: May 2008
Posts: 1,177
Default

Quote:
Originally Posted by rvgill View Post
No, when you end with a slash it created a separate folder with all of my output files within it names MV1SDB_a. That is not my issue here. But thank you for trying to trouble shoot that.

From a different posting i was looking at I found out that I have to now figure out how to combine my individual databases into one larger database that is then the .nal
Did you try running it with the command I suggested, in the same directory you were in when you ran makeblastdb with the "-out MV1SDB_a/MV1SDB_a"?

I understand that the database has been created in it's own directory and that is the problem, when you then try to run blastn it can't find the database because it isn't in the same directory you are running the command from and you don't provide the full path to the database with the "-db" parameter.

Look again at the error message

Quote:
BLAST Database error: No alias or index file found for nucleotide database [MV1SDB/] in search path
It says it can't find an alias OR index file. Your makeblastdb command did create an index file but blastn can't find it because you are not specifying the correct path and db name in your blastn command.

You appear to have gotten hung up on the idea that you need an alias (.nal) file. You do not. alias files are only needed if your database is very large and therefore been broken up into several smaller chunks, or if you are want blast to perform a search by combining two or more separate databases.

Pay attention to properly specifying the path/dbname when you run blastn and that should solve your problem.
kmcarr is offline   Reply With Quote
Old 10-28-2016, 05:57 AM   #9
rvgill
Junior Member
 
Location: Allentown

Join Date: Oct 2016
Posts: 6
Default

Yes, and it worked wonderfully I was able to blast my DB and Query sequence together. I am new to all of this and I have been working to solve this for about 4 weeks before finding this website. My professor had thought that needing the .nal file was the error that was occurring with my databases that I had to solve but now I know that is not the case.

Is there a way for me to run blast on multiple databases at the same time or for me to now combine my databases into one larger one. My databases have anywhere form 6000 to 20000 sequences in them that are at least 75 letters long.


What I have to do is run about 30 query sequences all against about 70 databases.

Thank you very much kmcarr you have been a tremendous help.
rvgill is offline   Reply With Quote
Reply

Tags
blast-nt, database, file error, ncbi blastn, ncbi-blast

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 02:54 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO