class Bio::PhyloXML::DomainArchitecture
Description¶ ↑
This is used describe the domain architecture of a protein. Attribute ‘length’ is the total length of the protein
Attributes
domains[R]
Array of ProteinDomain
objects.
length[RW]
Integer. Total length of the protein
Public Class Methods
new()
click to toggle source
# File lib/bio/phyloxml/elements.rb, line 843 def initialize @domains = [] end
Public Instance Methods
length=(str)
click to toggle source
# File lib/bio/phyloxml/elements.rb, line 839 def length=(str) @length = str.to_i end
to_xml()
click to toggle source
Converts elements to xml representation. Called by PhyloXML::Writer
class.
# File lib/bio/phyloxml/elements.rb, line 848 def to_xml xml_node = LibXML::XML::Node.new('domain_architecture') PhyloXML::Writer.generate_xml(xml_node, self,[ [:attr, 'length'], [:objarr, 'domain', 'domains']]) return xml_node end