This is a test version of Biostars. For the public version, visit https://www.biostars.org.
BLAST database with local sequences

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

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

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

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

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

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

–db is the problem here

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

I need a correct command to blast with local database.

You can also read the documentation typing

blastn -help

2 answers

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.

That was very helpful, worked for me.

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

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

Log in to answer this question.