2 # BioPerl module for Bio::Factory::SequenceFactoryI
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Jason Stajich <jason@bioperl.org>
8 # Copyright Jason Stajich
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
16 Bio::Factory::SequenceFactoryI - This interface allows for generic building of sequences in factories which create sequences (like SeqIO)
20 # do not use this object directly it is an interface
21 # get a Bio::Factory::SequenceFactoryI object like
23 use Bio::Seq::SeqFactory;
24 my $seqbuilder = Bio::Seq::SeqFactory->new('-type' => 'Bio::PrimarySeq');
26 my $seq = $seqbuilder->create(-seq => 'ACTGAT',
27 -display_id => 'exampleseq');
29 print "seq is a ", ref($seq), "\n";
33 A generic way to build Sequence objects via a pluggable factory. This
34 reduces the amount of code that looks like
36 if( $type eq 'Bio::PrimarySeq' ) { ... }
37 elsif( $type eq 'Bio::Seq::RichSeq' ) { ... }
43 User feedback is an integral part of the evolution of this and other
44 Bioperl modules. Send your comments and suggestions preferably to
45 the Bioperl mailing list. Your participation is much appreciated.
47 bioperl-l@bioperl.org - General discussion
48 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
52 Please direct usage questions or support issues to the mailing list:
54 I<bioperl-l@bioperl.org>
56 rather than to the module maintainer directly. Many experienced and
57 reponsive experts will be able look at the problem and quickly
58 address it. Please include a thorough description of the problem
59 with code and data examples if at all possible.
63 Report bugs to the Bioperl bug tracking system to help us keep track
64 of the bugs and their resolution. Bug reports can be submitted via the
67 https://github.com/bioperl/bioperl-live/issues
69 =head1 AUTHOR - Jason Stajich
71 Email jason-at-bioperl.org
75 The rest of the documentation details each of the object methods.
76 Internal methods are usually preceded with a _
81 # Let the code begin...
84 package Bio
::Factory
::SequenceFactoryI
;
88 use base
qw(Bio::Factory::ObjectFactoryI);
93 Usage : my $seq = $seqbuilder->create(-seq => 'CAGT',
95 Function: Instantiates new Bio::PrimarySeqI (or one of its child classes)
96 This object allows us to genericize the instantiation of sequence
98 Returns : Bio::PrimarySeqI
99 Args : initialization parameters specific to the type of sequence
100 object we want. Typically