| Class | Bio::Tree::Node |
| In: |
lib/bio/tree.rb
|
| Parent: | Object |
Node object.
| bootstrap | [R] | bootstrap value |
| bootstrap_string | [R] | bootstrap value as a string |
| ec_number | [RW] | EC number (EC_number in PhyloXML, or :E in NHX) |
| name | [RW] | name of the node |
| order_number | [RW] | the order of the node (lower value, high priority) |
| scientific_name | [RW] | scientific name (scientific_name in PhyloXML, or :S in NHX) |
| taxonomy_id | [RW] | taxonomy identifier (taxonomy_identifier in PhyloXML, or :T in NHX) |
sets a bootstrap value
# File lib/bio/tree.rb, line 154
154: def bootstrap=(num)
155: @bootstrap_string = (num ? num.to_s : num)
156: @bootstrap = num
157: end
sets a bootstrap value from a string
# File lib/bio/tree.rb, line 160
160: def bootstrap_string=(str)
161: if str.to_s.strip.empty?
162: @bootstrap = nil
163: @bootstrap_string = str
164: else
165: i = str.to_i
166: f = str.to_f
167: @bootstrap = (i == f ? i : f)
168: @bootstrap_string = str
169: end
170: end
visualization of this object
# File lib/bio/tree.rb, line 173
173: def inspect
174: if @name and !@name.empty? then
175: str = "(Node:#{@name.inspect}"
176: else
177: str = sprintf('(Node:%x', (self.__id__ << 1) & 0xffffffff)
178: end
179: if defined?(@bootstrap) and @bootstrap then
180: str += " bootstrap=#{@bootstrap.inspect}"
181: end
182: str += ")"
183: str
184: end
Other NHX parameters. Returns a Hash. Note that :D, :E, :S, and :T are not stored here but stored in the proper attributes in this class. However, if you force to set these parameters in this hash, the parameters in this hash are preferred when generating NHX.
# File lib/bio/tree.rb, line 222
222: def nhx_parameters
223: @nhx_parameters ||= {}
224: @nhx_parameters
225: end