2 # BioPerl module for Bio::SeqIO::exp
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Aaron Mackey <amackey@virginia.edu>
8 # Copyright Aaron Mackey
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
16 Bio::SeqIO::exp - exp trace sequence input/output stream
20 Do not use this module directly. Use it via the Bio::SeqIO class.
24 This object can transform Bio::Seq objects to and from exp trace
31 User feedback is an integral part of the evolution of this and other
32 Bioperl modules. Send your comments and suggestions preferably to one
33 of the Bioperl mailing lists. Your participation is much appreciated.
35 bioperl-l@bioperl.org - General discussion
36 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
40 Please direct usage questions or support issues to the mailing list:
42 L<bioperl-l@bioperl.org>
44 rather than to the module maintainer directly. Many experienced and
45 reponsive experts will be able look at the problem and quickly
46 address it. Please include a thorough description of the problem
47 with code and data examples if at all possible.
51 Report bugs to the Bioperl bug tracking system to help us keep track
52 the bugs and their resolution. Bug reports can be submitted via the
55 http://bugzilla.open-bio.org/
57 =head1 AUTHORS - Aaron Mackey
59 Email: amackey@virginia.edu
63 The rest of the documentation details each of the object
64 methods. Internal methods are usually preceded with a _
68 # Let the code begin...
70 package Bio
::SeqIO
::exp;
71 use vars
qw(@ISA $READ_AVAIL);
75 use Bio::Seq::SeqFactory;
77 push @ISA, qw( Bio::SeqIO );
80 eval { require Bio
::SeqIO
::staden
::read; };
84 push @ISA, "Bio::SeqIO::staden::read";
91 $self->SUPER::_initialize
(@args);
92 if( ! defined $self->sequence_factory ) {
93 $self->sequence_factory(Bio
::Seq
::SeqFactory
->new(-verbose
=> $self->verbose(), -type
=> 'Bio::Seq::Quality'));
95 unless ($READ_AVAIL) {
96 Bio
::Root
::Root
->throw( -class => 'Bio::Root::SystemException',
97 -text
=> "Bio::SeqIO::staden::read is not available; make sure the bioperl-ext package has been installed successfully!"
105 Usage : $seq = $stream->next_seq()
106 Function: returns the next sequence in the stream
107 Returns : Bio::Seq::Quality object
116 my ($seq, $id, $desc, $qual) = $self->read_trace($self->_fh, 'exp');
118 # create the seq object
119 $seq = $self->sequence_factory->create(-seq
=> $seq,
132 Usage : $stream->write_seq(@seq)
133 Function: writes the $seq object into the stream
134 Returns : 1 for success and 0 for error
135 Args : Bio::Seq object
141 my ($self,@seq) = @_;
144 foreach my $seq (@seq) {
145 $self->write_trace($fh, $seq, 'exp');
148 $self->flush if $self->_flush_on_write && defined $self->_fh;