NAME
Bio::Align::Utilities - A collection of utilities regarding converting and manipulating alignment objects
SYNOPSIS
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,\%dnaseqs);# The reverse, which is simpler. The input alignment has to be# translate-able, with gap lengths and an overall length divisible by 3my $aa_aln = dna_to_aa_aln($dna_al);# Generate bootstrapsmy $replicates = bootstrap_replicates($aln,$count);
DESCRIPTION
This module contains utility methods for manipulating sequence alignments (Bio::Align::AlignI) objects.
The aa_to_dna_aln utility is essentially the same as the mrtrans 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.
FEEDBACK
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.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
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.
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:
https://github.com/bioperl/bioperl-live/issues
AUTHOR - Jason Stajich
Email jason-at-bioperl-dot-org
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
aa_to_dna_aln
Title : aa_to_dna_alnUsage : my $dnaaln = aa_to_dna_aln($aa_aln, \%seqs);Function: Will convert an AA alignment to DNA space given thecorresponding DNA sequences. Note that this method expectsthe DNA sequences to be in frame +1 (GFF frame 0) as it willstart to project into coordinates starting at the first base ofthe DNA sequence, if this alignment represents a differentframe for the cDNA you will need to edit the DNA sequencesto remove the 1st or 2nd bases (and revcom if things should be).Returns : Bio::Align::AlignI objectArgs : 2 arguments, the alignment and a hashref.Alignment is a Bio::Align::AlignI of amino acid sequences.The hash reference should have keys which arethe display_ids for the aasequences in the alignment and the values are aBio::PrimarySeqI object for the correspondingspliced cDNA sequence.
See also: Bio::Align::AlignI, Bio::SimpleAlign, Bio::PrimarySeq
dna_to_aa_aln
Title : dna_to_aa_alnUsage : my $aa_aln = dna_to_aa_aln($dna_aln);Function: Convert a DNA alignment to an amino acid alignment wherethe length of all alignment strings and the lengths of anygaps must be divisible by 3Returns : Bio::Align::AlignI objectArgs : the DNA alignment, a Bio::Align::AlignI of DNA sequences
See also: Bio::Align::AlignI, Bio::SimpleAlign, Bio::PrimarySeq
bootstrap_replicates
Title : bootstrap_replicatesUsage : my $alns = &bootstrap_replicates($aln,100);Function: Generate a pseudo-replicate of the data by randomlysampling, with replacement, the columns from an alignment forthe non-parametric bootstrap.Returns : Arrayref of L<Bio::SimpleAlign> objectsArgs : L<Bio::SimpleAlign> objectNumber of replicates to generate
bootstrap_replicates_codons
Title : bootstrap_replicates_codonsUsage : my $alns = &bootstrap_replicates_codons($aln,100);Function: Generate a pseudo-replicate of the data by randomlysampling, with replacement, the columns from a codon alignment forthe non-parametric bootstrap. The alignment is assumed to start onthe first position of a codon.Returns : Arrayref of L<Bio::SimpleAlign> objectsArgs : L<Bio::SimpleAlign> objectNumber of replicates to generate
cat
Title : catUsage : $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 thefirst alignment. If any ids are not present or not unique in anyof the additional alignments then those sequences are omitted fromthe concatenated alignment, and a warning is issued. An error willbe thrown if any of the alignments are not flush, sinceconcatenating such alignments is unlikely to make biologicalsense.Returns : A new Bio::SimpleAlign objectArgs : A list of Bio::SimpleAlign objects
most_common_sequences
Title : most_common_sequencesUsage : @common = most_common_sequences ($align, $case_sensitivity)Function : Returns an array of the sequences that appear most often in thealignment (although this probably makes more sense when there isonly a single most common sequence). Sequences are compared afterremoving any "-" (gap characters), and ambiguous units (e.g., Rfor purines) are only compared to themselves. The returnedsequence is also missing the "-" since they don't actually makepart of the sequence.Returns : Array of text strings.Arguments : Optional argument defining whether the comparison between sequencesto find the most common should be case sensitive. Defaults tofalse, i.e, not case sensitive.