class Bio::PhyloXML::Annotation
Description¶ ↑
The annotation of a molecular sequence. It is recommended to annotate by using the optional 'ref' attribute (some examples of acceptable values for the ref attribute: 'GO:0008270', 'KEGG:Tetrachloroethene degradation',
'EC:1.1.1.1').
Attributes
confidence[RW]
Confidence object. Type and value of support for a annotation.
desc[RW]
String. Free text description.
evidence[RW]
String. evidence for a annotation as free text (e.g. 'experimental')
properties[RW]
Array of Property objects. Allows for further, typed and referenced annotations from external resources
ref[RW]
String. For example, 'GO:0008270', 'KEGG:Tetrachloroethene degradation', 'EC:1.1.1.1'
source[RW]
type[RW]
String. Type of the annotation.
uri[RW]
Uri object.
Public Class Methods
new()
click to toggle source
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 715 def initialize #@todo add unit test for this, since didn't break anything when changed from property to properties @properties = [] end
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 721 def to_xml annot = LibXML::XML::Node.new('annotation') annot["ref"] = @ref if @ref != nil PhyloXML::Writer.generate_xml(annot, self, [[:simple, 'desc', @desc], [:complex, 'confidence', @confidence], [:objarr, 'property', 'properties'], [:complex, 'uri', @uri]]) return annot end