[Bioperl-l] Bio::SearchIO::hmmer hsp behaviour

Chris Fields cjfields at uiuc.edu
Thu Jun 29 11:23:20 EDT 2006


Sendu, 

The HOWTO explains everything:

http://www.bioperl.org/wiki/HOWTO:SearchIO

under "Implementation."  I learned this the hard way when I started working
on SearchIO::blast and wondered why it had so many *_element methods.  

Yes, you will need an EventHandler if you implement SearchIO; the
EventHandler should implement Bio::SearchIO::EventHandlerI interface.  You
might not need one that returns objects though (i.e. it could return
hashes).  And you could possibly get around the event handler somehow,
though if you plan on doing that, why not just work on Bio::Tools::Hmmpfam
as an alternative parser?  We've had other BLAST parsers before
(Bio::Tools::BPLite comes to mind); if they aren't maintained and there is a
viable alternative they can be deprecated.  Hence the reason I mentioned
working on your own version of SearchIO::hmmer; if that module becomes most
prevalently used we can deprecate the older version.

The idea that a SearchIO plugin should act like a SAX parser is based on the
fact that many files being parsed are quite large, so it would be nice to
have everything parsed as a stream (on-the-go) as opposed to preprocessing
everything into an object hierarchy (which can be very memory intensive for
large files).  Whether this is done in practice in all SearchIO modules is
another thing; it may be based upon what particular fixes were made over
time or the contributor's intentions.  

Chris 

> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-
> bounces at lists.open-bio.org] On Behalf Of Sendu Bala
> Sent: Thursday, June 29, 2006 2:55 AM
> To: bioperl-l at lists.open-bio.org
> Subject: Re: [Bioperl-l] Bio::SearchIO::hmmer hsp behaviour
> 
> Jason Stajich wrote:
> >
> > Feel free to propose an alternative implement for parser as you see
> > fit as long as the API is preserved.  you can contibute a new
> > SearchIO plugin and HMMERSearchResultListener to deal with it - or
> [snip]
> 
> What's the thinking behind the way SearchIOs work? Is it necessary or
> desirable to always do it with events and listeners? Or is it enough to
> simply return a ResultI regardless of how you made it?
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l



More information about the Bioperl-l mailing list