Events at the root node of a clade (e.g. one gene duplication).
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 333 def confidence=(type, value) @confidence = Confidence.new(type, value) end
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 341 def duplications=(str) @duplications = str.to_i end
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 345 def losses=(str) @losses = str.to_i end
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 349 def speciations=(str) @speciations=str.to_i end
Converts elements to xml representation. Called by PhyloXML::Writer class.
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 362 def to_xml #@todo add unit test events = LibXML::XML::Node.new('events') PhyloXML::Writer.generate_xml(events, self, [ [:simple, 'type', @type], [:simple, 'duplications', @duplications], [:simple, 'speciations', @speciations], [:simple, 'losses', @losses], [:complex, 'confidence', @confidence]]) return events end
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 353 def type=(str) @type = str #@todo add unit test for this if not ['transfer','fusion','speciation_or_duplication','other','mixed', 'unassigned'].include?(str) raise "Warning #{str} is not one of the allowed values" end end
Generated with the Darkfish Rdoc Generator 2.