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.)
Best Answer