[Bioperl-l] [StandAloneBLAST] Use more than one CPU + avoid BLAST reload

Sendu Bala bix at sendu.me.uk
Mon Dec 3 19:05:23 EST 2007

Sven Boekhoff wrote:
> HI!
> I just started working with Perl and BioPerl. I'm quite impressed what 
> can be easily done with this module. Today I found that my second CPU 
> ist not used, but the first one run's at 100%. I tried to include the 
> "-a"-parameter, but I was not successful:
> my @params = (
> 	-database => 'my_db',
> 	-a => '2',
> 	-outfile => 'blast1.out'
> );
> How do I have to use it?

This should work in the CVS version of StandAloneBlast. In other 
versions, perhaps try using $object->a(2);

> Second question: In my perlscript I start BLAST-searches in a loop. 
> Everytime BLAST has finished its search, the memory is cleared and BLAST 
> is started again. I think most of the time is used to reload the 
> database. Is it somehow possible to keep the database loaded (e.g. by 
> starting a second search) or is BLAST reloaded anyway?

I hope someone will correct me for being wrong, but I think you'd have 
to that with a 2-way pipe. StandAloneBlast only uses output to a file 
and input from that file, finishing with the executable inbetween. I've 
thought about improving it with a 2-way pipe, but never got around to 
it, being apprehensive about stability on all platforms.

The more obvious solution, which may be possible depending on exactly 
what you're doing, is to avoid the loop and just supply Blast all your 
input in one go.

More information about the Bioperl-l mailing list