class Bio::PhyloXML::CladeRelation
Description¶ ↑
This is used to express a typed relationship between two clades. For example it could be used to describe multiple parents of a clade.
Attributes
confidence[RW]
Confidence
object
distance[RW]
Float
id_ref_0[RW]
String. Id
of the referenced parents of a clade.
id_ref_1[RW]
String. Id
of the referenced parents of a clade.
type[RW]
String
Public Instance Methods
distance=(str)
click to toggle source
# File lib/bio/phyloxml/elements.rb, line 1002 def distance=(str) @distance = str.to_f end
to_xml()
click to toggle source
Converts elements to xml representation. Called by PhyloXML::Writer
class.
# File lib/bio/phyloxml/elements.rb, line 1007 def to_xml if @id_ref_0 == nil or @id_ref_1 == nil or @type == nil raise "Attributes id_ref_0, id_ref_1, type are required elements by SequenceRelation element." else cr = LibXML::XML::Node.new('clade_relation') Writer.generate_xml(cr, self, [ [:attr, 'id_ref_0'], [:attr, 'id_ref_1'], [:attr, 'distance'], [:attr, 'type'], [:complex, 'confidence', @confidnece]]) return cr end end