[Bioperl-l] creating a tree from scratch ?

Iain Wallace iain.wallace at ucd.ie
Fri Jan 30 10:17:14 EST 2004


Hi,
Does any one know how to write a tree that has been created in BioPerl?
I just cann't seem to figure it out! I have the nodes that make up my
tree, just not sure how to convert the nodes into a tree. 


    my $nodeA = new Bio::Tree::Node(); 
    my $nodeL = new Bio::Tree::Node();
    my $nodeR = new Bio::Tree::Node();

    $nodeL->id("Left");
    $nodeR->id("Right");
    my $node = new Bio::Tree::Node();
    $node->add_Descendent($nodeL);
    $node->add_Descendent($nodeR);

which I think should give a tree like     .....
					/	\
					Left	Right

thanks for all your help

Iain 



More information about the Bioperl-l mailing list