The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Bio::Phylo::Forest - The forest object, a set of phylogenetic trees.

SYNOPSIS

 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;

DESCRIPTION

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.

METHODS

CONSTRUCTOR

new()

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.

METHODS

check_taxa()

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
to_nexus()

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:

SEE ALSO

Bio::Phylo::Listable

The forest object inherits from the Bio::Phylo::Listable object. The methods defined therein are applicable to forest objects.

Bio::Phylo::Taxa::TaxaLinker

The forest object inherits from the Bio::Phylo::Taxa::TaxaLinker object. The methods defined therein are applicable to forest objects.

Bio::Phylo::Manual

Also see the manual: Bio::Phylo::Manual.

REVISION

 $Id: Forest.pm 4265 2007-07-20 14:14:44Z rvosa $