[Bioperl-l] SearchIO speed up
cjfields at uiuc.edu
Thu Aug 10 12:25:59 EDT 2006
On Aug 10, 2006, at 11:04 AM, Sendu Bala wrote:
>> Just curious, but is there a possibility of making "lazy"
>> instantiation of
>> objects like HSP and HIT objects? Things like parsing and output
>> could be
>> accomplished without these objects?
> That's what I've done actually, which is why performance varies
> 5x and 1.5x (lower performance when the instantiation is forced).
> But, things like 'parsing and output' do need to force the
> unless, say, an output module knew about the hash structure of the
> stored inside a Result object. Which is too horrible a situation to
> comprehend. :O
> Or is it? What specifically did you have in mind?
The nice thing about SearchIO is the ability to attach a Handler to
return specific objects. For instance, if you didn't want HSP's then
they could be 'junked' by using SearchIO::FastResultEventBuilder,
which just returns hits. I don't know how the other SearchIO modules
(hmmer, etc) deal with this though, but it works for blast and (I
You might use this same strategy have the handler return simple
hashes instead of objects, or create a new set of simpler Result/Hit/
HSP classes to deal with the data.
Alternatively, create a new SearchIO class (call it fastblast; okay,
terrible name) that doesn't use a handler and just returns hashes. I
think Jason pointed out previously that the handler isn't required.
Lab of Dr. Robert Switzer
Dept of Biochemistry
University of Illinois Urbana-Champaign
More information about the Bioperl-l