Bio::Align::DNAStatistics - Calculate some statistics for a DNA alignment
use Bio::Align::DNAStatistics; use Bio::AlignIO; my $stats = new Bio::Align::PairwiseStatistics; my $alignin = new Bio::AlignIO(-format => 'emboss', -file => 't/data/insulin.water'); my $jc = $stats->distance($aln, 'Jukes-Cantor'); foreach my $r ( @$jc ) { print "\t"; foreach my $r ( @$d ) { print "$r\t"; } print "\n"; }
This object contains routines for calculating various statistics and distances for DNA alignments. The routines are not well tested and do contain errors at this point. Work is underway to correct them, but do not expect this code to give you the right answer currently! Use dnadist/distmat in the PHLYIP or EMBOSS packages to calculate the distances.
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.
bioperl-l@bioperl.org - General discussion http://bioperl.org/MailList.shtml - About the mailing lists
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 email or the web:
bioperl-bugs@bioperl.org http://bugzilla.bioperl.org/
Email jason@bioperl.org
Describe contact details here
Additional contributors names and emails here
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
Title : new Usage : my $obj = new Bio::Align::DNAStatistics(); Function: Builds a new Bio::Align::DNAStatistics object Returns : Bio::Align::DNAStatistics Args : none
Title : distance Usage : my $distance_mat = $stats->distance(-align => $aln, -method => $method); Function: Calculates a distance matrix for all pairwise distances of sequences in an alignment. Returns : Array ref Args : -align => Bio::Align::AlignI object -method => String specifying specific distance method (implementing class may assume a default)
Title : available_distance_methods Usage : my @methods = $stats->available_distance_methods(); Function: Enumerates the possible distance methods Returns : Array of strings Args : none
Title : D_JukesCantor Usage : my $d = $stat->D_JukesCantor($aln) Function: Calculates D (pairwise distance) between 2 sequences in an alignment using the Jukes-Cantor 1 parameter model. Returns : ArrayRef of all pairwise distances of all sequence pairs in the alignment Args : Bio::Align::AlignI of DNA sequences double - gap penalty
Title : D_F81 Usage : my $d = $stat->D_F81($aln) Function: Calculates D (pairwise distance) between 2 sequences in an alignment using the Felsenstein 1981 distance model. Returns : ArrayRef of a 2d array of all pairwise distances in the alignment Args : Bio::Align::AlignI of DNA sequences
Title : D_Kimura Usage : my $d = $stat->D_Kimura($aln) Function: Calculates D (pairwise distance) between 2 sequences in an alignment using the Kimura 2 parameter model. Returns : ArrayRef of pairwise distances between all sequences in alignment Args : Bio::Align::AlignI of DNA sequences
Title : D_Tamura Usage : Function: Returns : Args :
Title : D_F84 Usage : my $d = $stat->D_F84($aln) Function: Calculates D (pairwise distance) between 2 sequences in an alignment using the Felsenstein 1984 distance model. Returns : Distance value Args : Bio::Align::AlignI of DNA sequences double - gap penalty
Title : D_TajimaNei Usage : my $d = $stat->D_TajimaNei($aln) Function: Calculates D (pairwise distance) between 2 sequences in an alignment using the TajimaNei 1984 distance model. Returns : Distance value Args : Bio::Align::AlignI of DNA sequences
Title : K_JukesCantor Usage : my $k = $stats->K_JukesCantor($aln) Function: Calculates K - the number of nucleotide substitutions between 2 seqs - according to the Jukes-Cantor 1 parameter model This only involves the number of changes between two sequences. Returns : double Args : Bio::Align::AlignI
Title : K_TajimaNei Usage : my $k = $stats->K_TajimaNei($aln) Function: Calculates K - the number of nucleotide substitutions between 2 seqs - according to the Kimura 2 parameter model. This does not assume equal frequencies among all the nucleotides. Returns : ArrayRef of 2d matrix which contains pairwise K values for all sequences in the alignment Args : Bio::Align::AlignI
Title : transversions Usage : my $transversions = $stats->transversion($aln); Function: Calculates the number of transversions between two sequences in an alignment Returns : integer Args : Bio::Align::AlignI
Title : transitions Usage : my $transitions = Bio::Align::DNAStatistics->transitions($aln); Function: Calculates the number of transitions in a given DNA alignment Returns : integer representing the number of transitions Args : Bio::Align::AlignI object
Title : pairwise_stats Usage : $obj->pairwise_stats($newval) Function: Returns : value of pairwise_stats Args : newvalue (optional)
To install LocalConfig, copy and paste the appropriate command in to your terminal.
cpanm
cpanm LocalConfig
CPAN shell
perl -MCPAN -e shell install LocalConfig
For more information on module installation, please visit the detailed CPAN module installation guide.