Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  BIO::PHYLO::FOREST (3)

.ds Aq ’


Bio::Phylo::Forest - Container for tree objects



 use Bio::Phylo::Factory;
 my $fac = Bio::Phylo::Factory->new;
 my $forest = $fac->create_forest;
 my $tree = $fac->create_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.


calc_split_frequency() Calculates frequency of provided split

 Type    : Calculation
 Title   : calc_split_frequency
 Usage   : my $freq = $trees->calc_split_frequency([$node1,$node2]);
 Function: Calculates split frequency
 Returns : Scalar, a number
 Args    : An array of taxon objects, or a taxa object
 Comment :


insert() Inserts trees in forest.

 Type    : Method
 Title   : insert
 Usage   : $trees->insert( $tree1, $tree2, ... );
 Function: Inserts trees in forest.
 Returns : A Bio::Phylo::Forest object.
 Args    : Trees
 Comment : The last seen tree that is set as default
           becomes the default for the entire forest

get_default_tree() Gets the default tree in the forest.

 Type    : Method
 Title   : get_default_tree
 Usage   : my $tree = $trees->get_default_tree;
 Function: Gets the default tree in the forest.
 Returns : A Bio::Phylo::Forest::Tree object.
 Args    : None
 Comment : If no default tree has been set,
           returns first tree.

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

make_consensus() Creates a consensus tree.

 Type    : Method
 Title   : make_consensus
 Usage   : my $tree = $obj->make_consensus
 Function: Creates a consensus tree
 Returns : $tree
 Args    : Optional:
           -fraction => a fraction that specifies the cutoff frequency for including
                    bipartitions in the consensus. Default is 0.5 (MajRule)
           -branches => frequency or average, sets branch lengths to bipartition
                        frequency or average branch length in input trees

make_matrix() Creates an MRP matrix object.

 Type    : Method
 Title   : make_matrix
 Usage   : my $matrix = $obj->make_matrix
 Function: Creates an MRP matrix object
 Returns : $matrix
 Args    : NONE

make_taxa() Creates a taxa block from the objects contents if none exists yet.

 Type    : Method
 Title   : make_taxa
 Usage   : my $taxa = $obj->make_taxa
 Function: Creates a taxa block from the objects contents if none exists yet.
 Returns : $taxa
 Args    : NONE

to_newick() Serializes invocant to newick string.

 Type    : Stringifier
 Title   : to_newick
 Usage   : my $string = $forest->to_newick;
 Function: Turns the invocant forest object
           into a newick string, one line per tree
 Returns : SCALAR
 Args    : The same arguments as

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 mesquites 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 true)
           -make_translate => 1 (autogenerate translation table, overrides -translate => {})
                   # when making a translation table, which index to start (default is
                   # 1, BayesTraits needs 0)
                   -translate_start => 1


There is a mailing list at <!forum/bio-phylo> for any user or developer questions and discussions.
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 and <>.


If you use Bio::Phylo in published research, please cite it:

<B>Rutger A VosB>, <B>Jason CaravasB>, <B>Klaas HartmannB>, <B>Mark A JensenB> and <B>Chase MillerB>, 2011. Bio::Phylo - phyloinformatic analysis using Perl. BMC Bioinformatics <B>12B>:63. <>

Search for    or go to Top of page |  Section 3 |  Main Index

perl v5.20.3 BIO::PHYLO::FOREST (3) 2014-02-08

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.