class Bio::PhyloXML::Accession

Description

Element Accession is used to capture the local part in a sequence identifier.

Attributes

source[RW]

String. Source of the accession id. Example: “UniProtKB”

value[RW]

String. Value of the accession id. Example: “P17304”

Public Instance Methods

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 665
def to_xml
  raise "Source attribute is required for Accession object." if @source == nil
  accession = LibXML::XML::Node.new('accession', @value)
  accession['source'] = @source
  return accession
end