GSP
Quick Navigator

Search Site

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

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Bio::NEXUS::Node(3) User Contributed Perl Documentation Bio::NEXUS::Node(3)

Bio::NEXUS::Node - Provides functions for manipulating nodes in trees

new Bio::NEXUS::Node;

Provides a few useful functions for nodes.

All feedback (bugs, feature enhancements, etc.) are all greatly appreciated. There are no mailing lists at this time for the Bio::NEXUS::Node module, so send all relevant contributions to Dr. Weigang Qiu (weigang@genectr.hunter.cuny.edu).

 Weigang Qiu (weigang@genectr.hunter.cuny.edu)
 Eugene Melamud (melamud@carb.nist.gov)
 Chengzhi Liang (liangc@umbi.umd.edu)
 Thomas Hladish (tjhladish at yahoo)

 Peter Yang (pyang@rice.edu)

 Title   : new
 Usage   : $node = new Bio::NEXUS::Node();
 Function: Creates a new Bio::NEXUS::Node object
 Returns : Bio::NEXUS::Node object
 Args    : none

 Title   : clone
 Usage   : my $newblock = $block->clone();
 Function: clone a block object (shallow)
 Returns : Block object
 Args    : none

 Title   : get_seq
 Usage   : $sequence = $node->get_seq();
 Function: Returns the node's sequence
 Returns : sequence (string)
 Args    : none

 Title   : set_seq
 Usage   : $node->set_seq($sequence);
 Function: Sets sequence of the node
 Returns : none
 Args    : sequence (string)

 Title   : set_parent_node
 Usage   : $node->set_parent_node($parent);
 Function: Sets the parent node of the node
 Returns : none
 Args    : parent node (Bio::NEXUS::Node object)

 Title   : get_parent
 Usage   : $parent=$node->get_parent();
 Function: Returns the parent node of the node
 Returns : parent node (Bio::NEXUS::Node object) or undef if nonexistent
 Args    : none

 Title   : set_length
 Usage   : $node->set_length($length);
 Function: Sets the node's length (meaning the length of the branch leading to the node)
 Returns : none
 Args    : length (number)

 Title   : length
 Usage   : $length=$node->get_length();
 Function: Returns the node's length
 Returns : length (integer) or undef if nonexistent
 Args    : none

 Title   : get_total_length
 Usage   : $total_length = $node->get_total_length();
 Function: Gets the total branch length of the node and that of all the children (???)
 Returns : total branch length
 Args    : none

 Title   : set_support_value
 Usage   : $node->set_support_value($bootstrap);
 Function: Sets the branch support value associated with this node
 Returns : none
 Args    : bootstrap value (integer)

 Title   : get_support_value
 Usage   : $bootstrap = $node->get_support_value();
 Function: Returns the branch support value associated with this node
 Returns : bootstrap value (integer) or undef if nonexistent
 Args    : none

 Title   : set_name
 Usage   : $node->set_name($name);
 Function: Sets the node's name
 Returns : none
 Args    : name (string/integer)

 Title   : get_name
 Usage   : $name = $node->get_name();
 Function: Returns the node's name
 Returns : name (integer/string) or undef if nonexistent
 Args    : none

 Title   : is_otu
 Usage   : $node->is_otu();
 Function: Returns 1 if the node is an OTU or 0 if it is not (internal node)
 Returns : 1 or 0
 Args    : none

 Title   : add_childTU
 Usage   : $node->add_child($node);
 Function: Adds a child to an existing node
 Returns : none
 Args    : child (Bio::NEXUS::Node object)

 Title   : get_distance
 Usage   : $distance = $node1->get_distance($node2);
 Function: Calculates tree distance from one node to another (?)
 Returns : distance (floating-point number)
 Args    : target node (Bio::NEXUS::Node objects)

 Title   : to_string
 Usage   : my $string; $root->tree_string(\$string, 0, $format)
 Function: recursively builds Newick tree string from root to tips 
 Returns : none
 Args    : reference to string, boolean $remove_inode_names flag, string - $format (NHX or STD)

 Title   : set_children
 Usage   : $node->set_children($children);
 Function: Sets children
 Returns : $node
 Args    : arrayref of children

 Title   : get_children
 Usage   : @children = @{ $node->get_children() };
 Function: Retrieves list of children
 Returns : array of children (Bio::NEXUS::Node objects)
 Args    : none

 Title   : walk
 Usage   : @descendents = $node->walk();
 Function: Walks through tree and compiles a "clade list" 
     (including $self and all inodes and otus descended from $self)
 Returns : array of nodes
 Args    : generally, none, though walk() calls itself recurseively with 
     2 arguments: the node list so far, and a counting variable for inode-naming

 Title   : get_otus
 Usage   : @listOTU = @{$node->get_otu()}; (?)
 Function: Retrieves list of OTUs
 Returns : reference to array of OTUs (Bio::NEXUS::Node objects)
 Args    : none

 Title   : printall
 Usage   : $tree_as_string = $self->printall(); 
 Function: Gets the node properties as a tabbed string for printing nicely 
           formatted trees (developed by Tom)
 Returns : Formatted string
 Args    : Bio::NEXUS::Node object

 Title   : find
 Usage   : $node = $node->find($name);
 Function: Finds the first occurrence of a node called 'name' in the tree
 Returns : Bio::NEXUS::Node object
 Args    : name (string)

 Name    : prune
 Usage   : $node->prune($OTUlist);
 Function: Removes everything from the tree except for OTUs specified in $OTUlist
 Returns : none
 Args    : list of OTUs (string)

 Name    : equals
 Usage   : $node->equals($another_node);
 Function: compare if two nodes (and their subtrees) are equivalent
 Returns : 1 if equal or 0 if not
 Args    : another Node object

 Name    : get_siblings
 Usage   : $node->get_siblings();
 Function: get sibling nodes of this node
 Returns : array ref of sibling nodes
 Args    : none

 Name    : is_sibling
 Usage   : $node1->is_sibling($node2);
 Function: tests whether node1 and node2 are siblings
 Returns : 1 if true, 0 if false
 Args    : second node

 Title   : adopt
 Usage   : $parent->adopt($child, $overwrite_children);
 Function: make a parent-child relationship between two nodes
 Returns : none
 Args    : the child node, boolean clobber flag

 Title   : combine
 Usage   : my $newblock = $node->combine($child);
 Function: removes a node from the tree, effectively by sliding its only child up the branch to its former position
 Returns : none
 Args    : the child node
 Methods : Combines the child node and the current node by assigning the
           name, bootstrap value, children and other properties of the child.  The branch length
           of the current node is added to the child node's branch length.

 Title   : set_depth
 Usage   : $root->set_depth();
 Function: Determines depth in tree of every node below this one
 Returns : none
 Args    : This node's depth

 Title   : get_depth
 Usage   : $depth = $node->get_depth();
 Function: Returns the node's depth (number of 'generations' removed from the root) in tree
 Returns : integer representing node's depth
 Args    : none

 Title   : find_lengths
 Usage   : $cladogram = 1 unless $root->find_lengths();
 Function: Tries to determine if branch lengths are present in the tree
 Returns : 1 if lengths are found, 0 if not
 Args    : none

 Title     : mrca
 Usage     : $mrca = $otu1-> mrca($otu2, $treename);
 Function  : Finds most recent common ancestor of otu1 and otu2
 Returns   : Node object of most recent common ancestor
 Args      : Nexus object, two otu objects, name of tree to look in

 Title     : get_mrca_of_otus
 Usage     : $mrca = $root->get_mrca_of_otus(\@otus);
 Function  : Finds most recent common ancestor of set of OTUs
 Returns   : Node object of most recent common ancestor
 Args      : Nexus object, two otu objects, name of tree to look in

