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

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').

Methods

new   to_xml  

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

[Source]

     # File lib/bio/db/phyloxml/phyloxml_elements.rb, line 715
715:       def initialize
716:         #@todo add unit test for this, since didn't break anything when changed from property to properties
717:         @properties = []
718:       end

Public Instance methods

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

[Source]

     # File lib/bio/db/phyloxml/phyloxml_elements.rb, line 721
721:       def to_xml
722:         annot = LibXML::XML::Node.new('annotation')
723:         annot["ref"] = @ref if @ref != nil
724:         PhyloXML::Writer.generate_xml(annot, self, [[:simple, 'desc', @desc],
725:           [:complex, 'confidence', @confidence],
726:           [:objarr, 'property', 'properties'],
727:           [:complex, 'uri', @uri]])
728:         return annot
729:       end

[Validate]