.\" 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::Tools::Alignment::Trim 3pm" .TH Bio::Tools::Alignment::Trim 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::Tools::Alignment::Trim \- A kludge to do specialized trimming of sequence based on quality. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 4 \& use Bio::Tools::Alignment::Trim; \& $o_trim = Bio::Tools::Alignment::Trim\->new(); \& $o_trim\->set_reverse_designator("R"); \& $o_trim\->set_forward_designator("F"); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is a specialized module designed by Chad for Chad to trim sequences based on a highly specialized list of requirements. In other words, write something that will trim sequences 'just like the people in the lab would do manually'. .PP I settled on a sliding-window-average style of search which is ugly and slow but does _exactly_ what I want it to do. .PP Mental note: rewrite this. .PP It is very important to keep in mind the context in which this module was written: strictly to support the projects for which Consed.pm was designed. .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 3 \& 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\-at\-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 9 \& Title : new() \& Usage : $o_trim = Bio::Tools::Alignment::Trim\->new(); \& Function: Construct the Bio::Tools::Alignment::Trim object. No parameters \& are required to create this object. It is strictly a bundle of \& functions, as far as I am concerned. \& Returns : A reference to a Bio::Tools::Alignment::Trim object. \& Args : (optional) \& \-windowsize (default 10) \& \-phreds (default 20) .Ve .SS "set_designators($forward_designator,$reverse_designator)" .IX Subsection "set_designators($forward_designator,$reverse_designator)" .Vb 7 \& Title : set_designators(,) \& Usage : $o_trim\->set_designators("F","R") \& Function: Set the string by which the system determines whether a given \& sequence represents a forward or a reverse read. \& Returns : Nothing. \& Args : two scalars: one representing the forward designator and one \& representing the reverse designator .Ve .SS "set_forward_designator($designator)" .IX Subsection "set_forward_designator($designator)" .Vb 6 \& Title : set_forward_designator($designator) \& Usage : $o_trim\->set_forward_designator("F") \& Function: Set the string by which the system determines if a given \& sequence is a forward read. \& Returns : Nothing. \& Args : A string representing the forward designator of this project. .Ve .SS "set_reverse_designator($reverse_designator)" .IX Subsection "set_reverse_designator($reverse_designator)" .Vb 6 \& Title : set_reverse_designator($reverse_designator) \& Function: Set the string by which the system determines if a given \& sequence is a reverse read. \& Usage : $o_trim\->set_reverse_designator("R") \& Returns : Nothing. \& Args : A string representing the forward designator of this project. .Ve .SS "\fBget_designators()\fP" .IX Subsection "get_designators()" .Vb 5 \& Title : get_designators() \& Usage : $o_trim\->get_designators() \& Returns : A string describing the current designators. \& Args : None \& Notes : Really for informational purposes only. Duh. .Ve .SS "\fBtrim_leading_polys()\fP" .IX Subsection "trim_leading_polys()" .Vb 7 \& Title : trim_leading_polys() \& Usage : $o_trim\->trim_leading_polys() \& Function: Not implemented. Does nothing. \& Returns : Nothing. \& Args : None. \& Notes : This function is not implemented. Part of something I wanted to \& do but never got around to doing. .Ve .SS "\fBdump_hash()\fP" .IX Subsection "dump_hash()" .Vb 6 \& Title : dump_hash() \& Usage : $o_trim\->dump_hash() \& Function: Unimplemented. \& Returns : Nothing. \& Args : None. \& Notes : Does nothing. .Ve .SS "trim_singlet($sequence,$quality,$name,$class)" .IX Subsection "trim_singlet($sequence,$quality,$name,$class)" .Vb 10 \& Title : trim_singlet($sequence,$quality,$name,$class) \& Usage : ($r_trim_points,$trimmed_sequence) = \& @{$o_trim\->trim_singlet($sequence,$quality,$name,$class)}; \& Function: Trim a singlet based on its quality. \& Returns : a reference to an array containing the forward and reverse \& trim points and the trimmed sequence. \& Args : $sequence : A sequence (SCALAR, please) \& $quality : A _scalar_ of space\-delimited quality values. \& $name : the name of the sequence \& $class : The class of the sequence. One of qw(singlet \& singleton doublet pair multiplet) \& Notes : At the time this was written the bioperl objects SeqWithQuality \& and PrimaryQual did not exist. This is what is with the clumsy \& passing of references and so on. I will rewrite this next time I \& have to work with it. I also wasn\*(Aqt sure whether this function \& should return just the trim points or the points and the sequence. \& I decided that I always wanted both so that\*(Aqs how I implemented \& it. \& \- Note that the size of the sliding windows is set during construction of \& the Bio::Tools::Alignment::Trim object. .Ve .SS "trim_doublet($sequence,$quality,$name,$class)" .IX Subsection "trim_doublet($sequence,$quality,$name,$class)" .Vb 10 \& Title : trim_doublet($sequence,$quality,$name,$class) \& Usage : ($r_trim_points,$trimmed_sequence) = \& @{$o_trim\->trim_singlet($sequence,$quality,$name,$class)}; \& Function: Trim a singlet based on its quality. \& Returns : a reference to an array containing the forward and reverse \& Args : $sequence : A sequence \& $quality : A _scalar_ of space\-delimited quality values. \& $name : the name of the sequence \& $class : The class of the sequence. One of qw(singlet \& singleton doublet pair multiplet) \& Notes : At the time this was written the bioperl objects SeqWithQuality \& and PrimaryQual did not exist. This is what is with the clumsy \& passing of references and so on. I will rewrite this next time I \& have to work with it. I also wasn\*(Aqt sure whether this function \& should return just the trim points or the points and the sequence. \& I decided that I always wanted both so that\*(Aqs how I implemented \& it. .Ve .SS "chop_sequence($name,$class,$sequence,@points)" .IX Subsection "chop_sequence($name,$class,$sequence,@points)" .Vb 10 \& Title : chop_sequence($name,$class,$sequence,@points) \& Usage : ($start_point,$end_point,$chopped_sequence) = \& $o_trim\->chop_sequence($name,$class,$sequence,@points); \& Function: Chop a sequence based on its name, class, and sequence. \& Returns : an array containing three scalars: \& 1\- the start trim point \& 2\- the end trim point \& 3\- the chopped sequence \& Args : \& $name : the name of the sequence \& $class : The class of the sequence. One of qw(singlet \& singleton doublet pair multiplet) \& $sequence : A sequence \& @points : An array containing two elements\- the first contains \& the start trim point and the second conatines the end trim \& point. .Ve .SS "_get_start($r_quals,$windowsize,$phreds,$offset)" .IX Subsection "_get_start($r_quals,$windowsize,$phreds,$offset)" .Vb 12 \& Title : _get_start($r_quals,$windowsize,$phreds,$offset) \& Usage : $start_base = $self\->_get_start($r_windows,5,20); \& Function: Provide the start trim point for this sequence. \& Returns : a scalar representing the start of the sequence \& Args : \& $r_quals : A reference to an array containing quality values. In \& context, this array of values has been smoothed by then \& sliding window\-look ahead algorithm. \& $windowsize : The size of the window used when the sliding window \& look\-ahead average was calculated. \& $phreds : \& $offset : .Ve .SS "_get_end($r_qual,$windowsize,$phreds,$count)" .IX Subsection "_get_end($r_qual,$windowsize,$phreds,$count)" .Vb 12 \& Title : _get_end($r_qual,$windowsize,$phreds,$count) \& Usage : my $end_base = &_get_end($r_windows,20,20,$start_base); \& Function: Get the end trim point for this sequence. \& Returns : A scalar representing the end trim point for this sequence. \& Args : \& $r_qual : A reference to an array containing quality values. In \& context, this array of values has been smoothed by then \& sliding window\-look ahead algorithm. \& $windowsize : The size of the window used when the sliding window \& look\-ahead average was calculated. \& $phreds : \& $count : Start looking for the end of the sequence here. .Ve .SS "count_doublet_trailing_zeros($r_qual)" .IX Subsection "count_doublet_trailing_zeros($r_qual)" .Vb 8 \& Title : count_doublet_trailing_zeros($r_qual) \& Usage : my $start_of_trailing_zeros = &count_doublet_trailing_zeros(\e@qual); \& Function: Find out when the trailing zero qualities start. \& Returns : A scalar representing where the zeros start. \& Args : A reference to an array of quality values. \& Notes : Again, this should be rewritten to use PrimaryQual objects. \& A more detailed explanation of why phrap puts these zeros here should \& be written and placed here. Please email and hassle the author. .Ve .SS "_sliding_window($r_quals,$windowsize)" .IX Subsection "_sliding_window($r_quals,$windowsize)" .Vb 9 \& Title : _sliding_window($r_quals,$windowsize) \& Usage : my $r_windows = &_sliding_window(\e@qual,$windowsize); \& Function: Create a sliding window, look\-forward\-average on an array \& of quality values. Used to smooth out differences in qualities. \& Returns : A reference to an array containing the smoothed values. \& Args : $r_quals: A reference to an array containing quality values. \& $windowsize : The size of the sliding window. \& Notes : This was written before PrimaryQual objects existed. They \& should use that object but I haven\*(Aqt rewritten this yet. .Ve .SS "_print_formatted_qualities" .IX Subsection "_print_formatted_qualities" .Vb 5 \& Title : _print_formatted_qualities(\e@quals) \& Usage : &_print_formatted_qualities(\e@quals); \& Returns : Nothing. Prints. \& Args : A reference to an array containing quality values. \& Notes : An internal procedure used in debugging. Prints out an array nicely. .Ve .SS "_get_end_old($r_qual,$windowsize,$phreds,$count)" .IX Subsection "_get_end_old($r_qual,$windowsize,$phreds,$count)" .Vb 4 \& Title : _get_end_old($r_qual,$windowsize,$phreds,$count) \& Usage : Deprecated. Don\*(Aqt use this! \& Returns : Deprecated. Don\*(Aqt use this! \& Args : Deprecated. Don\*(Aqt use this! .Ve