Rutger Vos
and 1 contributors

NAME

Bio::Phylo::Forest::DBTree::Result::Node - Phylogenetic database record as a node object

SYNOPSIS

 # same API is Bio::Phylo::Forest::Node
 

DESCRIPTION

This package implements an object-relational interface to records in a phylogenetic database. This way, the record can be used as if it's a tree node with the same programming interface as is used by Bio::Phylo, but without making the demands that loading an entire tree in memory would make.

DATABASE ACCESSORS

The following methods directly access fields of the database-backed node record. In principle, these methods can also be used as setters, although for the indexes and keys you really need to know what you're doing or the topology of the tree could become irreparably corrupted.

id()

Returns primary key of the node object, an integer.

parent()

Returns the foreign key of the node object's parent, an integer.

left()

Returns the pre-order index of the node object, an integer.

right()

Returns the post-order index of the node object, an integer.

name()

Returns the node name, a string.

length()

Returns the node's branch length, a floating point number.

height()

Returns the node's height from the root, a floating point number.

NODE METHODS

These methods override methods of the same name in Bio::Phylo, to make more efficient use of the database.

get_parent()

Returns the node's parent, if any.

get_children_rs()

Returns the node's children, if any, as a DBIx::Class result set.

get_children()

Returns the node's children, if any, as an array reference.

get_descendants_rs()

Returns the node's descendants, if any, as a DBIx::Class result set.

get_descendants()

Returns the node's descendants, if any, as an array reference.

get_terminals_rs()

Returns the node's descendant tips, if any, as a DBIx::Class result set.

get_terminals()

Returns the node's descendant tips, if any, as an array reference.

get_internals_rs()

Returns the node's descendant internal nodes, if any, as a DBIx::Class result set.

get_internals()

Returns the node's descendant internal nodes, if any, as an array reference.

get_ancestors_rs()

Returns the node's ancestors, if any, as a DBIx::Class result set.

get_ancestors()

Returns the node's ancestors, if any, as an array ref.

get_mrca()

Given another node in the same tree, returns the most recent common ancestor of the two.

get_id()

Same as id(), see above.

get_name()

Same as name(), see above.

get_branch_length()

Same as length(), see above.

is_descendant_of()

Given another node, determines of the invocant is the descendant of the argument.

calc_patristic_distance()

Given another node, calculates the patristic distance between the two.