Class: NewickTree
- Inherits:
-
Object
- Object
- NewickTree
- Defined in:
- lib/tree_clusters.rb
Overview
Monkey patch of the NewickTree class
Instance Method Summary collapse
-
#clade_nodes ⇒ Array<NewickNode>
Like NewickTree.clades but returns NewickNodes instead of taxa names.
- #unquoted_taxa ⇒ Object
Instance Method Details
#clade_nodes ⇒ Array<NewickNode>
Like NewickTree.clades but returns NewickNodes instead of taxa names.
21 22 23 24 25 26 27 |
# File 'lib/tree_clusters.rb', line 21 def clade_nodes clades = [] @root.descendants.each do |clade| clades.push(clade) if (!clade.children.empty?) end return clades end |
#unquoted_taxa ⇒ Object
29 30 31 |
# File 'lib/tree_clusters.rb', line 29 def unquoted_taxa self.taxa.map { |str| str.tr %q{"'}, "" } end |