NAME
Bio::Phylo::Models::Substitution::Binary - Binary character substitution model
SYNOPSIS
use Bio::Phylo::Models::Substitution::Binary;
# create a binary substitution model # by doing a modeltest my $model = Bio::Phylo::Models::Substitution::Binary->modeltest( -tree => $tree, # phylogeny -matrix => $matrix, # character state matrix, standard categorical data -model => 'ARD', # ace model -char => 'c1', # column ID in $matrix );
# after model test, forward and reverse instantaneous transition # rates are available, e.g. for simulation print $model->forward, "\n"; print $model->reverse, "\n";
DESCRIPTION
This is a class that encapsulates an instantaneous transition model for a binary character. The model is asymmetrical in that the forward and reverse rates (can) differ. The rates can be inferred from a character in a character state matrix by modeltesting. This is done by delegation to the R package ape
. For this to work, you therefore need to have R and ape
installed, as well as the bridge that allows Perl to communicate with R, which is done by the optional package Statistics::R.
METHODS
CONSTRUCTOR
- new
-
Binary character model constructor.
Type : Constructor Title : new Usage : my $model = Bio::Phylo::Models::Substitution::Binary->new(%args); Function: Instantiates a Bio::Phylo::Models::Substitution::Binary object. Returns : A Bio::Phylo::Models::Substitution::Binary object. Args : Optional: -forward => sets forward rate -reverse => sets reverse rate
- set_forward
-
Setter for forward transition rate
Type : method Title : set_forward Usage : $model->set_forward($rate); Function: Setter for forward transition rate Returns : $self Args : A rate (floating point number)
- set_reverse
-
Setter for reverse transition rate
Type : method Title : set_reverse Usage : $model->set_reverse($rate); Function: Setter for reverse transition rate Returns : $self Args : A rate (floating point number)
- get_forward
-
Setter for forward transition rate
Type : method Title : get_forward Usage : my $rate = $model->get_forward; Function: Getter for forward transition rate Returns : A rate (floating point number) Args : NONE
- get_reverse
-
Setter for reverse transition rate
Type : method Title : get_reverse Usage : my $rate = $model->get_reverse; Function: Getter for reverse transition rate Returns : A rate (floating point number) Args : NONE
- modeltest
-
Performs a model test to infer transition rates
Type : method Title : modeltest Usage : my $model = $package->modeltest; Function: Performs a model test to infer transition rates Returns : A populated $model object Args : All required: -tree => $tree, # phylogeny -matrix => $matrix, # character state matrix, standard categorical data -model => 'ARD', # ace model -char => 'c1', # column ID in $matrix
SEE ALSO
There is a mailing list at https://groups.google.com/forum/#!forum/bio-phylo for any user or developer questions and discussions.
- Bio::Phylo::Manual
-
Also see the manual: Bio::Phylo::Manual and http://rutgervos.blogspot.com.
CITATION
If you use Bio::Phylo in published research, please cite it:
Rutger A Vos, Jason Caravas, Klaas Hartmann, Mark A Jensen and Chase Miller, 2011. Bio::Phylo - phyloinformatic analysis using Perl. BMC Bioinformatics 12:63. http://dx.doi.org/10.1186/1471-2105-12-63