[Bioperl-l] generic sequence factory in SeqIO

Jason Stajich jason@cgt.mc.duke.edu
Mon, 22 Apr 2002 11:27:13 -0400 (EDT)


I've put into place the propsed pluggable sequence factories in Bio::SeqIO
classes as described by Hilmar a while back.  This is part of the steps to
revamp SeqIO.

This requires the creation of

Bio::Factory::SeqBuilderI - interface which describes this factory
  one method -- new_sequence() which passes all arguments to the
                instantiation call of the

Bio::Seq::SeqBuilder -- a generic object which wraps the creation of
                        bioperl sequences

Added a method to Bio::SeqIO
   sequence_builder()
which get/sets a Bio::Factory::SeqBuilderI object.

Added to all the SeqIO:: subclasses a _initialize method (where necessary)
which called
$self->sequence_builder() with the appropriate Bio:: Rich/Large/Primary/
or Seq builder.

Additionally, I vote that we remove the next_primary_seq from Bio::SeqIO
as this is replaced by the functionality

$seqio->sequence_builder(new Bio::Seq::SeqBuilder(-type => 'Bio::PrimarySeq');

while( my $seq = $seqio->next_seq ) {  ... }

I would like to go ahead an roll this out and get some comments back. All
tests pass of course... =)

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