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


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

.ds Aq ’

NAME

Bio::Phylo::Forest::Node - Node in a phylogenetic tree

CONTENTS

SYNOPSIS



 # some way to get nodes:
 use Bio::Phylo::IO;
 my $string = ((A,B),C);;
 my $forest = Bio::Phylo::IO->parse(
    -format => newick,
    -string => $string
 );

 # prints Bio::Phylo::Forest
 print ref $forest;

 foreach my $tree ( @{ $forest->get_entities } ) {

    # prints Bio::Phylo::Forest::Tree
    print ref $tree;

    foreach my $node ( @{ $tree->get_entities } ) {

       # prints Bio::Phylo::Forest::Node
       print ref $node;

       # node has a parent, i.e. is not root
       if ( $node->get_parent ) {
          $node->set_branch_length(1);
       }

       # node is root
       else {
          $node->set_branch_length(0);
       }
    }
 }



DESCRIPTION

This module has the getters and setters that alter the state of a node object. Useful behaviours (which are also available) are defined in the Bio::Phylo::Forest::NodeRole package.

METHODS

set_parent() Sets argument as invocant’s parent.



 Type    : Mutator
 Title   : set_parent
 Usage   : $node->set_parent($parent);
 Function: Assigns a nodes parent.
 Returns : Modified object.
 Args    : If no argument is given, the current
           parent is set to undefined. A valid
           argument is Bio::Phylo::Forest::Node
           object.



set_child() Sets argument as invocant’s child.



 Type    : Mutator
 Title   : set_child
 Usage   : $node->set_child($child);
 Function: Assigns a new child to $node
 Returns : Modified object.
 Args    : A valid argument consists of a
           Bio::Phylo::Forest::Node object.



set_branch_length() Sets argument as invocant’s branch length.



 Type    : Mutator
 Title   : set_branch_length
 Usage   : $node->set_branch_length(0.423e+2);
 Function: Assigns a nodes branch length.
 Returns : Modified object.
 Args    : If no argument is given, the
           current branch length is set
           to undefined. A valid argument
           is a number in any of Perls formats.



set_tree() Sets what tree invocant belongs to



 Type    : Mutator
 Title   : set_tree
 Usage   : $node->set_tree($tree);
 Function: Sets what tree invocant belongs to
 Returns : Invocant
 Args    : Bio::Phylo::Forest::Tree
 Comments: This method is called automatically
           when inserting or deleting nodes in
           trees.



get_parent() Gets invocant’s parent.



 Type    : Accessor
 Title   : get_parent
 Usage   : my $parent = $node->get_parent;
 Function: Retrieves a nodes parent.
 Returns : Bio::Phylo::Forest::Node
 Args    : NONE



get_branch_length() Gets invocant’s branch length.



 Type    : Accessor
 Title   : get_branch_length
 Usage   : my $branch_length = $node->get_branch_length;
 Function: Retrieves a nodes branch length.
 Returns : FLOAT
 Args    : NONE
 Comments: Test for "defined($node->get_branch_length)"
           for zero-length (but defined) branches. Testing
           "if ( $node->get_branch_length ) { ... }"
           yields false for zero-but-defined branches!



get_children() Gets invocant’s immediate children.



 Type    : Query
 Title   : get_children
 Usage   : my @children = @{ $node->get_children };
 Function: Returns an array reference of immediate
           descendants, ordered from left to right.
 Returns : Array reference of
           Bio::Phylo::Forest::Node objects.
 Args    : NONE



get_tree() Returns the tree invocant belongs to



 Type    : Query
 Title   : get_tree
 Usage   : my $tree = $node->get_tree;
 Function: Returns the tree $node belongs to
 Returns : Bio::Phylo::Forest::Tree
 Args    : NONE





    # podinherit_insert_token



SEE ALSO

There is a mailing list at <https://groups.google.com/forum/#!forum/bio-phylo> for any user or developer questions and discussions.
Bio::Phylo::Forest::NodeRole This object inherits from Bio::Phylo::Forest::NodeRole, so methods defined there are also applicable here.
Bio::Phylo::Manual Also see the manual: Bio::Phylo::Manual and <http://rutgervos.blogspot.com>.

CITATION

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. <http://dx.doi.org/10.1186/1471-2105-12-63>

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


perl v5.20.3 BIO::PHYLO::FOREST::NODE (3) 2014-03-27

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