.\" 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::Quality 3pm" .TH Bio::Seq::Quality 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::Quality \- Implementation of sequence with residue quality and trace values .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Bio::Seq::Quality; \& \& # input can be space delimited string or array ref \& my $qual = \*(Aq0 1 2 3 4 5 6 7 8 9 11 12\*(Aq; \& my $trace = \*(Aq0 5 10 15 20 25 30 35 40 45 50 55\*(Aq; \& \& my $seq = Bio::Seq::Quality\->new \& ( \-qual => $qual, \& \-trace_indices => $trace, \& \-seq => \*(Aqatcgatcgatcg\*(Aq, \& \-id => \*(Aqhuman_id\*(Aq, \& \-accession_number => \*(AqS000012\*(Aq, \& \-verbose => \-1 # to silence deprecated methods \& ); \& \& my $quals = $seq\->qual; # array ref \& my $traces = $seq\->trace; # array ref \& \& my $quals = $seq\->qual_text; # string \& my $traces = $seq\->trace_text; # string \& \& \& # get sub values \& $quals = $seq\->subqual(2, 3); # array ref \& $traces = $seq\->subtrace(2, 3); # array ref \& $quals = $seq\->subqual_text(2, 3); # string \& $quals = $seq\->subtrace_text(2, 3); # string \& \& # set sub values \& $seq\->subqual(2, 3, "9 9"); \& $seq\->subtrace(2, 3, "9 9"); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This object stores base quality values together with the sequence string. .PP The implementation is based on Bio::Seq::Meta::Array. \fBqual()\fR and \&\fBtrace()\fR are base methods to store and retrieve information that have extensions to retrieve values as a scalar (e.g. \fBqual_text()\fR ), or get or set subvalues (e.g. \fBsubqual()\fR ). See Bio::Seq::MetaI for more details. .PP All the functional code is in Bio::Seq::Meta::Array. .PP There deprecated methods that are included for compatibility with Bio::Seq::SeqWithQuality. These will print a warning unless verbosity of the object is set to be less than zero. .SH "SEE ALSO" .IX Header "SEE ALSO" Bio::Seq::MetaI, Bio::Seq::Meta::Array .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 \- Heikki Lehvaslaiho" .IX Header "AUTHOR - Heikki Lehvaslaiho" Email heikki-at-bioperl-dot-org .SH "CONTRIBUTORS" .IX Header "CONTRIBUTORS" Chad Matsalla, bioinformatics at dieselwurks dot com .PP Dan Bolser, dan dot bolser at gmail dot 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 "new" .IX Subsection "new" .Vb 10 \& Title : new \& Usage : $metaseq = Bio::Seq::Quality\->new \& ( \-qual => \*(Aq0 1 2 3 4 5 6 7 8 9 11 12\*(Aq, \& \-trace => \*(Aq0 5 10 15 20 25 30 35 40 45 50 55\*(Aq, \& \-seq => \*(Aqatcgatcgatcg\*(Aq, \& \-id => \*(Aqhuman_id\*(Aq, \& \-accession_number => \*(AqS000012\*(Aq, \& ); \& Function: Constructor for Bio::Seq::Quality class. Note that you can \& provide an empty quality and trace strings. \& \& Returns : a new Bio::Seq::Quality object .Ve .SS "qual" .IX Subsection "qual" .Vb 3 \& Title : qual \& Usage : $qual_values = $obj\->qual($values_string); \& Function: \& \& Get and set method for the meta data starting from residue \& position one. Since it is dependent on the length of the \& sequence, it needs to be manipulated after the sequence. \& \& The length of the returned value always matches the length \& of the sequence. \& \& Returns : reference to an array of meta data \& Args : new value, string or array ref or Bio::Seq::PrimaryQual, optional .Ve .PP Setting quality values resets the clear range. .SS "qual_text" .IX Subsection "qual_text" .Vb 6 \& Title : qual_text \& Usage : $qual_values = $obj\->qual_text($values_arrayref); \& Function: Variant of meta() and qual() guarantied to return a string \& representation of meta data. For details, see L. \& Returns : a string \& Args : new value, optional .Ve .SS "subqual" .IX Subsection "subqual" .Vb 4 \& Title : subqual \& Usage : $subset_of_qual_values = $obj\->subqual(10, 20, $value_string); \& $subset_of_qual_values = $obj\->subqual(10, undef, $value_string); \& Function: \& \& Get and set method for meta data for subsequences. \& \& Numbering starts from 1 and the number is inclusive, ie 1\-2 \& are the first two residue of the sequence. Start cannot be \& larger than end but can be equal. \& \& If the second argument is missing the returned values \& should extend to the end of the sequence. \& \& Returns : A reference to an array \& Args : integer, start position \& integer, end position, optional when a third argument present \& new value, optional .Ve .SS "subqual_text" .IX Subsection "subqual_text" .Vb 6 \& Title : subqual_text \& Usage : $meta_values = $obj\->subqual_text(20, $value_string); \& Function: Variant of subqual() returning a stringified \& representation of meta data. For details, see L. \& Returns : a string \& Args : new value, optional .Ve .SS "quality_length" .IX Subsection "quality_length" .Vb 5 \& Title : quality_length() \& Usage : $qual_len = $obj\->quality_length(); \& Function: return the number of elements in the quality array \& Returns : integer \& Args : \- .Ve .SS "quality_is_flush" .IX Subsection "quality_is_flush" .Vb 6 \& Title : quality_is_flush \& Usage : $quality_is_flush = $obj\->quality_is_flush() \& Function: Boolean to tell if the trace length equals the sequence length. \& Returns true if force_flush() is set. \& Returns : boolean 1 or 0 \& Args : none .Ve .SS "trace" .IX Subsection "trace" .Vb 3 \& Title : trace \& Usage : $trace_values = $obj\->trace($values_string); \& Function: \& \& Get and set method for the meta data starting from residue \& position one. Since it is dependent on the length of the \& sequence, it needs to be manipulated after the sequence. \& \& The length of the returned value always matches the length \& of the sequence. \& \& Returns : reference to an array of meta data \& Args : new value, string or array ref, optional .Ve .SS "trace_text" .IX Subsection "trace_text" .Vb 6 \& Title : trace_text \& Usage : $trace_values = $obj\->trace_text($values_arrayref); \& Function: Variant of meta() and trace() guarantied to return a string \& representation of meta data. For details, see L. \& Returns : a string \& Args : new value, optional .Ve .SS "subtrace" .IX Subsection "subtrace" .Vb 4 \& Title : subtrace \& Usage : $subset_of_trace_values = $obj\->subtrace(10, 20, $value_string); \& $subset_of_trace_values = $obj\->subtrace(10, undef, $value_string); \& Function: \& \& Get and set method for meta data for subsequences. \& \& Numbering starts from 1 and the number is inclusive, ie 1\-2 \& are the first two residue of the sequence. Start cannot be \& larger than end but can be equal. \& \& If the second argument is missing the returned values \& should extend to the end of the sequence. \& \& Returns : A reference to an array \& Args : integer, start position \& integer, end position, optional when a third argument present \& new value, optional .Ve .SS "subtrace_text" .IX Subsection "subtrace_text" .Vb 6 \& Title : subtrace_text \& Usage : $meta_values = $obj\->subtrace_text(20, $value_string); \& Function: Variant of subtrace() returning a stringified \& representation of meta data. For details, see L. \& Returns : a string \& Args : new value, optional .Ve .SS "trace_length" .IX Subsection "trace_length" .Vb 5 \& Title : trace_length() \& Usage : $trace_len = $obj\->trace_length(); \& Function: return the number of elements in the trace set \& Returns : integer \& Args : \- .Ve .SS "trace_is_flush" .IX Subsection "trace_is_flush" .Vb 6 \& Title : trace_is_flush \& Usage : $trace_is_flush = $obj\->trace_is_flush() \& Function: Boolean to tell if the trace length equals the sequence length. \& Returns true if force_flush() is set. \& Returns : boolean 1 or 0 \& Args : none .Ve .SS "get_trace_graph" .IX Subsection "get_trace_graph" .Vb 10 \& Title : get_trace_graph \& Usage : @trace_values = $obj\->get_trace_graph( \-trace => \*(Aqa\*(Aq, \& \-scale => 100) \& Function : Returns array of raw trace values for a trace file, or \& false if no trace data exists. Requires a value for trace \& to get either the a, g, c or t trace information, and an \& optional value for scale, which rescales the data between \& 0 and the provided value, a scale value of \*(Aq0\*(Aq performs no \& scaling \& Returns : Array or 0 \& Args : string, trace to retrieve, one of a, g, c or t integer, \& scale, for scaling of trace between 0 and scale, or 0 for \& no scaling, optional .Ve .SS "threshold" .IX Subsection "threshold" .Vb 5 \& Title : threshold \& Usage : $qual\->threshold($value); \& Function: Sets the quality threshold. \& Returns : an integer \& Args : new value, optional .Ve .PP Value used by *clear_range* method below. .SS "mask_below_threshold" .IX Subsection "mask_below_threshold" .Vb 6 \& Title : mask_below_threshold \& Usage : $count = $obj\->count_clear_ranges($threshold); \& Function: Counts number of ranges in the sequence where quality \& values are above the threshold \& Returns : count integer \& Args : threshold integer, optional .Ve .PP Set threshold first using method threshold. .SS "count_clear_ranges" .IX Subsection "count_clear_ranges" .Vb 6 \& Title : count_clear_ranges \& Usage : $count = $obj\->count_clear_ranges($threshold); \& Function: Counts number of ranges in the sequence where quality \& values are above the threshold \& Returns : count integer \& Args : threshold integer, optional .Ve .PP Set threshold first using method threshold. .SS "clear_ranges_length" .IX Subsection "clear_ranges_length" .Vb 6 \& Title : clear_ranges_length \& Usage : $total_lenght = $obj\->clear_ranges_length($threshold); \& Function: Return number of residues with quality values above \& the threshold in all clear ranges \& Returns : an integer \& Args : threshold, optional .Ve .PP Set threshold first using method threshold. .PP I think this method needs a better name! count_high_quality_bases? or sum_clear_ranges? .SS "get_clear_range" .IX Subsection "get_clear_range" .Vb 6 \& Title : get_clear_range \& Usage : $newqualobj = $obj\->get_clear_range($threshold); \& Function: Return longest subsequence that has quality values above \& the given threshold, or a default value of 13 \& Returns : a new Bio::Seq::Quality object \& Args : threshold, optional .Ve .PP Set threshold first using method threshold. .PP Note, this method could be implemented using some gaussian smoothing of the quality scores. Currently one base below the threshold is enough to end the clear range. .SS "get_all_clean_ranges" .IX Subsection "get_all_clean_ranges" .Vb 6 \& Title : get_all_clean_ranges \& Usage : @ranges = $obj\->get_all_clean_ranges($minlength); \& Function: Return all ranges where quality values are above \& the threshold. Original ordering. \& Returns : an ordered array of new Bio::Seq::Quality objects \& Args : minimum length , optional .Ve .PP Set threshold first using method threshold.