Class: Bio::Tree

Inherits:
Object
  • Object
show all
Defined in:
lib/bio-alignment/tree.rb

Overview

Here we add to BioRuby’s Bio::Tree classes

Defined Under Namespace

Classes: Node

Instance Method Summary collapse

Instance Method Details

#find(name) ⇒ Object



62
63
64
# File 'lib/bio-alignment/tree.rb', line 62

def find name
  get_node_by_name(name)
end

#mapObject

Walk the ordered tree leaves, calling into the block, and return an array



67
68
69
70
71
72
73
74
# File 'lib/bio-alignment/tree.rb', line 67

def map 
  res = []
  leaves.each do | leaf |
    item = yield leaf
    res << item
  end
  res
end