Bio::Tree::Node - A Simple Tree Node
use Bio::Tree::Node; my $nodeA = new Bio::Tree::Node(); my $nodeL = new Bio::Tree::Node(); my $nodeR = new Bio::Tree::Node(); my $node = new Bio::Tree::Node(); $node->add_Descendents($nodeL); $node->add_Descendents($nodeR); print "node is not a leaf \n" if( $node->is_leaf);
Makes a Tree Node suitable for building a Tree.
User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated.
bioperl-l@bioperl.org - General discussion http://bioperl.org/MailList.shtml - About the mailing lists
Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via email or the web:
bioperl-bugs@bioperl.org http://bioperl.org/bioperl-bugs/
Email jason@bioperl.org
Describe contact details here
Additional contributors names and emails here
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
Title : new Usage : my $obj = new Bio::Tree::Node(); Function: Builds a new Bio::Tree::Node object Returns : Bio::Tree::Node Args : -left => pointer to Left descendent (optional) -right => pointer to Right descenent (optional) -branch_length => branch length [integer] (optional) -bootstrap => value bootstrap value (string) -desc => description of node -id => unique id for node
Title : add_Descendent Usage : $node->add_Descendant($node); Function: Adds a descendent to a node Returns : number of current descendents for this node Args : Bio::Node::NodeI
Title : each_Descendent Usage : my @nodes = $node->each_Descendent; Function: all the descendents for this Node (but not their descendents i.e. not a recursive fetchall) Returns : Array of Bio::Tree::NodeI objects Args : none
Title : get_Descendents Usage : my @nodes = $node->get_Descendents; Function: Recursively fetch all the nodes and their descendents *NOTE* This is different from each_Descendent Returns : Array or Bio::Tree::NodeI objects Args : none
Title : ancestor Usage : $obj->ancestor($newval) Function: Set the Ancestor Returns : value of ancestor Args : newvalue (optional)
Title : branch_length Usage : $obj->branch_length($newval) Function: Example : Returns : value of branch_length Args : newvalue (optional)
Title : bootstrap Usage : $obj->bootstrap($newval) Function: Example : Returns : value of bootstrap Args : newvalue (optional)
Title : description Usage : $obj->description($newval) Function: Example : Returns : value of description Args : newvalue (optional)
Title : id Usage : $obj->id($newval) Function: Example : Returns : value of id Args : newvalue (optional)
Title : is_Leaf Usage : if( $node->is_Leaf ) Function: Get Leaf status Returns : boolean Args : none
Title : to_string Usage : my $str = $node->to_string() Function: For debugging, provide a node as a string Returns : string Args : none
Title : height Usage : my $len = $node->height Function: Returns the height of the tree starting at this node. Height is the maximum branchlength. Returns : The longest length (weighting branches with branch_length) to a leaf Args : none
To install Bio::Seq, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::Seq
CPAN shell
perl -MCPAN -e shell install Bio::Seq
For more information on module installation, please visit the detailed CPAN module installation guide.