[Bioperl-l] generic sequence factory in SeqIO
Lincoln Stein
lstein@cshl.org
Tue, 23 Apr 2002 15:53:19 -0400
That's a really nice idea. I use the same thing for parameter passing in my
code -- unrecognized parameter name/value pairs get stored into a hash where
you can retrieve them if you really want them.
Lincoln
On Tuesday 23 April 2002 06:22, Matthew Pocock wrote:
> Jason Stajich wrote:
> > yeah - it's going to have to call 'can' on all of those. Kind of silly.
> >
> > Other option is to cache all the parsed information and do a big sequence
> > init at the end - because of the way our initialization is done, init
> > fields which the seq object doesn't know about (i.e. dates, division, etc
> > would be unknown by a PrimarySeq) would just get ignored - psuedo event
> > throwing that way!
>
> BioJava collects all the 'unhandled' events and puts them into an
> Annotation object as key-value pairs so that even if a sequence or
> feature implementation doesn't have an explicit accessor for that
> property e.g. f.getFrame() then the data is available e.g.
> f.getAnnotation().getProperty("frame") and the more ontology-rich
> biojava2 will probably make all of this utterly transparent. To drop it,
> you would add a listener in the parsing pipeline that explicitly dropped
> that event. Perl has much easier ways of invoking arbitrary methods
> (ever called $thing->$method(@params) or even $foo->can($bar) anyone?)
> and generating custom object methods is a doddle (eval, symbol tables,
> AUTOLOAD, blessed sub closures etc.) so it would not be impossible to
> generate dumb accessors for the stuff you weren't expecting. Throwing
> stuff away usually confuses people.
>
> Matthew
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l