~ubuntu-branches/ubuntu/oneiric/bioperl/oneiric

« back to all changes in this revision

Viewing changes to Bio/Seq/BaseSeqProcessor.pm

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2007-09-21 22:52:22 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070921225222-tt20m2yy6ycuy2d8
Tags: 1.5.2.102-1
* Developer release.
* Upgraded source package to debhelper 5 and standards-version 3.7.2.
* Added libmodule-build-perl and libtest-harness-perl to
  build-depends-indep.
* Disabled automatic CRAN download.
* Using quilt instead of .diff.gz to manage modifications.
* Updated Recommends list for the binary package.
* Moved the "production-quality" scripts to /usr/bin/.
* New maintainer: Debian-Med packaging team mailing list.
* New uploaders: Charles Plessy and Steffen Moeller.
* Updated Depends, Recommends and Suggests.
* Imported in Debian-Med's SVN repository on Alioth.
* Executing the regression tests during package building.
* Moved the Homepage: field out from the package's description.
* Updated watch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: BaseSeqProcessor.pm,v 1.2 2002/11/02 21:04:19 lapp Exp $
 
1
# $Id: BaseSeqProcessor.pm,v 1.7.4.1 2006/10/02 23:10:27 sendu Exp $
2
2
#
3
3
# BioPerl module for Bio::Seq::BaseSeqProcessor
4
4
#
50
50
Bioperl modules. Send your comments and suggestions preferably to
51
51
the Bioperl mailing list.  Your participation is much appreciated.
52
52
 
53
 
  bioperl-l@bioperl.org              - General discussion
54
 
  http://bioperl.org/MailList.shtml  - About the mailing lists
 
53
  bioperl-l@bioperl.org                  - General discussion
 
54
  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists
55
55
 
56
56
=head2 Reporting Bugs
57
57
 
58
58
Report bugs to the Bioperl bug tracking system to help us keep track
59
 
of the bugs and their resolution. Bug reports can be submitted via
60
 
email or the web:
 
59
of the bugs and their resolution. Bug reports can be submitted via the
 
60
web:
61
61
 
62
 
  bioperl-bugs@bioperl.org
63
 
  http://bioperl.org/bioperl-bugs/
 
62
  http://bugzilla.open-bio.org/
64
63
 
65
64
=head1 AUTHOR - Hilmar Lapp
66
65
 
67
66
Email hlapp at gmx.net
68
67
 
69
 
Describe contact details here
70
 
 
71
 
=head1 CONTRIBUTORS
72
 
 
73
 
Additional contributors names and emails here
74
 
 
75
68
=head1 APPENDIX
76
69
 
77
70
The rest of the documentation details each of the object methods.
84
77
 
85
78
 
86
79
package Bio::Seq::BaseSeqProcessor;
87
 
use vars qw(@ISA);
88
80
use strict;
89
81
 
90
82
# Object preamble - inherits from Bio::Root::Root
91
83
 
92
 
use Bio::Root::Root;
93
 
use Bio::Factory::SequenceProcessorI;
94
84
 
95
 
@ISA = qw(Bio::Root::Root Bio::Factory::SequenceProcessorI);
 
85
use base qw(Bio::Root::Root Bio::Factory::SequenceProcessorI);
96
86
 
97
87
=head2 new
98
88
 
200
190
 
201
191
 Title   : write_seq
202
192
 Usage   : $stream->write_seq($seq)
203
 
 Function: writes the $seq object into the stream
204
 
 
205
 
           This implementation passes the sequences to the source
206
 
           stream unaltered. You need to override this in order to
207
 
           have sequence objects altered before output.
208
 
 
209
 
 Returns : 1 for success and 0 for error
210
 
 Args    : Bio::Seq object
 
193
 Function: Writes the result(s) of processing the sequence object into
 
194
           the stream.
 
195
 
 
196
           You need to override this method in order not to alter
 
197
           (process) sequence objects before output.
 
198
 
 
199
 Returns : 1 for success and 0 for error. The method stops attempting
 
200
           to write objects after the first error returned from the
 
201
           source stream. Otherwise the return value is the value
 
202
           returned from the source stream from writing the last
 
203
           object resulting from processing the last sequence object
 
204
           given as argument.
 
205
 
 
206
 Args    : Bio::SeqI object, or an array of such objects
211
207
 
212
208
=cut
213
209
 
214
210
sub write_seq{
215
 
    return shift->source_stream->write_seq(@_);
 
211
    my ($self, @seqs) = @_;
 
212
    my $ret;
 
213
    foreach my $seq (@seqs) {
 
214
        foreach my $processed ($self->process_seq($seq)) {
 
215
            $ret = $self->source_stream->write_seq($seq);
 
216
            return unless $ret;
 
217
        }
 
218
    }
 
219
    return $ret;
216
220
}
217
221
 
218
222
=head2 sequence_factory