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[R]

Integer. Total length of the protein

Public Class Methods

new() click to toggle source
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 861
def initialize
  @domains = []
end

Public Instance Methods

length=(str) click to toggle source

Integer. Total length of the protein

# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 857
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/db/phyloxml/phyloxml_elements.rb, line 866
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