.\" 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::Align::Utilities 3pm" .TH Bio::Align::Utilities 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::Align::Utilities \- A collection of utilities regarding converting and manipulating alignment objects .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Bio::Align::Utilities qw(:all); \& \& # Even if the protein alignments are local make sure the start/end \& # stored in the LocatableSeq objects are to the full length protein. \& # The coding sequence that is passed in should still be the full \& # length CDS as the nt alignment will be generated. \& # %dnaseqs is a hash of CDS sequences (spliced) \& my $dna_aln = aa_to_dna_aln($aa_aln,\e%dnaseqs); \& \& # The reverse, which is simpler. The input alignment has to be \& # translate\-able, with gap lengths and an overall length divisible by 3 \& my $aa_aln = dna_to_aa_aln($dna_al); \& \& # Generate bootstraps \& my $replicates = bootstrap_replicates($aln,$count); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module contains utility methods for manipulating sequence alignments (Bio::Align::AlignI) objects. .PP The \fBaa_to_dna_aln\fR utility is essentially the same as the \fBmrtrans\fR program by Bill Pearson available at ftp://ftp.virginia.edu/pub/fasta/other/mrtrans.shar. Of course this is a pure-Perl implementation, but just to mention that if anything seems odd you can check the alignments generated against Bill's program. .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 the Bioperl mailing list. 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 of 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 \- Jason Stajich" .IX Header "AUTHOR - Jason Stajich" Email jason-at-bioperl-dot-org .SH "APPENDIX" .IX Header "APPENDIX" The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ .SS "aa_to_dna_aln" .IX Subsection "aa_to_dna_aln" .Vb 10 \& Title : aa_to_dna_aln \& Usage : my $dnaaln = aa_to_dna_aln($aa_aln, \e%seqs); \& Function: Will convert an AA alignment to DNA space given the \& corresponding DNA sequences. Note that this method expects \& the DNA sequences to be in frame +1 (GFF frame 0) as it will \& start to project into coordinates starting at the first base of \& the DNA sequence, if this alignment represents a different \& frame for the cDNA you will need to edit the DNA sequences \& to remove the 1st or 2nd bases (and revcom if things should be). \& Returns : Bio::Align::AlignI object \& Args : 2 arguments, the alignment and a hashref. \& Alignment is a Bio::Align::AlignI of amino acid sequences. \& The hash reference should have keys which are \& the display_ids for the aa \& sequences in the alignment and the values are a \& Bio::PrimarySeqI object for the corresponding \& spliced cDNA sequence. .Ve .PP See also: Bio::Align::AlignI, Bio::SimpleAlign, Bio::PrimarySeq .SS "dna_to_aa_aln" .IX Subsection "dna_to_aa_aln" .Vb 7 \& Title : dna_to_aa_aln \& Usage : my $aa_aln = dna_to_aa_aln($dna_aln); \& Function: Convert a DNA alignment to an amino acid alignment where \& the length of all alignment strings and the lengths of any \& gaps must be divisible by 3 \& Returns : Bio::Align::AlignI object \& Args : the DNA alignment, a Bio::Align::AlignI of DNA sequences .Ve .PP See also: Bio::Align::AlignI, Bio::SimpleAlign, Bio::PrimarySeq .SS "bootstrap_replicates" .IX Subsection "bootstrap_replicates" .Vb 8 \& Title : bootstrap_replicates \& Usage : my $alns = &bootstrap_replicates($aln,100); \& Function: Generate a pseudo\-replicate of the data by randomly \& sampling, with replacement, the columns from an alignment for \& the non\-parametric bootstrap. \& Returns : Arrayref of L objects \& Args : L object \& Number of replicates to generate .Ve .SS "bootstrap_replicates_codons" .IX Subsection "bootstrap_replicates_codons" .Vb 9 \& Title : bootstrap_replicates_codons \& Usage : my $alns = &bootstrap_replicates_codons($aln,100); \& Function: Generate a pseudo\-replicate of the data by randomly \& sampling, with replacement, the columns from a codon alignment for \& the non\-parametric bootstrap. The alignment is assumed to start on \& the first position of a codon. \& Returns : Arrayref of L objects \& Args : L object \& Number of replicates to generate .Ve .SS "cat" .IX Subsection "cat" .Vb 12 \& Title : cat \& Usage : $aln123 = cat($aln1, $aln2, $aln3) \& Function : Concatenates alignment objects. Sequences are identified by id. \& An error will be thrown if the sequence ids are not unique in the \& first alignment. If any ids are not present or not unique in any \& of the additional alignments then those sequences are omitted from \& the concatenated alignment, and a warning is issued. An error will \& be thrown if any of the alignments are not flush, since \& concatenating such alignments is unlikely to make biological \& sense. \& Returns : A new Bio::SimpleAlign object \& Args : A list of Bio::SimpleAlign objects .Ve .SS "most_common_sequences" .IX Subsection "most_common_sequences" .Vb 10 \& Title : most_common_sequences \& Usage : @common = most_common_sequences ($align, $case_sensitivity) \& Function : Returns an array of the sequences that appear most often in the \& alignment (although this probably makes more sense when there is \& only a single most common sequence). Sequences are compared after \& removing any "\-" (gap characters), and ambiguous units (e.g., R \& for purines) are only compared to themselves. The returned \& sequence is also missing the "\-" since they don\*(Aqt actually make \& part of the sequence. \& Returns : Array of text strings. \& Arguments : Optional argument defining whether the comparison between sequences \& to find the most common should be case sensitive. Defaults to \& false, i.e, not case sensitive. .Ve