Bio::Phylo::Forest - The forest object, a set of phylogenetic trees.
use Bio::Phylo::Forest; use Bio::Phylo::Forest::Tree; my $forest = Bio::Phylo::Forest->new; my $tree = Bio::Phylo::Forest::Tree->new; $forest->insert($tree); print $forest->to_nexus;
The Bio::Phylo::Forest object models a set of trees. The object subclasses the Bio::Phylo::Listable object, so look there for more methods available to forest objects.
Forest constructor.
Type : Constructor Title : new Usage : my $trees = Bio::Phylo::Forest->new; Function: Instantiates a Bio::Phylo::Forest object. Returns : A Bio::Phylo::Forest object. Args : None required, though see the superclass Bio::Phylo::Listable from which this object inherits.
Validates taxon links of nodes in invocant's trees.
Type : Method Title : check_taxa Usage : $trees->check_taxa; Function: Validates the taxon links of the nodes of the trees in $trees Returns : A validated Bio::Phylo::Forest object. Args : None
Serializer to nexus format.
Type : Format convertor Title : to_nexus Usage : my $data_block = $matrix->to_nexus; Function: Converts matrix object into a nexus data block. Returns : Nexus data block (SCALAR). Args : Trees can be formatted using the same arguments as those passed to Bio::Phylo::Unparsers::Newick. In addition, you can provide: # as per mesquite's inter-block linking system (default is false): -links => 1 (to create a TITLE token, and a LINK token, if applicable) # rooting is determined based on basal trichotomy. "token" means 'TREE' or 'UTREE' # is used, "comment" means [&R] or [&U] is used, "nhx" means [%unrooted=on] or # [%unrooted=off] if used, default is "comment" -rooting => one of (token|comment|nhx) # to map taxon names to indices (default is false) -make_translate => 1 (autogenerate translation table, overrides -translate => {}) Comments:
The forest object inherits from the Bio::Phylo::Listable object. The methods defined therein are applicable to forest objects.
The forest object inherits from the Bio::Phylo::Taxa::TaxaLinker object. The methods defined therein are applicable to forest objects.
Also see the manual: Bio::Phylo::Manual.
$Id: Forest.pm 4265 2007-07-20 14:14:44Z rvosa $
To install Bio::Phylo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::Phylo
CPAN shell
perl -MCPAN -e shell install Bio::Phylo
For more information on module installation, please visit the detailed CPAN module installation guide.