| 1 | # | ||
| 2 | # BioPerl module for Bio::Factory::SequenceStreamI | ||
| 3 | # | ||
| 4 | # Please direct questions and support issues to <bioperl-l@bioperl.org> | ||
| 5 | # | ||
| 6 | # Cared for by Jason Stajich <jason@bioperl.org> | ||
| 7 | # | ||
| 8 | # Copyright Jason Stajich | ||
| 9 | # | ||
| 10 | # You may distribute this module under the same terms as perl itself | ||
| 11 | |||
| 12 | # POD documentation - main docs before the code | ||
| 13 | |||
| 14 | =head1 NAME | ||
| 15 | |||
| 16 | Bio::Factory::SequenceStreamI - Interface describing the basics of a Sequence Stream. | ||
| 17 | |||
| 18 | =head1 SYNOPSIS | ||
| 19 | |||
| 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 ) { | ||
| 24 | } | ||
| 25 | |||
| 26 | =head1 DESCRIPTION | ||
| 27 | |||
| 28 | This interface is for describing objects which produces | ||
| 29 | Bio::PrimarySeqI objects or processes Bio::PrimarySeqI objects to a | ||
| 30 | data stream. | ||
| 31 | |||
| 32 | =head1 FEEDBACK | ||
| 33 | |||
| 34 | =head2 Mailing Lists | ||
| 35 | |||
| 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. | ||
| 39 | |||
| 40 | bioperl-l@bioperl.org - General discussion | ||
| 41 | http://bioperl.org/wiki/Mailing_lists - About the mailing lists | ||
| 42 | |||
| 43 | =head2 Support | ||
| 44 | |||
| 45 | Please direct usage questions or support issues to the mailing list: | ||
| 46 | |||
| 47 | I<bioperl-l@bioperl.org> | ||
| 48 | |||
| 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. | ||
| 53 | |||
| 54 | =head2 Reporting Bugs | ||
| 55 | |||
| 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: | ||
| 59 | |||
| 60 | https://github.com/bioperl/bioperl-live/issues | ||
| 61 | |||
| 62 | =head1 AUTHOR - Jason Stajich | ||
| 63 | |||
| 64 | Email jason@bioperl.org | ||
| 65 | |||
| 66 | =head1 APPENDIX | ||
| 67 | |||
| 68 | The rest of the documentation details each of the object methods. | ||
| 69 | Internal methods are usually preceded with a _ | ||
| 70 | |||
| 71 | =cut | ||
| 72 | |||
| 73 | |||
| 74 | # Let the code begin... | ||
| 75 | |||
| 76 | |||
| 77 | package Bio::Factory::SequenceStreamI; | ||
| 78 | 104 | $Bio::Factory::SequenceStreamI::VERSION = '1.7.8'; | |
| 79 | 104 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 80 | |||
| 81 | 104 | ▶ | use base qw(Bio::Root::RootI); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 82 | |||
| 83 | =head2 next_seq | ||
| 84 | |||
| 85 | Title : next_seq | ||
| 86 | Usage : $seq = stream->next_seq | ||
| 87 | Function: Reads the next sequence object from the stream and returns it. | ||
| 88 | |||
| 89 | Certain driver modules may encounter entries in the stream that | ||
| 90 | are either misformatted or that use syntax not yet understood | ||
| 91 | by the driver. If such an incident is recoverable, e.g., by | ||
| 92 | dismissing a feature of a feature table or some other non-mandatory | ||
| 93 | part of an entry, the driver will issue a warning. In the case | ||
| 94 | of a non-recoverable situation an exception will be thrown. | ||
| 95 | Do not assume that you can resume parsing the same stream after | ||
| 96 | catching the exception. Note that you can always turn recoverable | ||
| 97 | errors into exceptions by calling $stream->verbose(2). | ||
| 98 | Returns : a Bio::Seq sequence object | ||
| 99 | Args : none | ||
| 100 | |||
| 101 | See L<Bio::Root::RootI> | ||
| 102 | |||
| 103 | =cut | ||
| 104 | |||
| 105 | 0 | ▶ | sub next_seq { |
|
Subroutine
next_seq: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 106 | 0 | shift->throw_not_implemented(); | |
| 107 | } | ||
| 108 | |||
| 109 | =head2 write_seq | ||
| 110 | |||
| 111 | Title : write_seq | ||
| 112 | Usage : $stream->write_seq($seq) | ||
| 113 | Function: writes the $seq object into the stream | ||
| 114 | Returns : 1 for success and 0 for error | ||
| 115 | Args : Bio::Seq object | ||
| 116 | |||
| 117 | =cut | ||
| 118 | |||
| 119 | 0 | ▶ | sub write_seq { |
|
Subroutine
write_seq: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 120 | 0 | shift->throw_not_implemented(); | |
| 121 | } | ||
| 122 | |||
| 123 | =head2 sequence_factory | ||
| 124 | |||
| 125 | Title : sequence_factory | ||
| 126 | Usage : $seqio->sequence_factory($seqfactory) | ||
| 127 | Function: Get the Bio::Factory::SequenceFactoryI | ||
| 128 | Returns : Bio::Factory::SequenceFactoryI | ||
| 129 | Args : none | ||
| 130 | |||
| 131 | |||
| 132 | =cut | ||
| 133 | |||
| 134 | 0 | ▶ | sub sequence_factory{ |
|
Subroutine
sequence_factory: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 135 | 0 | shift->throw_not_implemented(); | |
| 136 | } | ||
| 137 | |||
| 138 | 104 | 1; | |