[Bioperl-l] SearchIO - tiny bug / verbosity inheritance

Jason Stajich jason@cgt.mc.duke.edu
Fri, 11 Jan 2002 18:30:12 -0500 (EST)


On Fri, 11 Jan 2002 JDiggans@genelogic.com wrote:

>
> I've been switching some scripts over to the new SearchIO blast parsers and
> I've gotta say the new event-based model is a breeze to work with (and fun
> to read through!).
>
glad to hear that.

> The warning output currently produced by parsing a blast report (bug report
> filed) leads to a more general bioperl design question. The initial
> SearchIO verbosity state isn't inherited by downstream objects (and there
> are plenty). Since BioPerl is moving more and more towards the *IO
> parser-swappable design has there been any thought to pass along
> $self->verbose() to each new sub-object created by a parent object?
> Personally, were I to set verbose to -1 on a SearchIO instance I would
> prefer my Results, Hits and HSPs remain quietly dignified.
>
> Does this kind of inheritance make sense?

Yes it does and the lack of the verbosity inheritance is more a function
of laziness than a specific design decision. I've wanted the same thing
when parsing with SeqIO too.  I think we just need to go in and add the
appropriate entry in the instantiation call.  A long time ago bioperl made
the decision to go from a global static $DEBUG variable applicable to all
classes and to a per-class verbosity flag.  The downside is of course the
that someone has to add the code in properly to propigate the state to the
child classes.

Shouldn't be very much work to fix in SearchIO but actually propigating
this through all the bioperl code might take a bit of work.  We'll put it
on the todo list - definitely something that should make its way in before
1.0.  Of course we'd like every line of code looked at before the 1.0
release so this can be somethe else we'll put in the checklist if the
Core concurs.

-jason


> -j
>
> -------------------------------------------------
> James Diggans
> Bioinformatics Programmer
> Gene Logic, Inc.
> Phone: 301.987.1756
> FAX: 301.987.1701
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>

-- 
Jason Stajich
Duke University
jason@cgt.mc.duke.edu