.\" 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::SequenceTrace 3pm" .TH Bio::Seq::SequenceTrace 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::SequenceTrace \- Bioperl object packaging a sequence with its trace .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& # example code here .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This object stores a sequence with its trace. .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 .PP 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 10 \& Title : new() \& Usage : $st = Bio::Seq::SequenceTrace\->new \& ( \-swq => Bio::Seq::SequenceWithQuality, \& \-trace_a => \e@trace_values_for_a_channel, \& \-trace_t => \e@trace_values_for_t_channel, \& \-trace_g => \e@trace_values_for_g_channel, \& \-trace_c => \e@trace_values_for_c_channel, \& \-accuracy_a => \e@a_accuracies, \& \-accuracy_t => \e@t_accuracies, \& \-accuracy_g => \e@g_accuracies, \& \-accuracy_c => \e@c_accuracies, \& \-peak_indices => \*(Aq0 5 10 15 20 25 30 35\*(Aq \& ); \& Function: Returns a new Bio::Seq::SequenceTrace object from basic \& constructors. \& Returns : a new Bio::Seq::SequenceTrace object \&Arguments: I think that these are all describes in the usage above. .Ve .SS "trace($base,\e@new_values)" .IX Subsection "trace($base,@new_values)" .Vb 11 \& Title : trace($base,\e@new_values) \& Usage : @trace_Values = @{$obj\->trace($base,\e@new_values)}; \& Function: Returns the trace values as a reference to an array containing the \& trace values. The individual elements of the trace array are not validated \& and can be any numeric value. \& Returns : A reference to an array. \& Status : \&Arguments: $base : which color channel would you like the trace values for? \& \- $base must be one of "A","T","G","C" \& \e@new_values : a reference to an array of values containing trace \& data for this base .Ve .SS "peak_indices($new_indices)" .IX Subsection "peak_indices($new_indices)" .Vb 5 \& Title : peak_indices($new_indices) \& Usage : $indices = $obj\->peak_indices($new_indices); \& Function: Return the trace index points for this object. \& Returns : A scalar \& Args : If used, the trace indices will be set to the provided value. .Ve .SS "\fB_reset_peak_indices()\fP" .IX Subsection "_reset_peak_indices()" .Vb 10 \& Title : _rest_peak_indices() \& Usage : $obj\->_reset_peak_indices(); \& Function: Reset the peak indices. \& Returns : Nothing. \& Args : None. \& Notes : When you create a sub_trace_object, the peak indices \& will still be pointing to the apporpriate location _in the \& original trace_. In order to fix this, the initial value must \& be subtracted from each value here. ie. The first peak index \& must be "1". .Ve .SS "peak_index_at($position)" .IX Subsection "peak_index_at($position)" .Vb 6 \& Title : peak_index_at($position) \& Usage : $peak_index = $obj\->peak_index_at($postition); \& Function: Return the trace iindex point at this position \& Returns : A scalar \& Args : If used, the trace index at this position will be \& set to the provided value. .Ve .SS "\fBalphabet()\fP" .IX Subsection "alphabet()" .Vb 5 \& Title : alphabet(); \& Usage : $molecule_type = $obj\->alphabet(); \& Function: Get the molecule type from the PrimarySeq object. \& Returns : What what PrimarySeq says the type of the sequence is. \& Args : None. .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. \& This method sets the display_id for the Quality object. \& Returns : A string \& Args : If a scalar is provided, it is set as the new display_id for \& the Quality object. \& Status : Virtual .Ve .SS "\fBaccession_number()\fP" .IX Subsection "accession_number()" .Vb 10 \& 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". \& This method sets the accession_number for the Quality \& object. \& Returns : A string (the value of accession_number) \& Args : If a scalar is provided, it is set as the new accession_number \& for the Quality object. \& Status : Virtual .Ve .SS "\fBprimary_id()\fP" .IX Subsection "primary_id()" .Vb 12 \& 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. \& This method sets the primary_id for the Quality \& object. \& Returns : A string. (the value of primary_id) \& Args : If a scalar is provided, it is set as the new primary_id for \& the Quality object. .Ve .SS "\fBdesc()\fP" .IX Subsection "desc()" .Vb 7 \& Title : desc() \& Usage : $qual\->desc($newval); _or_ \& $description = $qual\->desc(); \& Function: Get/set description text for this Quality object. \& Returns : A string. (the value of desc) \& Args : If a scalar is provided, it is set as the new desc for the \& Quality object. .Ve .SS "\fBid()\fP" .IX Subsection "id()" .Vb 8 \& 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. (the value of id) \& Args : If a scalar is provided, it is set as the new id for the \& Quality object. .Ve .SS "seq" .IX Subsection "seq" .Vb 10 \& Title : seq() \& Usage : $string = $obj\->seq(); _or_ \& $obj\->seq("atctatcatca"); \& Function: Returns the sequence that is contained in the imbedded in the \& PrimarySeq object within the Quality object \& Returns : A scalar (the seq() value for the imbedded PrimarySeq object.) \& Args : If a scalar is provided, the Quality object will \& attempt to set that as the sequence for the imbedded PrimarySeq \& object. Otherwise, the value of seq() for the PrimarySeq object \& is returned. \& Notes : This is probably not a good idea because you then should call \& length() to make sure that the sequence and quality are of the \& same length. Even then, how can you make sure that this sequence \& belongs with that quality? I provided this to give you rope to \& hang yourself with. Tie it to a strong device and use a good \& knot. .Ve .SS "\fBqual()\fP" .IX Subsection "qual()" .Vb 10 \& Title : qual() \& Usage : @quality_values = @{$obj\->qual()}; _or_ \& $obj\->qual("10 10 20 40 50"); \& Function: Returns the quality as imbedded in the PrimaryQual object \& within the Quality object. \& Returns : A reference to an array containing the quality values in the \& PrimaryQual object. \& Args : If a scalar is provided, the Quality object will \& attempt to set that as the quality for the imbedded PrimaryQual \& object. Otherwise, the value of qual() for the PrimaryQual \& object is returned. \& Notes : This is probably not a good idea because you then should call \& length() to make sure that the sequence and quality are of the \& same length. Even then, how can you make sure that this sequence \& belongs with that quality? I provided this to give you a strong \& board with which to flagellate yourself. .Ve .SS "\fBlength()\fP" .IX Subsection "length()" .Vb 5 \& Title : length() \& Usage : $length = $seqWqual\->length(); \& Function: Get the length of the Quality sequence/quality. \& Returns : Returns the length of the sequence and quality \& Args : None. .Ve .SS "qual_obj" .IX Subsection "qual_obj" .Vb 8 \& Title : qual_obj($different_obj) \& Usage : $qualobj = $seqWqual\->qual_obj(); _or_ \& $qualobj = $seqWqual\->qual_obj($ref_to_primaryqual_obj); \& Function: Get the Qualilty object that is imbedded in the \& Quality object or if a reference to a PrimaryQual object \& is provided, set this as the PrimaryQual object imbedded in the \& Quality object. \& Returns : A reference to a Bio::Seq::Quality object. .Ve .PP Identical to seq_obj. .SS "seq_obj" .IX Subsection "seq_obj" .Vb 8 \& Title : seq_obj() \& Usage : $seqobj = $seqWqual\->seq_obj(); _or_ \& $seqobj = $seqWqual\->seq_obj($ref_to_primary_seq_obj); \& Function: Get the PrimarySeq object that is imbedded in the \& Quality object or if a reference to a PrimarySeq object is \& provided, set this as the PrimarySeq object imbedded in the \& Quality object. \& Returns : A reference to a Bio::PrimarySeq object. .Ve .SS "_set_descriptors" .IX Subsection "_set_descriptors" .Vb 10 \& Title : _set_descriptors() \& Usage : $seqWqual\->_qual_obj($qual,$seq,$id,$acc,$pid,$desc,$given_id, \& $alphabet); \& Function: Set the descriptors for the Quality object. Try to \& match the descriptors in the PrimarySeq object and in the \& PrimaryQual object if descriptors were not provided with \& construction. \& Returns : Nothing. \& Args : $qual,$seq,$id,$acc,$pid,$desc,$given_id,$alphabet as found \& in the new() method. \& Notes : Really only intended to be called by the new() method. If \& you want to invoke a similar function try \& set_common_descriptors(). .Ve .SS "subseq($start,$end)" .IX Subsection "subseq($start,$end)" .Vb 7 \& Title : subseq($start,$end) \& Usage : $subsequence = $obj\->subseq($start,$end); \& Function: Returns the subseq from start to end, where the first base \& is 1 and the number is inclusive, ie 1\-2 are the first two \& bases of the sequence. \& Returns : A string. \& Args : Two positions. .Ve .SS "baseat($position)" .IX Subsection "baseat($position)" .Vb 7 \& Title : baseat($position) \& Usage : $base_at_position_6 = $obj\->baseat("6"); \& Function: Returns a single base at the given position, where the first \& base is 1 and the number is inclusive, ie 1\-2 are the first two \& bases of the sequence. \& Returns : A scalar. \& Args : A position. .Ve .SS "subqual($start,$end)" .IX Subsection "subqual($start,$end)" .Vb 8 \& Title : subqual($start,$end) \& Usage : @qualities = @{$obj\->subqual(10,20); \& 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 "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 .SS "sub_peak_index($start,$end)" .IX Subsection "sub_peak_index($start,$end)" .Vb 7 \& Title : sub_peak_index($start,$end) \& Usage : @peak_indices = @{$obj\->sub_peak_index(10,20); \& Function: returns the trace index values from $start to $end, where the \& first value is 1 and the number is inclusive, ie 1\-2 are the \& first two trace indices for this channel. \& Returns : A reference to an array. \& Args : a start position and an end position .Ve .SS "sub_trace($start,$end)" .IX Subsection "sub_trace($start,$end)" .Vb 8 \& Title : sub_trace($base_channel,$start,$end) \& Usage : @trace_values = @{$obj\->sub_trace(\*(Aqa\*(Aq,10,20)}; \& Function: returns the trace 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 e_peak_index. \& Returns : A reference to an array. \& Args : a start position and an end position .Ve .SS "\fBtrace_length()\fP" .IX Subsection "trace_length()" .Vb 6 \& Title : trace_length() \& Usage : $trace_length = $obj\->trace_length(); \& Function: Return the length of the trace if all four traces (atgc) \& are the same. Otherwise, throw an error. \& Returns : A scalar. \& Args : none .Ve .SS "sub_trace_object($start,$end)" .IX Subsection "sub_trace_object($start,$end)" .Vb 12 \& Title : sub_trace_object($start,$end) \& Usage : $smaller_object = $object\->sub_trace_object(\*(Aq1\*(Aq,\*(Aq100\*(Aq); \& Function: Get a subset of the sequence, its quality, and its trace. \& Returns : A reference to a Bio::Seq::SequenceTrace object \& Args : a start position and an end position \& Notes : \& \- the start and end position refer to the positions of _bases_. \& \- for example, to get a sub SequenceTrace for bases 5\-10, \& use this routine. \& \- you will get the bases, qualities, and the trace values \& \- you can then use this object to synthesize a new scf \& using seqIO::scf. .Ve .SS "\fB_synthesize_traces()\fP" .IX Subsection "_synthesize_traces()" .Vb 9 \& Title : _synthesize_traces() \& Usage : $obj\->_synthesize_traces(); \& Function: Synthesize false traces for this object. \& Returns : Nothing. \& Args : None. \& Notes : This method is intended to be invoked when this \& object is created with a SWQ object\- that is to say that \& there is a sequence and a set of qualities but there was \& no actual trace data. .Ve .SS "_dump_traces($transformed)" .IX Subsection "_dump_traces($transformed)" .Vb 10 \& Title : _dump_traces("transformed") \& Usage : &_dump_traces($ra,$rc,$rg,$rt); \& Function: Used in debugging. Prints all traces one beside each other. \& Returns : Nothing. \& Args : References to the arrays containing the traces for A,C,G,T. \& Notes : Beats using dumpValue, I\*(Aqll tell ya. Much better then using \& join\*(Aq \*(Aq too. \& \- if a scalar is included as an argument (any scalar), this \& procedure will dump the _delta\*(Aqd trace. If you don\*(Aqt know what \& that means you should not be using this. .Ve .SS "\fB_initialize_traces()\fP" .IX Subsection "_initialize_traces()" .Vb 5 \& Title : _initialize_traces() \& Usage : $trace_object\->_initialize_traces(); \& Function: Creates empty arrays to hold synthetic trace values. \& Returns : Nothing. \& Args : None. .Ve .SS "trace_value_at($channel,$position)" .IX Subsection "trace_value_at($channel,$position)" .Vb 6 \& Title : trace_value_at($channel,$position) \& Usage : $value = $trace_object\->trace_value_at($channel,$position); \& Function: What is the value of the trace for this base at this position? \& Returns : A scalar represnting the trace value here. \& Args : a base channel (a,t,g,c) \& a position ( < $trace_object\->trace_length() ) .Ve .SS "accuracies($channel,$position)" .IX Subsection "accuracies($channel,$position)" .Vb 6 \& Title : trace_value_at($channel,$position) \& Usage : $value = $trace_object\->trace_value_at($channel,$position); \& Function: What is the value of the trace for this base at this position? \& Returns : A scalar representing the trace value here. \& Args : a base channel (a,t,g,c) \& a position ( < $trace_object\->trace_length() ) .Ve .SS "\fBset_accuracies()\fP" .IX Subsection "set_accuracies()" .Vb 7 \& Title : set_sccuracies() \& Usage : $trace_object\->set_accuracies(); \& Function: Take a sequence\*(Aqs quality and synthesize proper scf\-style \& base accuracies that can then be accessed with \& accuracies("a") or something like it. \& Returns : Nothing. \& Args : None. .Ve .SS "\fBscf_dump()\fP" .IX Subsection "scf_dump()" .Vb 8 \& Title : scf_dump() \& Usage : $trace_object\->scf_dump(); \& Function: Prints out the contents of the structures representing \& the SequenceTrace in a manner similar to io_lib\*(Aqs scf_dump. \& Returns : Nothing. Prints out the contents of the structures \& used to represent the sequence and its trace. \& Args : None. \& Notes : Used in debugging, obviously. .Ve .SS "_get_other_bases($this_base)" .IX Subsection "_get_other_bases($this_base)" .Vb 7 \& Title : _get_other_bases($this_base) \& Usage : $other_bases = $trace_object\->_get_other_bases($this_base); \& Function: A utility routine to return bases other then the one provided. \& I was doing this over and over so I put it here. \& Returns : Three of a,t,g and c. \& Args : A base (atgc) \& Notes : $obj\->_get_other_bases("a") returns "tgc" .Ve .SS "accuracy_at($base,$position)" .IX Subsection "accuracy_at($base,$position)" .Vb 6 \& Title : accuracy_at($base,$position) \& Usage : $accuracy = $trace_object\->accuracy_at($base,$position); \& Function: \& Returns : Returns the accuracy of finding $base at $position. \& Args : 1. a base channel (atgc) 2. a value to _set_ the accuracy \& Notes : $obj\->_get_other_bases("a") returns "tgc" .Ve