2 # BioPerl module for Bio::Seq::QualI
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Chad Matsalla <bioinformatics@dieselwurks.com
8 # Copyright Chad Matsalla
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
16 Bio::Seq::SeqWithQuality - Bioperl object packaging a sequence with its quality.
17 Deprecated class, use Bio::Seq::Quality instead!
22 use Bio::Seq::PrimaryQual;
23 use Bio::Seq::SeqWithQuality;
26 my $qual = Bio::Seq::SeqWithQuality->new
27 ( -qual => '10 20 30 40 50 50 20 10',
30 -accession_number => 'AL000012',
34 # first, make a PrimarySeq object
35 my $seqobj = Bio::PrimarySeq->new
37 -id => 'GeneFragment-12',
38 -accession_number => 'X78121',
42 # now make a PrimaryQual object
43 my $qualobj = Bio::Seq::PrimaryQual->new
44 ( -qual => '10 20 30 40 50 50 20 10',
45 -id => 'GeneFragment-12',
46 -accession_number => 'X78121',
50 # now make the SeqWithQuality object
51 my $swqobj = Bio::Seq::SeqWithQuality->new
57 $swqobj->id(); # the id of the SeqWithQuality object
58 # may not match the the id of the sequence or
59 # of the quality (check the pod, luke)
60 $swqobj->seq(); # the sequence of the SeqWithQuality object
61 $swqobj->qual(); # the quality of the SeqWithQuality object
63 # to get out parts of the sequence.
65 print "Sequence ", $seqobj->id(), " with accession ",
66 $seqobj->accession, " and desc ", $seqobj->desc, "\n";
68 $string2 = $seqobj->subseq(1,40);
72 This object stores base quality values together with the sequence string.
78 User feedback is an integral part of the evolution of this and other
79 Bioperl modules. Send your comments and suggestions preferably to one
80 of the Bioperl mailing lists. Your participation is much appreciated.
82 bioperl-l@bioperl.org - General discussion
83 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
87 Please direct usage questions or support issues to the mailing list:
89 I<bioperl-l@bioperl.org>
91 rather than to the module maintainer directly. Many experienced and
92 reponsive experts will be able look at the problem and quickly
93 address it. Please include a thorough description of the problem
94 with code and data examples if at all possible.
98 Report bugs to the Bioperl bug tracking system to help us keep track
99 the bugs and their resolution. Bug reports can be submitted via the
102 https://github.com/bioperl/bioperl-live/issues
104 =head1 AUTHOR - Chad Matsalla
106 Email bioinformatics@dieselwurks.com
110 Jason Stajich, jason@bioperl.org
114 The rest of the documentation details each of the object methods.
115 Internal methods are usually preceded with a _
120 package Bio
::Seq
::SeqWithQuality
;
125 use Bio
::Seq
::PrimaryQual
;
127 use base
qw(Bio::Root::Root Bio::PrimarySeqI Bio::Seq::QualI);
132 Usage : $qual = Bio::Seq::SeqWithQuality ->new
133 ( -qual => '10 20 30 40 50 50 20 10',
136 -accession_number => 'AL000012',
137 -trace_indices => '0 5 10 15 20 25 30 35'
139 Function: Returns a new Bio::Seq::SeqWithQual object from basic
141 Returns : a new Bio::Seq::PrimaryQual object
142 Args : -qual can be a quality string (see Bio::Seq::PrimaryQual for more
143 information on this) or a reference to a Bio::Seq::PrimaryQual
145 -seq can be a sequence string (see Bio::PrimarySeq for more
146 information on this) or a reference to a Bio::PrimaryQual object.
147 -seq, -id, -accession_number, -primary_id, -desc, -id behave like
149 1. if they are provided on construction of the
150 Bio::Seq::SeqWithQuality they will be set as the descriptors for
151 the object unless changed by one of the following mechanisms:
152 a) $obj->set_common_descriptors() is used and both the -seq and
153 the -qual object have the same descriptors. These common
154 descriptors will then become the descriptors for the
155 Bio::Seq::SeqWithQual object.
156 b) the descriptors are manually set using the seq(), id(),
157 desc(), or accession_number(), primary_id(),
158 2. if no descriptors are provided, the new() constructor will see
159 if the descriptor used in the PrimarySeq and in the
160 PrimaryQual objects match. If they do, they will become
161 the descriptors for the SeqWithQuality object.
162 To eliminate ambiguity, I strongly suggest you set the
163 descriptors manually on construction of the object. Really.
164 -trace_indices : a space_delimited list of trace indices
165 (where would the peaks be drawn if this list of qualities
171 my ($class, @args) = @_;
172 my $self = $class->SUPER::new
(@args);
173 # default: turn OFF the warnings
174 $self->{suppress_warnings
} = 1;
175 my($qual,$seq,$id,$acc,$pid,$desc,$given_id,$alphabet,$trace_indices) =
176 $self->_rearrange([qw( QUAL SEQ DISPLAY_ID ACCESSION_NUMBER PRIMARY_ID DESC
177 ID ALPHABET TRACE_INDICES )], @args);
179 if ( defined $id && defined $given_id ) {
180 if( $id ne $given_id ) {
181 $self->throw("Provided both id and display_id constructor functions. [$id] [$given_id]");
184 if( defined $given_id ) {
185 $self->display_id($given_id);
188 # Import sequence first
191 unless ($self->{suppress_warnings
} == 1) {
192 $self->warn("You did not provide sequence information during the ".
193 "construction of a Bio::Seq::SeqWithQuality object. Sequence ".
194 "components for this object will be empty.");
197 $self->throw("If you want me to create a PrimarySeq object for your ".
198 "empty sequence <boggle> you must specify a -alphabet to satisfy ".
199 "the constructor requirements for a Bio::PrimarySeq object with no ".
200 "sequence. Read the POD for it, luke.");
202 $self->{seq_ref
} = Bio
::PrimarySeq
->new( -seq
=> "",
203 -accession_number
=> $acc,
207 -alphabet
=> $alphabet );
208 } elsif ($seq->isa('Bio::PrimarySeqI') || $seq->isa('Bio::SeqI')) {
209 $self->{seq_ref
} = $seq;
210 } elsif (ref($seq)) {
211 $self->throw("You passed a seq argument into a SeqWithQUality object and".
212 " it was a reference ($seq) which did not inherit from Bio::SeqI or ".
213 "Bio::PrimarySeqI. I don't know what to do with this!");
215 my $seqobj = Bio
::PrimarySeq
->new( -seq
=> $seq,
216 -accession_number
=> $acc,
219 -display_id
=> $id );
220 $self->{seq_ref
} = $seqobj;
222 # Then import the quality scores
223 if (!defined($qual)) {
224 $self->{qual_ref
} = Bio
::Seq
::PrimaryQual
->new( -qual
=> "",
225 -accession_number
=> $acc,
228 -display_id
=> $id, );
229 } elsif (ref($qual) eq "Bio::Seq::PrimaryQual") {
230 $self->{qual_ref
} = $qual;
232 my $qualobj = Bio
::Seq
::PrimaryQual
->new( -qual
=> $qual,
233 -accession_number
=> $acc,
237 -trace_indices
=> $trace_indices );
238 $self->{qual_ref
} = $qualobj;
240 # Now try to set the descriptors for this object
241 $self->_set_descriptors($qual,$seq,$id,$acc,$pid,$desc,$given_id,$alphabet);
243 $self->deprecated("deprecated class - use Bio::Seq::Quality instead");
251 Usage : $common_id = $self->_common_id();
252 Function: Compare the display_id of {qual_ref} and {seq_ref}.
253 Returns : Nothing if they don't match. If they do return {seq_ref}->display_id()
261 return if (!$self->{seq_ref
} || !$self->{qual_ref
});
262 my $sid = $self->{seq_ref
}->display_id();
264 return if (!$self->{qual_ref
}->display_id());
265 return $sid if ($sid eq $self->{qual_ref
}->display_id());
266 # should this become a warning?
267 # print("ids $sid and $self->{qual_ref}->display_id() do not match. Bummer.\n");
270 =head2 _common_display_id()
273 Usage : $common_id = $self->_common_display_id();
274 Function: Compare the display_id of {qual_ref} and {seq_ref}.
275 Returns : Nothing if they don't match. If they do return {seq_ref}->display_id()
281 sub _common_display_id
{
286 =head2 _common_accession_number()
288 Title : _common_accession_number()
289 Usage : $common_id = $self->_common_accession_number();
290 Function: Compare the accession_number() of {qual_ref} and {seq_ref}.
291 Returns : Nothing if they don't match. If they do return {seq_ref}->accession_number()
297 sub _common_accession_number
{
299 return if ($self->{seq_ref
} || $self->{qual_ref
});
300 my $acc = $self->{seq_ref
}->accession_number();
301 # if (!$acc) { print("the seqref has no acc.\n"); }
303 # if ($acc eq $self->{qual_ref}->accession_number()) { print("$acc matches ".$self->{qual_ref}->accession_number()."\n"); }
304 return $acc if ($acc eq $self->{qual_ref
}->accession_number());
305 # should this become a warning?
306 # print("accession numbers $acc and $self->{qual_ref}->accession_number() do not match. Bummer.\n");
309 =head2 _common_primary_id()
311 Title : _common_primary_id()
312 Usage : $common_primard_id = $self->_common_primary_id();
313 Function: Compare the primary_id of {qual_ref} and {seq_ref}.
314 Returns : Nothing if they don't match. If they do return {seq_ref}->primary_id()
320 sub _common_primary_id
{
322 return if ($self->{seq_ref
} || $self->{qual_ref
});
323 my $pid = $self->{seq_ref
}->primary_id();
325 return $pid if ($pid eq $self->{qual_ref
}->primary_id());
326 # should this become a warning?
327 # print("primary_ids $pid and $self->{qual_ref}->primary_id() do not match. Bummer.\n");
330 =head2 _common_desc()
332 Title : _common_desc()
333 Usage : $common_desc = $self->_common_desc();
334 Function: Compare the desc of {qual_ref} and {seq_ref}.
335 Returns : Nothing if they don't match. If they do return {seq_ref}->desc()
343 return if ($self->{seq_ref
} || $self->{qual_ref
});
344 my $des = $self->{seq_ref
}->desc();
346 return $des if ($des eq $self->{qual_ref
}->desc());
347 # should this become a warning?
348 # print("descriptions $des and $self->{qual_ref}->desc() do not match. Bummer.\n");
351 =head2 set_common_descriptors()
353 Title : set_common_descriptors()
354 Usage : $self->set_common_descriptors();
355 Function: Compare the descriptors (id,accession_number,display_id,
356 primary_id, desc) for the PrimarySeq and PrimaryQual objects
357 within the SeqWithQuality object. If they match, make that
358 descriptor the descriptor for the SeqWithQuality object.
364 sub set_common_descriptors
{
366 return if ($self->{seq_ref
} || $self->{qual_ref
});
368 &_common_display_id
();
369 &_common_accession_number
();
370 &_common_primary_id
();
377 Usage : $molecule_type = $obj->alphabet();
378 Function: Get the molecule type from the PrimarySeq object.
379 Returns : What what PrimarySeq says the type of the sequence is.
386 return $self->{seq_ref
}->alphabet();
392 Usage : $id_string = $obj->display_id();
393 Function: Returns the display id, aka the common name of the Quality object.
394 The semantics of this is that it is the most likely string to be
395 used as an identifier of the quality sequence, and likely to have
396 "human" readability. The id is equivalent to the ID field of the
397 GenBank/EMBL databanks and the id field of the Swissprot/sptrembl
398 database. In fasta format, the >(\S+) is presumed to be the id,
399 though some people overload the id to embed other information.
400 Bioperl does not use any embedded information in the ID field,
401 and people are encouraged to use other mechanisms (accession
402 field for example, or extending the sequence object) to solve
403 this. Notice that $seq->id() maps to this function, mainly for
404 legacy/convience issues.
405 This method sets the display_id for the SeqWithQuality object.
407 Args : If a scalar is provided, it is set as the new display_id for
408 the SeqWithQuality object.
414 my ($obj,$value) = @_;
415 if( defined $value) {
416 $obj->{'display_id'} = $value;
418 return $obj->{'display_id'};
422 =head2 accession_number()
424 Title : accession_number()
425 Usage : $unique_biological_key = $obj->accession_number();
426 Function: Returns the unique biological id for a sequence, commonly
427 called the accession_number. For sequences from established
428 databases, the implementors should try to use the correct
429 accession number. Notice that primary_id() provides the unique id
430 for the implementation, allowing multiple objects to have the same
431 accession number in a particular implementation. For sequences
432 with no accession number, this method should return "unknown".
433 This method sets the accession_number for the SeqWithQuality
435 Returns : A string (the value of accession_number)
436 Args : If a scalar is provided, it is set as the new accession_number
437 for the SeqWithQuality object.
442 sub accession_number
{
443 my( $obj, $acc ) = @_;
446 $obj->{'accession_number'} = $acc;
448 $acc = $obj->{'accession_number'};
449 $acc = 'unknown' unless defined $acc;
457 Usage : $unique_implementation_key = $obj->primary_id();
458 Function: Returns the unique id for this object in this implementation.
459 This allows implementations to manage their own object ids in a
460 way the implementation can control clients can expect one id to
461 map to one object. For sequences with no accession number, this
462 method should return a stringified memory location.
463 This method sets the primary_id for the SeqWithQuality object.
464 Returns : A string. (the value of primary_id)
465 Args : If a scalar is provided, it is set as the new primary_id for
466 the SeqWithQuality object.
471 my ($obj,$value) = @_;
473 $obj->{'primary_id'} = $value;
475 return $obj->{'primary_id'};
482 Usage : $qual->desc($newval); _or_
483 $description = $qual->desc();
484 Function: Get/set description text for this SeqWithQuality object.
485 Returns : A string. (the value of desc)
486 Args : If a scalar is provided, it is set as the new desc for the
487 SeqWithQuality object.
492 # a mechanism to set the disc for the SeqWithQuality object.
493 # probably will be used most often by set_common_features()
494 my ($obj,$value) = @_;
495 if( defined $value) {
496 $obj->{'desc'} = $value;
498 return $obj->{'desc'};
504 Usage : $id = $qual->id();
505 Function: Return the ID of the quality. This should normally be (and
506 actually is in the implementation provided here) just a synonym
508 Returns : A string. (the value of id)
509 Args : If a scalar is provided, it is set as the new id for the
510 SeqWithQuality object.
515 my ($self,$value) = @_;
516 if (!$self) { $self->throw("no value for self in $value"); }
517 if( defined $value ) {
518 return $self->display_id($value);
520 return $self->display_id();
526 Usage : $string = $obj->seq(); _or_ $obj->seq("atctatcatca");
527 Function: Returns the sequence that is contained in the imbedded in the
528 PrimarySeq object within the SeqWithQuality object
529 Returns : A scalar (the seq() value for the imbedded PrimarySeq object.)
530 Args : If a scalar is provided, the SeqWithQuality object will
531 attempt to set that as the sequence for the imbedded PrimarySeq
532 object. Otherwise, the value of seq() for the PrimarySeq object
534 Notes : This is probably not a good idea because you then should call
535 length() to make sure that the sequence and quality are of the
536 same length. Even then, how can you make sure that this sequence
537 belongs with that quality? I provided this to give you rope to
538 hang yourself with. Tie it to a strong device and use a good
544 my ($self,$value) = @_;
545 if( defined $value) {
546 $self->{seq_ref
}->seq($value);
549 return $self->{seq_ref
}->seq();
555 Usage : @quality_values = @{$obj->qual()}; _or_
556 $obj->qual("10 10 20 40 50");
557 Function: Returns the quality as imbedded in the PrimaryQual object
558 within the SeqWithQuality object.
559 Returns : A reference to an array containing the quality values in the
561 Args : If a scalar is provided, the SeqWithQuality object will
562 attempt to set that as the quality for the imbedded PrimaryQual
563 object. Otherwise, the value of qual() for the PrimaryQual
565 Notes : This is probably not a good idea because you then should call
566 length() to make sure that the sequence and quality are of the
567 same length. Even then, how can you make sure that this sequence
568 belongs with that quality? I provided this to give you a strong
569 board with which to flagellate yourself.
574 my ($self,$value) = @_;
576 if( defined $value) {
577 $self->{qual_ref
}->qual($value);
581 return $self->{qual_ref
}->qual();
586 =head2 trace_indices()
588 Title : trace_indices()
589 Usage : @trace_indice_values = @{$obj->trace_indices()}; _or_
590 $obj->trace_indices("10 10 20 40 50");
591 Function: Returns the trace_indices as imbedded in the Primaryqual object
592 within the SeqWithQualiity object.
593 Returns : A reference to an array containing the trace_indice values in the
595 Args : If a scalar is provided, the SeqWithuQuality object will
596 attempt to set that as the trace_indices for the imbedded PrimaryQual
597 object. Otherwise, the value of trace_indices() for the PrimaryQual
599 Notes : This is probably not a good idea because you then should call
600 length() to make sure that the sequence and trace_indices are of the
601 same length. Even then, how can you make sure that this sequence
602 belongs with that trace_indicex? I provided this to give you a strong
603 board with which to flagellate yourself.
608 my ($self,$value) = @_;
610 if( defined $value) {
611 $self->{qual_ref
}->trace_indices($value);
615 return $self->{qual_ref
}->trace_indices();
624 Usage : $length = $seqWqual->length();
625 Function: Get the length of the SeqWithQuality sequence/quality.
626 Returns : Returns the length of the sequence and quality if they are
627 both the same. Returns "DIFFERENT" if they differ.
634 if (!$self->{seq_ref
}) {
635 unless ($self->{suppress_warnings
} == 1) {
636 $self->warn("Can't find {seq_ref} here in length().");
640 if (!$self->{qual_ref
}) {
641 unless ($self->{suppress_warnings
} == 1) {
642 $self->warn("Can't find {qual_ref} here in length().");
646 my $seql = $self->{seq_ref
}->length();
648 if ($seql != $self->{qual_ref
}->length()) {
649 unless ($self->{suppress_warnings
} == 1) {
650 $self->warn("Sequence length (".$seql.") is different from quality ".
651 "length (".$self->{qual_ref
}->length().") in the SeqWithQuality ".
652 "object. This can only lead to problems later.");
654 $self->{'length'} = "DIFFERENT";
656 $self->{'length'} = $seql;
658 return $self->{'length'};
664 Title : qual_obj($different_obj)
665 Usage : $qualobj = $seqWqual->qual_obj(); _or_
666 $qualobj = $seqWqual->qual_obj($ref_to_primaryqual_obj);
667 Function: Get the PrimaryQual object that is imbedded in the
668 SeqWithQuality object or if a reference to a PrimaryQual object
669 is provided, set this as the PrimaryQual object imbedded in the
670 SeqWithQuality object.
671 Returns : A reference to a Bio::Seq::SeqWithQuality object.
676 my ($self,$value) = @_;
677 if (defined($value)) {
678 if (ref($value) eq "Bio::Seq::PrimaryQual") {
679 $self->{qual_ref
} = $value;
680 $self->debug("You successfully changed the PrimaryQual object within ".
681 "a SeqWithQuality object. ID's for the SeqWithQuality object may ".
682 "now not be what you expect. Use something like ".
683 "set_common_descriptors() to fix them if you care,");
685 $self->debug("You tried to change the PrimaryQual object within a ".
686 "SeqWithQuality object but you passed a reference to an object that".
687 " was not a Bio::Seq::PrimaryQual object. Thus your change failed. ".
691 return $self->{qual_ref
};
698 Usage : $seqobj = $seqWqual->qual_obj(); _or_
699 $seqobj = $seqWqual->seq_obj($ref_to_primary_seq_obj);
700 Function: Get the PrimarySeq object that is imbedded in the
701 SeqWithQuality object or if a reference to a PrimarySeq object is
702 provided, set this as the PrimarySeq object imbedded in the
703 SeqWithQuality object.
704 Returns : A reference to a Bio::PrimarySeq object.
709 my ($self,$value) = @_;
710 if( defined $value) {
711 if (ref($value) eq "Bio::PrimarySeq") {
712 $self->debug("You successfully changed the PrimarySeq object within a".
713 " SeqWithQuality object. ID's for the SeqWithQuality object may now".
714 " not be what you expect. Use something like ".
715 "set_common_descriptors() to fix them if you care,");
717 $self->debug("You tried to change the PrimarySeq object within a ".
718 "SeqWithQuality object but you passed a reference to an object that".
719 " was not a Bio::PrimarySeq object. Thus your change failed. Sorry.\n");
722 return $self->{seq_ref
};
725 =head2 _set_descriptors
727 Title : _set_descriptors()
728 Usage : $seqWqual->_qual_obj($qual,$seq,$id,$acc,$pid,$desc,$given_id,
730 Function: Set the descriptors for the SeqWithQuality object. Try to
731 match the descriptors in the PrimarySeq object and in the
732 PrimaryQual object if descriptors were not provided with
735 Args : $qual,$seq,$id,$acc,$pid,$desc,$given_id,$alphabet as found
737 Notes : Really only intended to be called by the new() method. If
738 you want to invoke a similar function try set_common_descriptors().
743 sub _set_descriptors
{
744 my ($self,$qual,$seq,$id,$acc,$pid,$desc,$given_id,$alphabet) = @_;
745 my ($c_id,$c_acc,$c_pid,$c_desc);
746 if (!$self->display_id()) {
747 if ($c_id = $self->_common_id() ) { $self->display_id($c_id); }
749 if ($self->{seq_ref
}) {
750 # print("Using seq_ref to set id to ".$self->{seq_ref}->display_id()."\n");
751 # ::dumpValue($self->{seq_ref});
752 $self->display_id($self->{seq_ref
}->id());
753 } elsif ($self->{qual_ref
}) {
754 $self->display_id($self->{qual_ref
}->id());
758 if ($acc) { $self->accession_number($acc); }
759 elsif ($c_acc = $self->_common_accession_number() ) { $self->accession_number($c_acc); }
760 if ($pid) { $self->primary_id($pid); }
761 elsif ($c_pid = $self->_common_primary_id() ) { $self->primary_id($c_pid); }
762 if ($desc) { $self->desc($desc); }
763 elsif ($c_desc = $self->_common_desc() ) { $self->desc($c_desc); }
766 =head2 subseq($start,$end)
768 Title : subseq($start,$end)
769 Usage : $subsequence = $obj->subseq($start,$end);
770 Function: Returns the subseq from start to end, where the first base
771 is 1 and the number is inclusive, ie 1-2 are the first two
772 bases of the sequence.
774 Args : Two positions.
779 my ($self,@args) = @_;
780 # does a single value work?
781 return $self->{seq_ref
}->subseq(@args);
784 =head2 baseat($position)
786 Title : baseat($position)
787 Usage : $base_at_position_6 = $obj->baseat("6");
788 Function: Returns a single base at the given position, where the first
789 base is 1 and the number is inclusive, ie 1-2 are the first two
790 bases of the sequence.
797 my ($self,$val) = @_;
798 return $self->{seq_ref
}->subseq($val,$val);
801 =head2 subqual($start,$end)
803 Title : subqual($start,$end)
804 Usage : @qualities = @{$obj->subqual(10,20);
805 Function: returns the quality values from $start to $end, where the
806 first value is 1 and the number is inclusive, ie 1-2 are the
807 first two bases of the sequence. Start cannot be larger than
808 end but can be equal.
809 Returns : A reference to an array.
810 Args : a start position and an end position
815 my ($self,@args) = @_;
816 return $self->{qual_ref
}->subqual(@args);
819 =head2 qualat($position)
821 Title : qualat($position)
822 Usage : $quality = $obj->qualat(10);
823 Function: Return the quality value at the given location, where the
824 first value is 1 and the number is inclusive, ie 1-2 are the
825 first two bases of the sequence. Start cannot be larger than
826 end but can be equal.
833 my ($self,$val) = @_;
834 return $self->{qual_ref
}->qualat($val);
837 =head2 sub_trace_index($start,$end)
839 Title : sub_trace_index($start,$end)
840 Usage : @trace_indices = @{$obj->sub_trace_index(10,20);
841 Function: returns the trace index values from $start to $end, where the
842 first value is 1 and the number is inclusive, ie 1-2 are the
843 first two bases of the sequence. Start cannot be larger than
844 end but can be e_trace_index.
845 Returns : A reference to an array.
846 Args : a start position and an end position
850 sub sub_trace_index
{
851 my ($self,@args) = @_;
852 return $self->{qual_ref
}->sub_trace_index(@args);
855 =head2 trace_index_at($position)
857 Title : trace_index_at($position)
858 Usage : $trace_index = $obj->trace_index_at(10);
859 Function: Return the trace_index value at the given location, where the
860 first value is 1 and the number is inclusive, ie 1-2 are the
861 first two bases of the sequence. Start cannot be larger than
862 end but can be etrace_index_.
869 my ($self,$val) = @_;
870 return $self->{qual_ref
}->trace_index_at($val);
876 Usage : $quality = $obj->to_string();
877 Function: Return a textual representation of what the object contains.
878 For this module, this function will return:
894 my ($self,$out,$result) = shift;
895 $out = "qual: ".join(',',@
{$self->qual()})."\n";
896 foreach (qw(seq display_id accession_number primary_id desc id)) {
897 $result = $self->$_();
898 if (!$result) { $result = "<unset>"; }
899 $out .= "$_: $result\n";