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]
String
type[RW]
String. Type of the annotation.
uri[RW]
Uri
object.
Public Class Methods
new()
click to toggle source
# File lib/bio-phyloxml/phyloxml_elements.rb 713 def initialize 714 #@todo add unit test for this, since didn't break anything when changed from property to properties 715 @properties = [] 716 end
Public Instance Methods
to_xml()
click to toggle source
Converts elements to xml representation. Called by PhyloXML::Writer
class.
# File lib/bio-phyloxml/phyloxml_elements.rb 719 def to_xml 720 annot = LibXML::XML::Node.new('annotation') 721 annot["ref"] = @ref if (defined? @ref) && @ref 722 PhyloXML::Writer.generate_xml(annot, self, [[:simple, 'desc', (defined? @desc) ? @desc : nil], 723 [:complex, 'confidence', (defined? @confidence) ? @confidence : nil], 724 [:objarr, 'property', 'properties'], 725 [:complex, 'uri', (defined? @uri) ? @uri : nil]]) 726 return annot 727 end