Question: BLAST database with local sequences
1
gravatar for Janey
18 months ago by
Janey30
USA
Janey30 wrote:

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 • 1.6k views
ADD COMMENTlink modified 18 months ago by Joe14k • written 18 months ago by Janey30
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 REPLYlink modified 18 months ago • written 18 months ago by Bastien Hervé4.4k

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

ADD REPLYlink written 18 months ago by Janey30
1

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 REPLYlink modified 18 months ago • written 18 months ago by Bastien Hervé4.4k

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

ADD REPLYlink written 18 months ago by Janey30

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 REPLYlink written 18 months ago by Janey30
2

–db is the problem here

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

ADD REPLYlink written 18 months ago by Bastien Hervé4.4k

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

ADD REPLYlink written 18 months ago by Bastien Hervé4.4k

I need a correct command to blast with local database.

ADD REPLYlink written 18 months ago by Janey30
1

You can also read the documentation typing

blastn -help
ADD REPLYlink written 18 months ago by Bastien Hervé4.4k
1
gravatar for lieven.sterck
18 months ago by
lieven.sterck5.8k
VIB, Ghent, Belgium
lieven.sterck5.8k wrote:

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 COMMENTlink written 18 months ago by lieven.sterck5.8k
1
gravatar for Joe
18 months ago by
Joe14k
United Kingdom
Joe14k wrote:

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 COMMENTlink written 18 months ago by Joe14k

That was very helpful, worked for me.

ADD REPLYlink written 3 months ago by Rashedul Islam310

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 REPLYlink written 3 months ago by lieven.sterck5.8k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 823 users visited in the last hour