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

Description

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

Methods

to_xml  

Attributes

source  [RW]  String. Source of the accession id. Example: "UniProtKB"
value  [RW]  String. Value of the accession id. Example: "P17304"

Public Instance methods

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

[Source]

     # File lib/bio/db/phyloxml/phyloxml_elements.rb, line 656
656:       def to_xml
657:         raise "Source attribute is required for Accession object." if @source == nil
658:         accession = LibXML::XML::Node.new('accession', @value)
659:         accession['source'] = @source
660:         return accession
661:       end

[Validate]