3 # BioPerl module for Bio::Factory::SequenceStreamI
5 # Cared for by Jason Stajich <jason@bioperl.org>
7 # Copyright Jason Stajich
9 # You may distribute this module under the same terms as perl itself
11 # POD documentation - main docs before the code
15 Bio::Factory::SequenceStreamI - Interface describing the basics of a Sequence Stream.
19 # get a SequenceStreamI object somehow like with SeqIO
21 my $in = Bio::SeqIO->new(-file => '< fastafile');
22 while( my $seq = $in->next_seq ) {
27 This interface is for describing objects which produces
28 Bio::PrimarySeqI objects or processes Bio::PrimarySeqI objects to a
35 User feedback is an integral part of the evolution of this and other
36 Bioperl modules. Send your comments and suggestions preferably to
37 the Bioperl mailing list. Your participation is much appreciated.
39 bioperl-l@bioperl.org - General discussion
40 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
44 Report bugs to the Bioperl bug tracking system to help us keep track
45 of the bugs and their resolution. Bug reports can be submitted via the
48 http://bugzilla.open-bio.org/
50 =head1 AUTHOR - Jason Stajich
52 Email jason@bioperl.org
56 The rest of the documentation details each of the object methods.
57 Internal methods are usually preceded with a _
62 # Let the code begin...
65 package Bio
::Factory
::SequenceStreamI
;
68 use base
qw(Bio::Root::RootI);
73 Usage : $seq = stream->next_seq
74 Function: Reads the next sequence object from the stream and returns it.
76 Certain driver modules may encounter entries in the stream that
77 are either misformatted or that use syntax not yet understood
78 by the driver. If such an incident is recoverable, e.g., by
79 dismissing a feature of a feature table or some other non-mandatory
80 part of an entry, the driver will issue a warning. In the case
81 of a non-recoverable situation an exception will be thrown.
82 Do not assume that you can resume parsing the same stream after
83 catching the exception. Note that you can always turn recoverable
84 errors into exceptions by calling $stream->verbose(2).
85 Returns : a Bio::Seq sequence object
88 See L<Bio::Root::RootI>
93 shift->throw_not_implemented();
99 Usage : $stream->write_seq($seq)
100 Function: writes the $seq object into the stream
101 Returns : 1 for success and 0 for error
102 Args : Bio::Seq object
107 shift->throw_not_implemented();
110 =head2 sequence_factory
112 Title : sequence_factory
113 Usage : $seqio->sequence_factory($seqfactory)
114 Function: Get the Bio::Factory::SequenceFactoryI
115 Returns : Bio::Factory::SequenceFactoryI
121 sub sequence_factory
{
122 shift->throw_not_implemented();