[Bioperl-l] generic sequence factory in SeqIO
Jason Stajich
jason@cgt.mc.duke.edu
Mon, 22 Apr 2002 13:57:09 -0400 (EDT)
On Mon, 22 Apr 2002, Ewan Birney wrote:
>
> Sounds great Jason. I find the Bio::Seq::SeqBuilder->new( -type => $type)
> a little confusing at first, but I guess it makes sense - The
> Bio::Seq::SeqBuilder is the generic "perl in memory" system whereas a
> truly funk Bio::SeqAsQuBits::Factory would just inheriet off
> Bio::Seq::SeqBuilderI right?
>
Yeah - didn't want to have make Bio::Seq::PrimarySeqBuilder,
Bio::Seq::RichSeqBuilder which were just delegating to their respective
Bio::Seq.. object
But when a factory that is not an in-memory representation comes along
this will hopefully be easier to do.
>
> How does the embl/genbank parser know "when" they can do
> $seqobject->division() sets or does everything have to go into the factory
> method? Or this is waiting for the new event throwing system?
>
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!
>
> One drawback of going to events is that I bet it ups the complexity in
> understanding the SeqIO system. This is something we need to watch in the
> docs etc...
>
Agreed. I would want to pull things out and start from scratch and let
people look at that code for a little while -but I'm not quite ready to
invest the time in redoing this right now, would like us to talk it over
some more.
>
>
> e.
>
>
> -----------------------------------------------------------------
> Ewan Birney. Mobile: +44 (0)7970 151230, Work: +44 1223 494420
> <birney@ebi.ac.uk>.
> -----------------------------------------------------------------
>
--
Jason Stajich
Duke University
jason@cgt.mc.duke.edu