
Bio::Phylo::Taxa - An object-oriented module for managing taxa.

use Bio::Phylo::Taxa;
use Bio::Phylo::Taxa::Taxon;
# A mesquite-style default
# taxa block for 10 taxa.
my $taxa = Bio::Phylo::Taxa->new;
for my $i ( 1 .. 10 ) {
my $taxon = Bio::Phylo::Taxa::Taxon->new(
'-name' => 'taxon_' . $i,
);
$taxa->insert( $taxon );
}

The Bio::Phylo::Taxa object models a set of operational taxonomic units. The object subclasses the Bio::Phylo::Listable object, and so the filtering methods of that class are available.
A taxa object can link to multiple forest and matrix objects.

Taxa constructor.
Type : Constructor Title : new Usage : my $taxa = Bio::Phylo::Taxa->new; Function: Instantiates a Bio::Phylo::Taxa object. Returns : A Bio::Phylo::Taxa object. Args : none.
Sets associated Bio::Phylo::Forest object.
Type : Mutator
Title : set_forest
Usage : $taxa->set_forest( $forest );
Function: Associates forest with the
invocant taxa object (i.e.
creates reference).
Returns : Modified object.
Args : A Bio::Phylo::Forest object
Comments: A taxa object can link to multiple
forest and matrix objects.
Sets associated Bio::Phylo::Matrices::Matrix object.
Type : Mutator
Title : set_matrix
Usage : $taxa->set_matrix($matrix);
Function: Associates matrix with the
invocant taxa object (i.e.
creates reference).
Returns : Modified object.
Args : A Bio::Phylo::Matrices::Matrix object
Comments: A taxa object can link to multiple
forest and matrix objects.
Removes association with argument Bio::Phylo::Forest object.
Type : Mutator
Title : unset_forest
Usage : $taxa->unset_forest($forest);
Function: Disassociates forest from the
invocant taxa object (i.e.
removes reference).
Returns : Modified object.
Args : A Bio::Phylo::Forest object
Removes association with Bio::Phylo::Matrices::Matrix object.
Type : Mutator
Title : unset_matrix
Usage : $taxa->unset_matrix($matrix);
Function: Disassociates matrix from the
invocant taxa object (i.e.
removes reference).
Returns : Modified object.
Args : A Bio::Phylo::Matrices::Matrix object
Gets all associated Bio::Phylo::Forest objects.
Type : Accessor
Title : get_forests
Usage : @forests = @{ $taxa->get_forests };
Function: Retrieves forests associated
with the current taxa object.
Returns : An ARRAY reference of
Bio::Phylo::Forest objects.
Args : None.
Gets all associated Bio::Phylo::Matrices::Matrix objects.
Type : Accessor
Title : get_matrices
Usage : @matrices = @{ $taxa->get_matrices };
Function: Retrieves matrices associated
with the current taxa object.
Returns : An ARRAY reference of
Bio::Phylo::Matrices::Matrix objects.
Args : None.
Gets number of contained Bio::Phylo::Taxa::Taxon objects.
Type : Accessor Title : get_ntax Usage : my $ntax = $taxa->get_ntax; Function: Retrieves the number of taxa for the invocant. Returns : INT Args : None. Comments:
Merges argument Bio::Phylo::Taxa object with invocant.
Type : Method
Title : merge_by_name
Usage : $taxa->merge_by_name($other_taxa);
Function: Merges two taxa objects such that
internally different taxon objects
with the same name become a single
object with the combined references
to datum objects and node objects
contained by the two.
Returns : A merged Bio::Phylo::Taxa object.
Args : A Bio::Phylo::Taxa object.
Serializes invocant to nexus format.
Type : Format convertor Title : to_nexus Usage : my $block = $taxa->to_nexus; Function: Converts $taxa into a nexus taxa block. Returns : Nexus taxa block (SCALAR). Args : -links => 1 (optional, adds 'TITLE' token) Comments:

The Bio::Phylo::Taxa object inherits from the Bio::Phylo::Listable object. Look there for more methods applicable to the taxa object.
Also see the manual: Bio::Phylo::Manual.

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