[Bioperl-l] generic sequence factory in SeqIO
hlapp@gmx.net
hlapp@gmx.net
Tue, 23 Apr 2002 03:59:14 +0200 (MEST)
Very cool Jason. Roll it out. Deprecate next_primary_seq().
Few remarks:
1) Factory methods for object instantiation are usually called
create_XXXX(). You may want to rename it.
2) I'd rename sequence_builder() to sequence_factory(). (GoF convention is
actually to name the classes accordingly, too.)
3) I assume SeqIO.pm has that method declared, too (it's the interface).
> 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
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>
--
-hilmar
--
-----------------------------------------------------
--------
Hilmar Lapp email:
lapp@gnf.org
GNF, San Diego, Ca. 92121 phone: +1-
858-812-1757
-----------------------------------------------------
--------
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net