Parent

Class/Module Index [+]

Quicksearch

Bio::PhyloXML::ProteinDomain

Description

To represent an individual domain in a domain architecture. The name/unique identifier is described via the ‘id’ attribute.

Attributes

confidence[RW]

Float, for example to store E-values 4.7E-14

from[R]

Integer. Beginning of the domain.

id[RW]
to[R]

Integer. End of the domain.

value[RW]

Public Instance Methods

confidence=(str) click to toggle source
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 890
def confidence=(str)
  @confidence = str.to_f
end
from=(str) click to toggle source
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 882
def from=(str)
  @from = str.to_i
end
to=(str) click to toggle source
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 886
def to=(str)
  @to = 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 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

[Validate]

Generated with the Darkfish Rdoc Generator 2.