.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Bio::Seq::QualI 3pm" .TH Bio::Seq::QualI 3pm "2020-10-28" "perl v5.30.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Bio::Seq::QualI \- Interface definition for a Bio::Seq::Qual .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& # get a Bio::Seq::Qual compliant object somehow \& \& # to test this is a seq object \& \& $obj\->isa("Bio::Seq::QualI") \& || $obj\->throw("$obj does not implement the Bio::Seq::QualI interface"); \& \& # accessors \& \& $string = $obj\->qual(); \& $substring = $obj\->subqual(12,50); \& $display = $obj\->display_id(); # for human display \& $id = $obj\->primary_id(); # unique id for this object, \& # implementation defined \& $unique_key= $obj\->accession_number(); \& # unique biological id .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This object defines an abstract interface to basic quality information. PrimaryQual is an object just for the quality and its name(s), nothing more. There is a pure perl implementation of this in Bio::Seq::PrimaryQual. If you just want to use Bio::Seq::PrimaryQual objects, then please read that module first. This module defines the interface, and is of more interest to people who want to wrap their own Perl Objects/RDBs/FileSystems etc in way that they \*(L"are\*(R" bioperl quality objects, even though it is not using Perl to store the sequence etc. .PP This interface defines what bioperl consideres necessary to \*(L"be\*(R" a sequence of qualities, without providing an implementation of this. (An implementation is provided in Bio::Seq::PrimaryQual). If you want to provide a Bio::Seq::PrimaryQual 'compliant' object which in fact wraps another object/database/out\-of\-perl experience, then this is the correct thing to wrap, generally by providing a wrapper class which would inherit from your object and this Bio::Seq::QualI interface. The wrapper class then would have methods lists in the \&\*(L"Implementation Specific Functions\*(R" which would provide these methods for your object. .SH "FEEDBACK" .IX Header "FEEDBACK" .SS "Mailing Lists" .IX Subsection "Mailing Lists" User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated. .PP .Vb 2 \& bioperl\-l@bioperl.org \- General discussion \& http://bioperl.org/wiki/Mailing_lists \- About the mailing lists .Ve .SS "Support" .IX Subsection "Support" Please direct usage questions or support issues to the mailing list: .PP \&\fIbioperl\-l@bioperl.org\fR .PP rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible. .SS "Reporting Bugs" .IX Subsection "Reporting Bugs" Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web: .PP .Vb 1 \& https://github.com/bioperl/bioperl\-live/issues .Ve .SH "AUTHOR \- Chad Matsalla" .IX Header "AUTHOR - Chad Matsalla" This module is heavily based on Bio::Seq::PrimarySeq and is modeled after or outright copies sections of it. Thanks Ewan! .PP Email bioinformatics@dieselwurks.com .SH "APPENDIX" .IX Header "APPENDIX" The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ .SH "Implementation Specific Functions" .IX Header "Implementation Specific Functions" These functions are the ones that a specific implementation must define. .SS "\fBqual()\fP" .IX Subsection "qual()" .Vb 7 \& Title : qual() \& Usage : @quality_values = @{$obj\->qual()}; \& Function: Returns the quality as a reference to an array containing the \& quality values. The individual elements of the quality array are \& not validated and can be any numeric value. \& Returns : A reference to an array. \& Status : .Ve .SS "subqual($start,$end)" .IX Subsection "subqual($start,$end)" .Vb 8 \& Title : subqual($start,$end) \& Usage : @subset_of_quality_values = @{$obj\->subseq(10,40)}; \& Function: returns the quality values from $start to $end, where the \& first value is 1 and the number is inclusive, ie 1\-2 are the first \& two bases of the sequence. Start cannot be larger than end but can \& be equal. \& Returns : A reference to an array. \& Args : a start position and an end position .Ve .SS "\fBdisplay_id()\fP" .IX Subsection "display_id()" .Vb 10 \& Title : display_id() \& Usage : $id_string = $obj\->display_id() _or_ \& $id_string = $obj\->display_id($new_display_id); \& Function: Returns the display id, aka the common name of the Quality \& object. \& The semantics of this is that it is the most likely string to be \& used as an identifier of the quality sequence, and likely to have \& "human" readability. The id is equivalent to the ID field of the \& GenBank/EMBL databanks and the id field of the Swissprot/sptrembl \& database. In fasta format, the >(\eS+) is presumed to be the id, \& though some people overload the id to embed other information. \& Bioperl does not use any embedded information in the ID field, \& and people are encouraged to use other mechanisms (accession field \& for example, or extending the sequence object) to solve this. \& Notice that $seq\->id() maps to this function, mainly for \& legacy/convience issues \& Returns : A string \& Args : If an arg is provided, it will replace the existing display_id \& in the object. .Ve .SS "\fBaccession_number()\fP" .IX Subsection "accession_number()" .Vb 10 \& Title : accession_number() \& Usage : $unique_biological_key = $obj\->accession_number(); _or_ \& $unique_biological_key = $obj\->accession_number($new_acc_num); \& Function: Returns the unique biological id for a sequence, commonly \& called the accession_number. For sequences from established \& databases, the implementors should try to use the correct \& accession number. Notice that primary_id() provides the unique id \& for the implementation, allowing multiple objects to have the same \& accession number in a particular implementation. For sequences \& with no accession number, this method should return "unknown". \& Returns : A string. \& Args : If an arg is provided, it will replace the existing \& accession_number in the object. .Ve .SS "\fBprimary_id()\fP" .IX Subsection "primary_id()" .Vb 11 \& Title : primary_id() \& Usage : $unique_implementation_key = $obj\->primary_id(); _or_ \& $unique_implementation_key = $obj\->primary_id($new_prim_id); \& Function: Returns the unique id for this object in this implementation. \& This allows implementations to manage their own object ids in a \& way the implementation can control clients can expect one id to \& map to one object. For sequences with no accession number, this \& method should return a stringified memory location. \& Returns : A string \& Args : If an arg is provided, it will replace the existing \& primary_id in the object. .Ve .SS "\fBcan_call_new()\fP" .IX Subsection "can_call_new()" .Vb 10 \& Title : can_call_new() \& Usage : if( $obj\->can_call_new ) { \& $newobj = $obj\->new( %param ); \& } \& Function: can_call_new returns 1 or 0 depending on whether an \& implementation allows new constructor to be called. If a new \& constructor is allowed, then it should take the followed hashed \& constructor list. \& $myobject\->new( \-qual => $quality_as_string, \& \-display_id => $id, \& \-accession_number => $accession, \& ); \& Example : \& Returns : 1 or 0 \& Args : .Ve .SS "qualat($position)" .IX Subsection "qualat($position)" .Vb 8 \& Title : qualat($position) \& Usage : $quality = $obj\->qualat(10); \& Function: Return the quality value at the given location, where the \& first value is 1 and the number is inclusive, ie 1\-2 are the first \& two bases of the sequence. Start cannot be larger than end but can \& be equal. \& Returns : A scalar. \& Args : A position. .Ve .SH "Optional Implementation Functions" .IX Header "Optional Implementation Functions" The following functions rely on the above functions. A implementing class does not need to provide these functions, as they will be provided by this class, but is free to override these functions. .PP All of \fBrevcom()\fR, \fBtrunc()\fR, and \fBtranslate()\fR create new sequence objects. They will call \fBnew()\fR on the class of the sequence object instance passed as argument, unless \fBcan_call_new()\fR returns \s-1FALSE.\s0 In the latter case a Bio::PrimarySeq object will be created. Implementors which really want to control how objects are created (eg, for object persistence over a database, or objects in a \s-1CORBA\s0 framework), they are encouraged to override these methods .SS "revcom" .IX Subsection "revcom" .Vb 7 \& Title : revcom \& Usage : @rev = @{$qual\->revcom()}; \& Function: Produces a new Bio::Seq::QualI implementing object which \& is reversed from the original quality array. \& The id is the same id as the original sequence, and the accession number \& is also identical. If someone wants to track that this sequence has \& been reversed, it needs to define its own extensions \& \& To do an inplace edit of an object you can go: \& \& $qual = $qual\->revcom(); \& \& This of course, causes Perl to handle the garbage collection of the old \& object, but it is roughly speaking as efficient as an inplace edit. \& Returns : A new (fresh) Bio::Seq::PrimaryQualI object \& Args : none .Ve .SS "\fBtrunc()\fP" .IX Subsection "trunc()" .Vb 5 \& Title : trunc \& Usage : $subseq = $myseq\->trunc(10,100); \& Function: Provides a truncation of a sequence, \& Returns : a fresh Bio::Seq::QualI implementing object \& Args : Two integers denoting first and last base of the sub\-sequence. .Ve .SS "\fBtranslate()\fP" .IX Subsection "translate()" .Vb 7 \& Title : translate() \& Usage : $protein_seq_obj = $dna_seq_obj\->translate \& #if full CDS expected: \& $protein_seq_obj = $cds_seq_obj\->translate(undef,undef,undef,undef,1); \& Function: Completely useless in this interface. \& Returns : Nothing. \& Args : Nothing. .Ve .SS "\fBid()\fP" .IX Subsection "id()" .Vb 7 \& Title : id() \& Usage : $id = $qual\->id() \& Function: ID of the quality. This should normally be (and actually is in \& the implementation provided here) just a synonym for display_id(). \& Example : \& Returns : A string. \& Args : .Ve .SS "\fBlength()\fP" .IX Subsection "length()" .Vb 9 \& Title : length() \& Usage : $length = $qual\->length(); \& Function: Return the length of the array holding the quality values. \& Under most circumstances, this should match the number of quality \& values but no validation is done when the PrimaryQual object is \& constructed and non\-digits could be put into this array. Is this a \& bug? Just enough rope... \& Returns : A scalar (the number of elements in the quality array). \& Args : None. .Ve .SS "\fBdesc()\fP" .IX Subsection "desc()" .Vb 7 \& Title : desc() \& Usage : $qual\->desc($newval); \& $description = $seq\->desc(); \& Function: Get/set description text for a qual object \& Example : \& Returns : value of desc \& Args : newvalue (optional) .Ve .SH "Private functions" .IX Header "Private functions" These are some private functions for the PrimarySeqI interface. You do not need to implement these functions .SS "_attempt_to_load_Seq" .IX Subsection "_attempt_to_load_Seq" .Vb 6 \& Title : _attempt_to_load_Seq \& Usage : \& Function: \& Example : \& Returns : \& Args : .Ve