BLAST database with local sequences
2
1
Entering edit mode
6.1 years ago
Janey ▴ 30

Hi I'm sorry to ask this question, maybe it's very repetitive, but i'm so confused. I want to make BLAST database with my local sequences. For this purpose, I use this command: makeblastdb -in Total.assembly.fasta -parse_seqids -dbtype nucl -out my_db After running this cammand, I get nhr, nin, nog, nsd, nsi and nsq files. Which of these files should I use in the next step? Which file is the index of my fasta file? In the next step, what command should I use to blast my sequences against this database. When I used the following command, I get error. blastn Total.assembly.fasta -query X.fasta -out results.out

Please help me

RNA-Seq • 6.4k views
ADD COMMENT
0
Entering edit mode
blastn -db Total.assembly.fasta -query X.fasta -out results.out

All output files from makeblastdb are used by blastn, there all part of your database (Total.assembly).

You can also look at this post : BLAST database files

ADD REPLY
0
Entering edit mode

Hi I saw that post, but I did not understand which file should be used in next step

ADD REPLY
1
Entering edit mode

You will only need to point your fasta file :

-db Total.assembly.fasta

blastn will understand that you have Total.assembly.nhr, Total.assembly.nin...etc in Total.assembly location

ADD REPLY
0
Entering edit mode

As far as I know, all those files are involved in building the database.

ADD REPLY
0
Entering edit mode

after using this command " blastn –db Total.assembly -query X.fasta -out results.out " i get this error: Too many positional arguments (1), the offending value: –db Error: (CArgException::eSynopsis) Too many positional arguments (1), the offending value: –db

ADD REPLY
2
Entering edit mode

–db is the problem here

the "–" character is not a SHIFT + 6 character. You need to change "–" by "-"

ADD REPLY
0
Entering edit mode

Yes, I think you still need to had .fasta after Total.assembly

ADD REPLY
0
Entering edit mode

I need a correct command to blast with local database.

ADD REPLY
1
Entering edit mode

You can also read the documentation typing

blastn -help
ADD REPLY
1
Entering edit mode
6.1 years ago

To avoid lots of confusion raised here I always advice to people to use the [-out database_name] (== the basename of all your blastDB files) and for convenience also [-title database_title] options when building their blast DBs.

The value you specify for -out is what you need to provide in the blast-cmdline for -db .Default behavior is that -out is set to -in when it's not provide, hence the confusion

ADD COMMENT
1
Entering edit mode
6.1 years ago
Joe 21k

A BLAST database requires ALL of those files with the various extensions that your makeblastdb command produced.

For instance, if you used the command:

makeblastdb -in Total.assembly.fasta -parse_seqids -dbtype nucl -out my_db

Your database is all of the files which have the base name my_db.

When you use this in subsequent programs, you provide the file path to the location where all of these files are, e.g.

blastn -db /path/to/my_db

You don't specifiy any of the file extensions specifically.

ADD COMMENT
0
Entering edit mode

That was very helpful, worked for me.

ADD REPLY
0
Entering edit mode

A small educational note: if an answer was helpful you should upvote it, if the answer resolved your question you should mark it as accepted.

Upvote|Bookmark|Accept

ADD REPLY

Login before adding your answer.

Traffic: 2518 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6