[BioRuby] newick tree

Tomoaki NISHIYAMA tomoakin at kenroku.kanazawa-u.ac.jp
Thu Jan 22 00:12:00 UTC 2009


Hi,

I have not used the Newick feature of bioruby but the behavior
you showed seems doing quite right.
What is your expectation? Or, what do you want?

(A,(B,C),D)
represents the following tree, which have 4 terminal and 2 internal  
nodes.

+------A
|
|   +---B
|   |
+---+
|   |
|   +---C
|
+-----D

The two internal nodes have no label and referred as (Node:43c98a8)
(Node:43c91f0) in the representation.

-- 
Tomoaki NISHIYAMA

Advanced Science Research Center,
Kanazawa University,
13-1 Takara-machi,
Kanazawa, 920-0934, Japan


On 2009/01/22, at 8:11, K. Patil wrote:

> Hi,
>
> I was trying some simple methods for the Newick tree. I did the  
> following,
>
>> t = Bio::Newick.new("(A,(B,C),D)")
>> t.tree.nodes
> =>[(Node:43c98a8), (Node:"A"), (Node:"B"), (Node:"D"), (Node:43c91f0),
> (Node:"C")]
>> t.tree.number_of_nodes
> => 6
>
> Am I doing something wrong? I am using bioruby version 1.2.1 in  
> ruby 1.8.
> Any suggestions are welcome.
>
> Cheers,
> Kaustubh
>
>
>
> _______________________________________________
> BioRuby mailing list
> BioRuby at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioruby
>




More information about the BioRuby mailing list