maint: restructure to use Dist::Zilla
[bioperl-live.git] / lib / Bio / Factory / SequenceStreamI.pm
blobf59d1fbdd642cc07cf9298161a9f1c487c2a6c27
2 # BioPerl module for Bio::Factory::SequenceStreamI
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
14 =head1 NAME
16 Bio::Factory::SequenceStreamI - Interface describing the basics of a Sequence Stream.
18 =head1 SYNOPSIS
20 # get a SequenceStreamI object somehow like with SeqIO
21 use Bio::SeqIO;
22 my $in = Bio::SeqIO->new(-file => '< fastafile');
23 while( my $seq = $in->next_seq ) {
26 =head1 DESCRIPTION
28 This interface is for describing objects which produces
29 Bio::PrimarySeqI objects or processes Bio::PrimarySeqI objects to a
30 data stream.
32 =head1 FEEDBACK
34 =head2 Mailing Lists
36 User feedback is an integral part of the evolution of this and other
37 Bioperl modules. Send your comments and suggestions preferably to
38 the Bioperl mailing list. Your participation is much appreciated.
40 bioperl-l@bioperl.org - General discussion
41 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
43 =head2 Support
45 Please direct usage questions or support issues to the mailing list:
47 I<bioperl-l@bioperl.org>
49 rather than to the module maintainer directly. Many experienced and
50 reponsive experts will be able look at the problem and quickly
51 address it. Please include a thorough description of the problem
52 with code and data examples if at all possible.
54 =head2 Reporting Bugs
56 Report bugs to the Bioperl bug tracking system to help us keep track
57 of the bugs and their resolution. Bug reports can be submitted via the
58 web:
60 https://github.com/bioperl/bioperl-live/issues
62 =head1 AUTHOR - Jason Stajich
64 Email jason@bioperl.org
66 =head1 APPENDIX
68 The rest of the documentation details each of the object methods.
69 Internal methods are usually preceded with a _
71 =cut
74 # Let the code begin...
77 package Bio::Factory::SequenceStreamI;
78 use strict;
80 use base qw(Bio::Root::RootI);
82 =head2 next_seq
84 Title : next_seq
85 Usage : $seq = stream->next_seq
86 Function: Reads the next sequence object from the stream and returns it.
88 Certain driver modules may encounter entries in the stream that
89 are either misformatted or that use syntax not yet understood
90 by the driver. If such an incident is recoverable, e.g., by
91 dismissing a feature of a feature table or some other non-mandatory
92 part of an entry, the driver will issue a warning. In the case
93 of a non-recoverable situation an exception will be thrown.
94 Do not assume that you can resume parsing the same stream after
95 catching the exception. Note that you can always turn recoverable
96 errors into exceptions by calling $stream->verbose(2).
97 Returns : a Bio::Seq sequence object
98 Args : none
100 See L<Bio::Root::RootI>
102 =cut
104 sub next_seq {
105 shift->throw_not_implemented();
108 =head2 write_seq
110 Title : write_seq
111 Usage : $stream->write_seq($seq)
112 Function: writes the $seq object into the stream
113 Returns : 1 for success and 0 for error
114 Args : Bio::Seq object
116 =cut
118 sub write_seq {
119 shift->throw_not_implemented();
122 =head2 sequence_factory
124 Title : sequence_factory
125 Usage : $seqio->sequence_factory($seqfactory)
126 Function: Get the Bio::Factory::SequenceFactoryI
127 Returns : Bio::Factory::SequenceFactoryI
128 Args : none
131 =cut
133 sub sequence_factory{
134 shift->throw_not_implemented();