Question: How To Blast A Sequence Against Multiple Databases
4
gravatar for Manju
7.1 years ago by
Manju40
Manju40 wrote:

Hello,

I have downloaded all the chromosome of Bos taurus and I have changed them in blast format using makeblastdb..and now I want to locally blast my sequence against these all chromosomes. now I have 29 databases. Is there any method by which I am able to blast my sequence against all 29 databases in my program.

What should I write in database????

@params = ('database' => '????????', 'outfile' => 'blast2.out', '_READMETHOD' => 'Blast', 'prog'=> 'blastn');

Thanks Manju Rawat

blast • 9.4k views
ADD COMMENTlink modified 15 days ago by Biostar ♦♦ 20 • written 7.1 years ago by Manju40
9
gravatar for Digiomics
7.1 years ago by
Digiomics160
Netherlands
Digiomics160 wrote:

You could also use the blastdb_aliastool included in the NCBI blast package to aggregate your BLAST databases to a single virtual database.

ADD COMMENTlink written 7.1 years ago by Digiomics160
9
gravatar for Torst
6.9 years ago by
Torst900
Australia
Torst900 wrote:

There is no need to create custom single databases (real or alias).

I'm pretty sure the BLAST "-d" and BLAST+ "-db" accept SPACE-SEPARATED multiple databases on the one command line. You just have to ensure you quote them in your shell, or within a Perl string. eg.

blastall -p blastp -d "nr sprot trembl" -i q.fa
ADD COMMENTlink written 6.9 years ago by Torst900
8
gravatar for Chris
7.1 years ago by
Chris1.6k
Munich
Chris1.6k wrote:

Why not creating a single database by merging the chromosomes into one big fasta file and then formatting it?

Not sure what you mean by this: @params = ('database' => '????????', 'outfile' => 'blast2.out', '_READMETHOD' => 'Blast', 'prog'=> 'blastn');

ADD COMMENTlink written 7.1 years ago by Chris1.6k
1

This answer is bad. Why is everyone upvoting it? That is so much more work and may not even be possible in some cases to do.

ADD REPLYlink written 4.8 years ago by axa907020
1

I don't see how this approach is either bad or much more work. The objective of the OP is to have a single database. Chris proposes to merge the fasta files and create one database while you suggest to combine existing databases. In this case, the OP had access to the original fasta files, which a simple 'cat' command would have joined and then he could have used a command he already knew about and had used to create his databases. Clearly, both solutions seem workable. Your solution also happens to be the second most upvoted solution, which has been there for over two years. It seems to me that there is no need to call any answer bad and to question the judgement of multiple users over the course of 2.3 years. Even less on the first day you joined this forum ;)

ADD REPLYlink modified 4.8 years ago • written 4.8 years ago by Eric Normandeau10.0k
1

The answer is bad.  The user asked how to blast against 29 databases.  "Is there any method by which I am able to blast my sequence against all 29 databases in my program?"

The answer "go compile a new database" is an indirect work around to the problem.  It may even be good advice in this particular instance - but it did not answer the question asked.

Why don't I want to do that?  Because it's moronic to create multiple permutations of databases when I already have them compiled.  This means my usage of disk space balloons every time I do a search.  Not to mention it is annoying and time consuming.

I came here with the exact same question.  Thankfully there are several good options provided by others below.

ADD REPLYlink modified 3.7 years ago • written 3.7 years ago by jeremy.cox.290

It looks suspiciously like he's trying to run blast via a perl script.

ADD REPLYlink written 7.1 years ago by Razzmataz30

Ah, right, now I remember. The '@'-construct is a hint... Well, since I'm in Python I do not come across such things very often. ;)

ADD REPLYlink written 7.1 years ago by Chris190
3
gravatar for Manu Prestat
6.9 years ago by
Manu Prestat3.8k
Marseille, France
Manu Prestat3.8k wrote:

You can do your alias easily by yourself:

example:

cd myblastdbs/
gedit myOwnblastDB.nal

then follow this (an example is the genbank nt.nal file):

#
# myOwnblastDB.nal is an alias file for all my chromosomes
#
#
TITLE all my chromosomes
#
DBLIST chr1 chr2 chr3 chr4 chri chr24
#
#GILIST
#
#OIDLIST
#

It is very simple, and works very fine!

ADD COMMENTlink written 6.9 years ago by Manu Prestat3.8k
1
gravatar for axa9070
4.8 years ago by
axa907020
axa907020 wrote:

http://www.ncbi.nlm.nih.gov/books/NBK1763/#CmdLineAppsManual.Aggregate_existing_BLA

To combine the two nematode nucleotide databases, named “nematode_mrna” and “nematode_genomic", we use the following command line:

$ blastdb_aliastool -dblist "nematode_mrna nematode_genomic" -dbtype nucl \ -out nematode_all -title "Nematode RefSeq mRNA + Genomic"

ADD COMMENTlink written 4.8 years ago by axa907020
0
gravatar for Eric Normandeau
7.1 years ago by
Eric Normandeau10.0k
Quebec, Canada
Eric Normandeau10.0k wrote:

If you place your 29 chromosomes in the same fasta file, you should be able to create your single database using the makeblastdb program. Just use blastn then to blast on the database containing all your chromosomes.

ADD COMMENTlink written 7.1 years ago by Eric Normandeau10.0k
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: 1414 users visited in the last hour