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
;
127 use Bio
::Seq
::PrimaryQual
;
129 use base
qw(Bio::Root::Root Bio::PrimarySeqI Bio::Seq::QualI);
134 Usage : $qual = Bio::Seq::SeqWithQuality ->new
135 ( -qual => '10 20 30 40 50 50 20 10',
138 -accession_number => 'AL000012',
139 -trace_indices => '0 5 10 15 20 25 30 35'
141 Function: Returns a new Bio::Seq::SeqWithQual object from basic
143 Returns : a new Bio::Seq::PrimaryQual object
144 Args : -qual can be a quality string (see Bio::Seq::PrimaryQual for more
145 information on this) or a reference to a Bio::Seq::PrimaryQual
147 -seq can be a sequence string (see Bio::PrimarySeq for more
148 information on this) or a reference to a Bio::PrimaryQual object.
149 -seq, -id, -accession_number, -primary_id, -desc, -id behave like
151 1. if they are provided on construction of the
152 Bio::Seq::SeqWithQuality they will be set as the descriptors for
153 the object unless changed by one of the following mechanisms:
154 a) $obj->set_common_descriptors() is used and both the -seq and
155 the -qual object have the same descriptors. These common
156 descriptors will then become the descriptors for the
157 Bio::Seq::SeqWithQual object.
158 b) the descriptors are manually set using the seq(), id(),
159 desc(), or accession_number(), primary_id(),
160 2. if no descriptors are provided, the new() constructor will see
161 if the descriptor used in the PrimarySeq and in the
162 PrimaryQual objects match. If they do, they will become
163 the descriptors for the SeqWithQuality object.
164 To eliminate ambiguity, I strongly suggest you set the
165 descriptors manually on construction of the object. Really.
166 -trace_indices : a space_delimited list of trace indices
167 (where would the peaks be drawn if this list of qualities
173 Carp
::carp
('Bio::Seq::SeqWithQuality is deprecated.'
174 . ' Use Bio::Seq::Quality instead');
176 my ($class, @args) = @_;
177 my $self = $class->SUPER::new
(@args);
178 # default: turn OFF the warnings
179 $self->{suppress_warnings
} = 1;
180 my($qual,$seq,$id,$acc,$pid,$desc,$given_id,$alphabet,$trace_indices) =
181 $self->_rearrange([qw( QUAL SEQ DISPLAY_ID ACCESSION_NUMBER PRIMARY_ID DESC
182 ID ALPHABET TRACE_INDICES )], @args);
184 if ( defined $id && defined $given_id ) {
185 if( $id ne $given_id ) {
186 $self->throw("Provided both id and display_id constructor functions. [$id] [$given_id]");
189 if( defined $given_id ) {
190 $self->display_id($given_id);
193 # Import sequence first
196 unless ($self->{suppress_warnings
} == 1) {
197 $self->warn("You did not provide sequence information during the ".
198 "construction of a Bio::Seq::SeqWithQuality object. Sequence ".
199 "components for this object will be empty.");
202 $self->throw("If you want me to create a PrimarySeq object for your ".
203 "empty sequence <boggle> you must specify a -alphabet to satisfy ".
204 "the constructor requirements for a Bio::PrimarySeq object with no ".
205 "sequence. Read the POD for it, luke.");
207 $self->{seq_ref
} = Bio
::PrimarySeq
->new( -seq
=> "",
208 -accession_number
=> $acc,
212 -alphabet
=> $alphabet );
213 } elsif ($seq->isa('Bio::PrimarySeqI') || $seq->isa('Bio::SeqI')) {
214 $self->{seq_ref
} = $seq;
215 } elsif (ref($seq)) {
216 $self->throw("You passed a seq argument into a SeqWithQUality object and".
217 " it was a reference ($seq) which did not inherit from Bio::SeqI or ".
218 "Bio::PrimarySeqI. I don't know what to do with this!");
220 my $seqobj = Bio
::PrimarySeq
->new( -seq
=> $seq,
221 -accession_number
=> $acc,
224 -display_id
=> $id );
225 $self->{seq_ref
} = $seqobj;
227 # Then import the quality scores
228 if (!defined($qual)) {
229 $self->{qual_ref
} = Bio
::Seq
::PrimaryQual
->new( -qual
=> "",
230 -accession_number
=> $acc,
233 -display_id
=> $id, );
234 } elsif (ref($qual) eq "Bio::Seq::PrimaryQual") {
235 $self->{qual_ref
} = $qual;
237 my $qualobj = Bio
::Seq
::PrimaryQual
->new( -qual
=> $qual,
238 -accession_number
=> $acc,
242 -trace_indices
=> $trace_indices );
243 $self->{qual_ref
} = $qualobj;
245 # Now try to set the descriptors for this object
246 $self->_set_descriptors($qual,$seq,$id,$acc,$pid,$desc,$given_id,$alphabet);
255 Usage : $common_id = $self->_common_id();
256 Function: Compare the display_id of {qual_ref} and {seq_ref}.
257 Returns : Nothing if they don't match. If they do return {seq_ref}->display_id()
265 return if (!$self->{seq_ref
} || !$self->{qual_ref
});
266 my $sid = $self->{seq_ref
}->display_id();
268 return if (!$self->{qual_ref
}->display_id());
269 return $sid if ($sid eq $self->{qual_ref
}->display_id());
270 # should this become a warning?
271 # print("ids $sid and $self->{qual_ref}->display_id() do not match. Bummer.\n");
274 =head2 _common_display_id()
277 Usage : $common_id = $self->_common_display_id();
278 Function: Compare the display_id of {qual_ref} and {seq_ref}.
279 Returns : Nothing if they don't match. If they do return {seq_ref}->display_id()
285 sub _common_display_id
{
290 =head2 _common_accession_number()
292 Title : _common_accession_number()
293 Usage : $common_id = $self->_common_accession_number();
294 Function: Compare the accession_number() of {qual_ref} and {seq_ref}.
295 Returns : Nothing if they don't match. If they do return {seq_ref}->accession_number()
301 sub _common_accession_number
{
303 return if ($self->{seq_ref
} || $self->{qual_ref
});
304 my $acc = $self->{seq_ref
}->accession_number();
305 # if (!$acc) { print("the seqref has no acc.\n"); }
307 # if ($acc eq $self->{qual_ref}->accession_number()) { print("$acc matches ".$self->{qual_ref}->accession_number()."\n"); }
308 return $acc if ($acc eq $self->{qual_ref
}->accession_number());
309 # should this become a warning?
310 # print("accession numbers $acc and $self->{qual_ref}->accession_number() do not match. Bummer.\n");
313 =head2 _common_primary_id()
315 Title : _common_primary_id()
316 Usage : $common_primard_id = $self->_common_primary_id();
317 Function: Compare the primary_id of {qual_ref} and {seq_ref}.
318 Returns : Nothing if they don't match. If they do return {seq_ref}->primary_id()
324 sub _common_primary_id
{
326 return if ($self->{seq_ref
} || $self->{qual_ref
});
327 my $pid = $self->{seq_ref
}->primary_id();
329 return $pid if ($pid eq $self->{qual_ref
}->primary_id());
330 # should this become a warning?
331 # print("primary_ids $pid and $self->{qual_ref}->primary_id() do not match. Bummer.\n");
334 =head2 _common_desc()
336 Title : _common_desc()
337 Usage : $common_desc = $self->_common_desc();
338 Function: Compare the desc of {qual_ref} and {seq_ref}.
339 Returns : Nothing if they don't match. If they do return {seq_ref}->desc()
347 return if ($self->{seq_ref
} || $self->{qual_ref
});
348 my $des = $self->{seq_ref
}->desc();
350 return $des if ($des eq $self->{qual_ref
}->desc());
351 # should this become a warning?
352 # print("descriptions $des and $self->{qual_ref}->desc() do not match. Bummer.\n");
355 =head2 set_common_descriptors()
357 Title : set_common_descriptors()
358 Usage : $self->set_common_descriptors();
359 Function: Compare the descriptors (id,accession_number,display_id,
360 primary_id, desc) for the PrimarySeq and PrimaryQual objects
361 within the SeqWithQuality object. If they match, make that
362 descriptor the descriptor for the SeqWithQuality object.
368 sub set_common_descriptors
{
370 return if ($self->{seq_ref
} || $self->{qual_ref
});
372 &_common_display_id
();
373 &_common_accession_number
();
374 &_common_primary_id
();
381 Usage : $molecule_type = $obj->alphabet();
382 Function: Get the molecule type from the PrimarySeq object.
383 Returns : What what PrimarySeq says the type of the sequence is.
390 return $self->{seq_ref
}->alphabet();
396 Usage : $id_string = $obj->display_id();
397 Function: Returns the display id, aka the common name of the Quality object.
398 The semantics of this is that it is the most likely string to be
399 used as an identifier of the quality sequence, and likely to have
400 "human" readability. The id is equivalent to the ID field of the
401 GenBank/EMBL databanks and the id field of the Swissprot/sptrembl
402 database. In fasta format, the >(\S+) is presumed to be the id,
403 though some people overload the id to embed other information.
404 Bioperl does not use any embedded information in the ID field,
405 and people are encouraged to use other mechanisms (accession
406 field for example, or extending the sequence object) to solve
407 this. Notice that $seq->id() maps to this function, mainly for
408 legacy/convience issues.
409 This method sets the display_id for the SeqWithQuality object.
411 Args : If a scalar is provided, it is set as the new display_id for
412 the SeqWithQuality object.
418 my ($obj,$value) = @_;
419 if( defined $value) {
420 $obj->{'display_id'} = $value;
422 return $obj->{'display_id'};
426 =head2 accession_number()
428 Title : accession_number()
429 Usage : $unique_biological_key = $obj->accession_number();
430 Function: Returns the unique biological id for a sequence, commonly
431 called the accession_number. For sequences from established
432 databases, the implementors should try to use the correct
433 accession number. Notice that primary_id() provides the unique id
434 for the implementation, allowing multiple objects to have the same
435 accession number in a particular implementation. For sequences
436 with no accession number, this method should return "unknown".
437 This method sets the accession_number for the SeqWithQuality
439 Returns : A string (the value of accession_number)
440 Args : If a scalar is provided, it is set as the new accession_number
441 for the SeqWithQuality object.
446 sub accession_number
{
447 my( $obj, $acc ) = @_;
450 $obj->{'accession_number'} = $acc;
452 $acc = $obj->{'accession_number'};
453 $acc = 'unknown' unless defined $acc;
461 Usage : $unique_implementation_key = $obj->primary_id();
462 Function: Returns the unique id for this object in this implementation.
463 This allows implementations to manage their own object ids in a
464 way the implementation can control clients can expect one id to
465 map to one object. For sequences with no accession number, this
466 method should return a stringified memory location.
467 This method sets the primary_id for the SeqWithQuality object.
468 Returns : A string. (the value of primary_id)
469 Args : If a scalar is provided, it is set as the new primary_id for
470 the SeqWithQuality object.
475 my ($obj,$value) = @_;
477 $obj->{'primary_id'} = $value;
479 return $obj->{'primary_id'};
486 Usage : $qual->desc($newval); _or_
487 $description = $qual->desc();
488 Function: Get/set description text for this SeqWithQuality object.
489 Returns : A string. (the value of desc)
490 Args : If a scalar is provided, it is set as the new desc for the
491 SeqWithQuality object.
496 # a mechanism to set the disc for the SeqWithQuality object.
497 # probably will be used most often by set_common_features()
498 my ($obj,$value) = @_;
499 if( defined $value) {
500 $obj->{'desc'} = $value;
502 return $obj->{'desc'};
508 Usage : $id = $qual->id();
509 Function: Return the ID of the quality. This should normally be (and
510 actually is in the implementation provided here) just a synonym
512 Returns : A string. (the value of id)
513 Args : If a scalar is provided, it is set as the new id for the
514 SeqWithQuality object.
519 my ($self,$value) = @_;
520 if (!$self) { $self->throw("no value for self in $value"); }
521 if( defined $value ) {
522 return $self->display_id($value);
524 return $self->display_id();
530 Usage : $string = $obj->seq(); _or_ $obj->seq("atctatcatca");
531 Function: Returns the sequence that is contained in the imbedded in the
532 PrimarySeq object within the SeqWithQuality object
533 Returns : A scalar (the seq() value for the imbedded PrimarySeq object.)
534 Args : If a scalar is provided, the SeqWithQuality object will
535 attempt to set that as the sequence for the imbedded PrimarySeq
536 object. Otherwise, the value of seq() for the PrimarySeq object
538 Notes : This is probably not a good idea because you then should call
539 length() to make sure that the sequence and quality are of the
540 same length. Even then, how can you make sure that this sequence
541 belongs with that quality? I provided this to give you rope to
542 hang yourself with. Tie it to a strong device and use a good
548 my ($self,$value) = @_;
549 if( defined $value) {
550 $self->{seq_ref
}->seq($value);
553 return $self->{seq_ref
}->seq();
559 Usage : @quality_values = @{$obj->qual()}; _or_
560 $obj->qual("10 10 20 40 50");
561 Function: Returns the quality as imbedded in the PrimaryQual object
562 within the SeqWithQuality object.
563 Returns : A reference to an array containing the quality values in the
565 Args : If a scalar is provided, the SeqWithQuality object will
566 attempt to set that as the quality for the imbedded PrimaryQual
567 object. Otherwise, the value of qual() for the PrimaryQual
569 Notes : This is probably not a good idea because you then should call
570 length() to make sure that the sequence and quality are of the
571 same length. Even then, how can you make sure that this sequence
572 belongs with that quality? I provided this to give you a strong
573 board with which to flagellate yourself.
578 my ($self,$value) = @_;
580 if( defined $value) {
581 $self->{qual_ref
}->qual($value);
585 return $self->{qual_ref
}->qual();
590 =head2 trace_indices()
592 Title : trace_indices()
593 Usage : @trace_indice_values = @{$obj->trace_indices()}; _or_
594 $obj->trace_indices("10 10 20 40 50");
595 Function: Returns the trace_indices as imbedded in the Primaryqual object
596 within the SeqWithQualiity object.
597 Returns : A reference to an array containing the trace_indice values in the
599 Args : If a scalar is provided, the SeqWithuQuality object will
600 attempt to set that as the trace_indices for the imbedded PrimaryQual
601 object. Otherwise, the value of trace_indices() for the PrimaryQual
603 Notes : This is probably not a good idea because you then should call
604 length() to make sure that the sequence and trace_indices are of the
605 same length. Even then, how can you make sure that this sequence
606 belongs with that trace_indicex? I provided this to give you a strong
607 board with which to flagellate yourself.
612 my ($self,$value) = @_;
614 if( defined $value) {
615 $self->{qual_ref
}->trace_indices($value);
619 return $self->{qual_ref
}->trace_indices();
628 Usage : $length = $seqWqual->length();
629 Function: Get the length of the SeqWithQuality sequence/quality.
630 Returns : Returns the length of the sequence and quality if they are
631 both the same. Returns "DIFFERENT" if they differ.
638 if (!$self->{seq_ref
}) {
639 unless ($self->{suppress_warnings
} == 1) {
640 $self->warn("Can't find {seq_ref} here in length().");
644 if (!$self->{qual_ref
}) {
645 unless ($self->{suppress_warnings
} == 1) {
646 $self->warn("Can't find {qual_ref} here in length().");
650 my $seql = $self->{seq_ref
}->length();
652 if ($seql != $self->{qual_ref
}->length()) {
653 unless ($self->{suppress_warnings
} == 1) {
654 $self->warn("Sequence length (".$seql.") is different from quality ".
655 "length (".$self->{qual_ref
}->length().") in the SeqWithQuality ".
656 "object. This can only lead to problems later.");
658 $self->{'length'} = "DIFFERENT";
660 $self->{'length'} = $seql;
662 return $self->{'length'};
668 Title : qual_obj($different_obj)
669 Usage : $qualobj = $seqWqual->qual_obj(); _or_
670 $qualobj = $seqWqual->qual_obj($ref_to_primaryqual_obj);
671 Function: Get the PrimaryQual object that is imbedded in the
672 SeqWithQuality object or if a reference to a PrimaryQual object
673 is provided, set this as the PrimaryQual object imbedded in the
674 SeqWithQuality object.
675 Returns : A reference to a Bio::Seq::SeqWithQuality object.
680 my ($self,$value) = @_;
681 if (defined($value)) {
682 if (ref($value) eq "Bio::Seq::PrimaryQual") {
683 $self->{qual_ref
} = $value;
684 $self->debug("You successfully changed the PrimaryQual object within ".
685 "a SeqWithQuality object. ID's for the SeqWithQuality object may ".
686 "now not be what you expect. Use something like ".
687 "set_common_descriptors() to fix them if you care,");
689 $self->debug("You tried to change the PrimaryQual object within a ".
690 "SeqWithQuality object but you passed a reference to an object that".
691 " was not a Bio::Seq::PrimaryQual object. Thus your change failed. ".
695 return $self->{qual_ref
};
702 Usage : $seqobj = $seqWqual->qual_obj(); _or_
703 $seqobj = $seqWqual->seq_obj($ref_to_primary_seq_obj);
704 Function: Get the PrimarySeq object that is imbedded in the
705 SeqWithQuality object or if a reference to a PrimarySeq object is
706 provided, set this as the PrimarySeq object imbedded in the
707 SeqWithQuality object.
708 Returns : A reference to a Bio::PrimarySeq object.
713 my ($self,$value) = @_;
714 if( defined $value) {
715 if (ref($value) eq "Bio::PrimarySeq") {
716 $self->debug("You successfully changed the PrimarySeq object within a".
717 " SeqWithQuality object. ID's for the SeqWithQuality object may now".
718 " not be what you expect. Use something like ".
719 "set_common_descriptors() to fix them if you care,");
721 $self->debug("You tried to change the PrimarySeq object within a ".
722 "SeqWithQuality object but you passed a reference to an object that".
723 " was not a Bio::PrimarySeq object. Thus your change failed. Sorry.\n");
726 return $self->{seq_ref
};
729 =head2 _set_descriptors
731 Title : _set_descriptors()
732 Usage : $seqWqual->_qual_obj($qual,$seq,$id,$acc,$pid,$desc,$given_id,
734 Function: Set the descriptors for the SeqWithQuality object. Try to
735 match the descriptors in the PrimarySeq object and in the
736 PrimaryQual object if descriptors were not provided with
739 Args : $qual,$seq,$id,$acc,$pid,$desc,$given_id,$alphabet as found
741 Notes : Really only intended to be called by the new() method. If
742 you want to invoke a similar function try set_common_descriptors().
747 sub _set_descriptors
{
748 my ($self,$qual,$seq,$id,$acc,$pid,$desc,$given_id,$alphabet) = @_;
749 my ($c_id,$c_acc,$c_pid,$c_desc);
750 if (!$self->display_id()) {
751 if ($c_id = $self->_common_id() ) { $self->display_id($c_id); }
753 if ($self->{seq_ref
}) {
754 # print("Using seq_ref to set id to ".$self->{seq_ref}->display_id()."\n");
755 # ::dumpValue($self->{seq_ref});
756 $self->display_id($self->{seq_ref
}->id());
757 } elsif ($self->{qual_ref
}) {
758 $self->display_id($self->{qual_ref
}->id());
762 if ($acc) { $self->accession_number($acc); }
763 elsif ($c_acc = $self->_common_accession_number() ) { $self->accession_number($c_acc); }
764 if ($pid) { $self->primary_id($pid); }
765 elsif ($c_pid = $self->_common_primary_id() ) { $self->primary_id($c_pid); }
766 if ($desc) { $self->desc($desc); }
767 elsif ($c_desc = $self->_common_desc() ) { $self->desc($c_desc); }
770 =head2 subseq($start,$end)
772 Title : subseq($start,$end)
773 Usage : $subsequence = $obj->subseq($start,$end);
774 Function: Returns the subseq from start to end, where the first base
775 is 1 and the number is inclusive, ie 1-2 are the first two
776 bases of the sequence.
778 Args : Two positions.
783 my ($self,@args) = @_;
784 # does a single value work?
785 return $self->{seq_ref
}->subseq(@args);
788 =head2 baseat($position)
790 Title : baseat($position)
791 Usage : $base_at_position_6 = $obj->baseat("6");
792 Function: Returns a single base at the given position, where the first
793 base is 1 and the number is inclusive, ie 1-2 are the first two
794 bases of the sequence.
801 my ($self,$val) = @_;
802 return $self->{seq_ref
}->subseq($val,$val);
805 =head2 subqual($start,$end)
807 Title : subqual($start,$end)
808 Usage : @qualities = @{$obj->subqual(10,20);
809 Function: returns the quality values from $start to $end, where the
810 first value is 1 and the number is inclusive, ie 1-2 are the
811 first two bases of the sequence. Start cannot be larger than
812 end but can be equal.
813 Returns : A reference to an array.
814 Args : a start position and an end position
819 my ($self,@args) = @_;
820 return $self->{qual_ref
}->subqual(@args);
823 =head2 qualat($position)
825 Title : qualat($position)
826 Usage : $quality = $obj->qualat(10);
827 Function: Return the quality value at the given location, where the
828 first value is 1 and the number is inclusive, ie 1-2 are the
829 first two bases of the sequence. Start cannot be larger than
830 end but can be equal.
837 my ($self,$val) = @_;
838 return $self->{qual_ref
}->qualat($val);
841 =head2 sub_trace_index($start,$end)
843 Title : sub_trace_index($start,$end)
844 Usage : @trace_indices = @{$obj->sub_trace_index(10,20);
845 Function: returns the trace index values from $start to $end, where the
846 first value is 1 and the number is inclusive, ie 1-2 are the
847 first two bases of the sequence. Start cannot be larger than
848 end but can be e_trace_index.
849 Returns : A reference to an array.
850 Args : a start position and an end position
854 sub sub_trace_index
{
855 my ($self,@args) = @_;
856 return $self->{qual_ref
}->sub_trace_index(@args);
859 =head2 trace_index_at($position)
861 Title : trace_index_at($position)
862 Usage : $trace_index = $obj->trace_index_at(10);
863 Function: Return the trace_index value at the given location, where the
864 first value is 1 and the number is inclusive, ie 1-2 are the
865 first two bases of the sequence. Start cannot be larger than
866 end but can be etrace_index_.
873 my ($self,$val) = @_;
874 return $self->{qual_ref
}->trace_index_at($val);
880 Usage : $quality = $obj->to_string();
881 Function: Return a textual representation of what the object contains.
882 For this module, this function will return:
898 my ($self,$out,$result) = shift;
899 $out = "qual: ".join(',',@
{$self->qual()})."\n";
900 foreach (qw(seq display_id accession_number primary_id desc id)) {
901 $result = $self->$_();
902 if (!$result) { $result = "<unset>"; }
903 $out .= "$_: $result\n";