To represent an individual domain in a domain architecture. The name/unique identifier is described via the ‘id’ attribute.
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 890 def confidence=(str) @confidence = str.to_f end
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 882 def from=(str) @from = str.to_i end
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 886 def to=(str) @to = str.to_i end
Converts elements to xml representation. Called by PhyloXML::Writer class.
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 895 def to_xml if @from == nil raise "from attribute of ProteinDomain class is required." elsif @to == nil raise "to attribute of ProteinDomain class is required." else xml_node = LibXML::XML::Node.new('domain', @value) xml_node["from"] = @from.to_s xml_node["to"] = @to.to_s xml_node["id"] = @id if @id != nil xml_node["confidence"] = @confidence.to_s return xml_node end end
Generated with the Darkfish Rdoc Generator 2.