Method: Bio::Tree#output_newick
- Defined in:
- lib/bio/db/newick.rb
#output_newick(options = {}, &block) ⇒ Object Also known as: newick
Returns a newick formatted string. If block is given, the order of the node is sorted (as the same manner as Enumerable#sort).
Available options:
:indent-
indent string; set false to disable (default: ‘ ’)
:bootstrap_style-
:disableddisables bootstrap representations.:traditionalfor traditional style.:molphyfor Molphy style (default).
203 204 205 206 207 208 209 210 |
# File 'lib/bio/db/newick.rb', line 203 def output_newick( = {}, &block) #:yields: node1, node2 root = @root root ||= self.nodes.first return '();' unless root __to_newick([], root, 0, :__to_newick_format_leaf, , &block) + __to_newick_format_leaf(root, Edge.new, ) + ";\n" end |