How can I limit my BLASTLOCAL query to a subset of the database in Bioinformatics Toolbox 7.8 (R2009a)?

1 view (last 30 days)
I want to run BLASTLOCAL for my sequence on only one organism.
For example, in BLASTNCBI I used the 'Entrez' property to search a subset of the selected database.:
blastncbi(Seq, Program, ...'Entrez', EntrezValue, ...)
I would like to be able to do this in BLASTLOCAL.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 18 Oct 2013
The standalone version of Blast is meant to be used on customized database. So one option is to create your own database that represents a filtered version of the NR database. Please see the documentation for FORMATDB, which is available from NCBI.
The attached example shows how you can create your own database in MATLAB. The attached example, 'createDatabaseExample.m' queries Entrez for all the GI-numbers associated with mus musculus and creates a listing of these GI numbers. Then, a restricted database is created.
Another option is to keep the NR database as is, and simply use the '-l' option from BLASTLOCAL. You would still need to use the first part of the attached example to create the file 'mouse.gi'. But then, instead of calling FORMATDB, you could go directly to BLASTLOCAL as follows:
results = blastlocal('inputquery', 'myquery.fa','database', 'nr','program', 'blastp','blastargs', '-l mouse.gi')
(Note that the file mouse.gi.in could also be used, but this is an ASCII file, and the binary mouse.gi would give more efficient file I/O.)

More Answers (0)

Products


Release

R2009a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!