Class Bio::PhyloXML::DomainArchitecture
In: lib/bio/db/phyloxml/phyloxml_elements.rb
Parent: Object

Description

This is used describe the domain architecture of a protein. Attribute ‘length’ is the total length of the protein

Methods

length=   new   to_xml  

Attributes

domains  [R]  Array of ProteinDomain objects.
length  [RW]  Integer. Total length of the protein

Public Class methods

[Source]

     # File lib/bio/db/phyloxml/phyloxml_elements.rb, line 851
851:       def initialize
852:         @domains = []
853:       end

Public Instance methods

[Source]

     # File lib/bio/db/phyloxml/phyloxml_elements.rb, line 847
847:       def length=(str)
848:         @length = str.to_i
849:       end

Converts elements to xml representation. Called by PhyloXML::Writer class.

[Source]

     # File lib/bio/db/phyloxml/phyloxml_elements.rb, line 856
856:       def to_xml
857:         xml_node = LibXML::XML::Node.new('domain_architecture')
858:         PhyloXML::Writer.generate_xml(xml_node, self,[
859:               [:attr, 'length'],
860:               [:objarr, 'domain', 'domains']])
861:         return xml_node
862:       end

[Validate]