MATLAB: How to change the number of Blast sequence hits returned by BLASTLOCAL in the Bioinformatics Toolbox 7.8 (R2009a)

Bioinformatics Toolboxblastblastlocalhitsnumberofsequence

When I use BLASTLOCAL to return sequence hits, I would like to change the number of hits returned.
For example:
results = blastlocal('inputquery', 'query_nt.fa', 'database', 'ecoli.aa', 'program', 'blastx')
length(results.Hits)
Returns 250. I would like to change this.

Best Answer

When calling BLASTALL directly, the '-b' option allows a user to change this value. Typing 'blastall -' at the DOS command prompt (or in MATLAB, '!blastall -') displays usage of the '-b' option. To pass the -b option from BLASTLOCAL append the following parameter/value pair to the BLASTLOCAL call:
blastlocal(...,'blastargs', '-b 10')
if you also want to restrict your query to mouse GI-numbers, the syntax would look like:
blastlocal(...,'blastargs', '-b 10 -l mouse.gi')