Title : contains_nhx_tag Usage : $node_obj->_contains_nhx_tag($tag_name) Function: Checks if a given tag exists Returns : 1 if the tax exists, 0 if it doesn't Args : $tag_name - a string representation of a tag

Title : get_nhx_tags Usage : $node_obj->get_nhx_tags(); Function: Reads and returns an array of tags Returns : An array of tags Args : None

Title : get_nhx_values Usage : $node_obj->get_nhx_values($tag_name); Function: Returns the list of values associated with a given tag ($tag_name) Returns : Array of values Args : $tag_name - a string representation of the tag

Title : set_nhx_tag Usage : node_obj->set_nhx_tag($tag_name, $tag_reference); Function: Updates the list of values associated with a given tag Returns : Nothing Args : $tag_name - a string, $tag_reference - an array-reference

Title : add_nhx_tag_value Usage : $node_obj->add_nhx_tag_value($tag_name, $tag_value); Function: Adds a new tag/value set to the $nhx_obj; Returns : Nothing Args : $tag_name - a string, $tag_reference - an array-reference

Title : delete_nhx_tag Usage : $node_obj->delete_nhx_tag($tag_name); Function: Removes a given tag (and the associated valus) from the $nhx_obj Returns : Nothing Args : $tag_name - a string representation of the tag

Title : delete_all_nhx_tags Usage : $node_obj->delete_all_nhx_tags(); Function: Removes all tags from $nhx_obj Returns : Nothing Args : None

Title : nhx_command_to_string Usage : $node_obj->nhx_command_to_string(); Function: As NHX command string Returns : NHX command string Args : None

Title : clone_nhx_command Usage : $some_node_obj->clone_nhx_command($original_node); Function: Copies the data of the NHX command of the $original_node object into the NHX command of the $some_node_obj Returns : Nothing Args : $original_node - Bio::NEXUS::NHXCmd object whose NHX command data will be cloned

Title : check_nhx_tag_value Usage : $boolean = nhx_obj->check_nhx_tag_value($tag_name, $value); Function: check whether a particular value is present in a tag Returns : 0 or 1 [ true or false] Args : $tag_name - a string, $value - scalar (string or number)

Title : set_nhx_obj Usage : $node->set_nhx_obj($nhx_obj); Function: Sets Bio::NEXUS::NHXCmd object associated with this node Returns : Nothing Args : Reference of the NHXCmd object othing

Title : get_nhx_obj Usage : $nhx_obj = get_nhx_obj(); Function: Returns Bio::NEXUS::NHXCmd object associated with this node Returns : Reference of the NHXCmd object Args : Nothing
2009-08-13 perl v5.32.1

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

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