.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" 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::PrimaryQual 3pm" .TH Bio::Seq::PrimaryQual 3pm "2021-08-15" "perl v5.32.1" "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::PrimaryQual \- Bioperl lightweight Quality Object .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Bio::Seq::PrimaryQual; \& \& # you can use either a space\-delimited string for quality \& \& my $string_quals = "10 20 30 40 50 40 30 20 10"; \& my $qualobj = Bio::Seq::PrimaryQual\->new( \& \-qual => $string_quals, \& \-id => \*(AqQualityFragment\-12\*(Aq, \& \-accession_number => \*(AqX78121\*(Aq, \& ); \& \& # _or_ you can use an array of quality values \& \& my @q2 = split/ /,$string_quals; \& $qualobj = Bio::Seq::PrimaryQual\->new( \& \-qual => \e@q2, \& \-primary_id => \*(Aqchads primary_id\*(Aq, \& \-desc => \*(Aqchads desc\*(Aq, \& \-accession_number => \*(Aqchads accession_number\*(Aq, \& \-id => \*(Aqchads id\*(Aq \& ); \& \& # to get the quality values out: \& \& my @quals = @{$qualobj\->qual()}; \& \& # to give _new_ quality values \& \& my $newqualstring = "50 90 1000 20 12 0 0"; \& $qualobj\->qual($newqualstring); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module provides a mechanism for storing quality values. Much more useful as part of Bio::Seq::Quality where these quality values are associated with the sequence information. .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" 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 _ .SS "\fBnew()\fP" .IX Subsection "new()" .Vb 6 \& Title : new() \& Usage : $qual = Bio::Seq::PrimaryQual\->new( \& \-qual => \*(Aq10 20 30 40 50 50 20 10\*(Aq, \& \-id => \*(Aqhuman_id\*(Aq, \& \-accession_number => \*(AqAL000012\*(Aq, \& ); \& \& Function: Returns a new Bio::Seq::PrimaryQual object from basic \& constructors, being a string _or_ a reference to an array for the \& sequence and strings for id and accession_number. Note that you \& can provide an empty quality string. \& Returns : a new Bio::Seq::PrimaryQual object .Ve .SS "\fBqual()\fP" .IX Subsection "qual()" .Vb 6 \& Title : qual() \& Usage : @quality_values = @{$obj\->qual()}; \& Function: Get or set the quality as a reference to an array containing the \& quality values. An error is generated if the quality scores are \& invalid, see validate_qual(). \& Returns : A reference to an array. .Ve .SS "\fBseq()\fP" .IX Subsection "seq()" .Vb 5 \& Title : seq() \& Usager : $sequence = $obj\->seq(); \& Function : Returns the quality numbers as a space\-separated string. \& Returns : Single string. \& Args : None. .Ve .SS "validate_qual($qualstring)" .IX Subsection "validate_qual($qualstring)" .Vb 10 \& Title : validate_qual($qualstring) \& Usage : print("Valid.") if { &validate_qual($self, $quality_string); } \& Function: Test that the given quality string is valid. It is expected to \& contain space\-delimited numbers that can be parsed using split /\ed+/. \& However, this validation takes shortcuts and only tests that the \& string contains characters valid in numbers: 0\-9 . eE +\- \& Note that empty quality strings are valid too. \& Returns : 1 for a valid sequence, 0 otherwise \& Args : \- Scalar containing the quality string to validate. \& \- Boolean to optionally throw an error if validation failed .Ve .SS "subqual($start,$end)" .IX Subsection "subqual($start,$end)" .Vb 8 \& Title : subqual($start,$end) \& Usage : @subset_of_quality_values = @{$obj\->subqual(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(); \& 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 : None .Ve .SS "\fBheader()\fP" .IX Subsection "header()" .Vb 6 \& Title : header() \& Usage : $header = $obj\->header(); \& Function: Get/set the header that the user wants printed for this \& quality object. \& Returns : A string \& Args : None .Ve .SS "\fBaccession_number()\fP" .IX Subsection "accession_number()" .Vb 11 \& Title : accession_number() \& Usage : $unique_biological_key = $obj\->accession_number(); \& 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 : None .Ve .SS "\fBprimary_id()\fP" .IX Subsection "primary_id()" .Vb 9 \& Title : primary_id() \& Usage : $unique_implementation_key = $obj\->primary_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 : None .Ve .SS "\fBdesc()\fP" .IX Subsection "desc()" .Vb 7 \& Title : desc() \& Usage : $qual\->desc($newval); \& $description = $qual\->desc(); \& Function: Get/set description text for a qual object \& Example : \& Returns : Value of desc \& Args : newvalue (optional) .Ve .SS "\fBid()\fP" .IX Subsection "id()" .Vb 7 \& Title : id() \& Usage : $id = $qual\->id(); \& Function: Return the ID of the quality. This should normally be (and \& actually is in the implementation provided here) just a synonym \& for display_id(). \& Returns : A string. \& Args : None. .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 "\fBqualat()\fP" .IX Subsection "qualat()" .Vb 8 \& Title : qualat \& 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 .SS "\fBto_string()\fP" .IX Subsection "to_string()" .Vb 10 \& Title : to_string() \& Usage : $quality = $obj\->to_string(); \& Function: Return a textual representation of what the object contains. \& For this module, this function will return: \& qual \& display_id \& accession_number \& primary_id \& desc \& id \& length \& Returns : A scalar. \& Args : None. .Ve