~ubuntu-branches/ubuntu/karmic/bioperl/karmic

« back to all changes in this revision

Viewing changes to Bio/Seq/SeqWithQuality.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: SeqWithQuality.pm,v 1.18 2003/03/31 11:35:28 heikki Exp $
 
1
# $Id: SeqWithQuality.pm,v 1.27.4.1 2006/10/02 23:10:27 sendu Exp $
2
2
#
3
3
# BioPerl module for Bio::Seq::QualI
4
4
#
18
18
 
19
19
        use Bio::PrimarySeq;
20
20
        use Bio::Seq::PrimaryQual;
 
21
        use Bio::Seq::SeqWithQuality;
21
22
 
22
23
                # make from memory
23
24
        my $qual = Bio::Seq::SeqWithQuality->new
76
77
Bioperl modules. Send your comments and suggestions preferably to one
77
78
of the Bioperl mailing lists.  Your participation is much appreciated.
78
79
 
79
 
  bioperl-l@bioperl.org             - General discussion
80
 
  http://bio.perl.org/MailList.html - About the mailing lists
 
80
  bioperl-l@bioperl.org                  - General discussion
 
81
  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists
81
82
 
82
83
=head2 Reporting Bugs
83
84
 
84
85
Report bugs to the Bioperl bug tracking system to help us keep track
85
 
the bugs and their resolution.  Bug reports can be submitted via email
86
 
or the web:
 
86
the bugs and their resolution.  Bug reports can be submitted via the
 
87
web:
87
88
 
88
 
  bioperl-bugs@bio.perl.org
89
 
  http://bugzilla.bioperl.org/
 
89
  http://bugzilla.open-bio.org/
90
90
 
91
91
=head1 AUTHOR - Chad Matsalla
92
92
 
106
106
 
107
107
package Bio::Seq::SeqWithQuality;
108
108
 
109
 
use vars qw(@ISA);
110
109
 
111
110
use strict;
112
 
use Bio::Root::Root;
113
 
use Bio::Seq::QualI;
114
 
use Bio::PrimarySeqI;
115
111
use Bio::PrimarySeq;
116
112
use Bio::Seq::PrimaryQual;
117
113
 
118
 
@ISA = qw(Bio::Root::Root Bio::PrimarySeqI Bio::Seq::QualI);
 
114
use base qw(Bio::Root::Root Bio::PrimarySeqI Bio::Seq::QualI);
119
115
 
120
116
=head2 new()
121
117
 
206
202
             -alphabet          =>  $alphabet
207
203
             );
208
204
    }
209
 
    elsif (ref($seq) eq "Bio::PrimarySeq" ) {
 
205
    elsif (UNIVERSAL::isa($seq,"Bio::PrimarySeq") ||  UNIVERSAL::isa($seq,"Bio::Seq")) {
210
206
        $self->{seq_ref} = $seq;
211
207
    }
 
208
        elsif (ref($seq)) {
 
209
                $self->throw("You passed a seq argument into a SeqWithQUality object and it was a reference ($seq) which did not inherit from Bio::Seq or Bio::PrimarySeq. I don't know what to do with this.");
 
210
        }
212
211
 
213
212
    else {
214
213
        my $seqobj = Bio::PrimarySeq->new
222
221
        $self->{seq_ref} = $seqobj;
223
222
    }
224
223
 
225
 
    if (!$qual) {
 
224
    if (!defined($qual)) {
226
225
        $self->{qual_ref} = Bio::Seq::PrimaryQual->new
227
226
            (
228
227
             -qual              =>      "",
251
250
    # now try to set the descriptors for this object
252
251
    $self->_set_descriptors($qual,$seq,$id,$acc,$pid,$desc,$given_id,$alphabet);
253
252
    $self->length();
 
253
    $self->deprecated("deprecated class- use Bio::Seq::Quality instead");
254
254
 
255
255
    return $self;
256
256
}