[BioRuby] BioRuby: newick parser

Pjotr Prins pjotr.public14 at thebird.nl
Mon Mar 12 16:24:38 UTC 2012


On Mon, Mar 12, 2012 at 03:18:48PM +0900, Naohisa GOTO wrote:
> When writing HOWTO based on BioPerl HOWTO:Trees,
> (http://bioruby.open-bio.org/wiki/HOWTO:Trees but still incomplete)
> I'm thinking to add/modify some API about speficying nodes/edges.

After some trying I agree. The Bio::Tree::Node object should know
'more' about its state. I would like to do something like:

  root.leaf?.should == false
  node = root.childeren.first
  node.leaf?.should == false
  node2 == node.childeren.first
  node.leaf?.should == true
  node2.edge(node).distance.should == 1.34

now I need to do something like 

  tree = @tree
  node = tree.get_node_by_name('node')
  tree.get_edge(node, tree.parent(node)).distance.should == 1.34

which uses the tree state to get a node edge, and does not feel that
intuitive.

I'll try to extend Bio::Tree for bio-alignment, see what works.

Pj.



More information about the BioRuby mailing list