Class: Bio::PhyloXML::Events
- Inherits:
-
Object
- Object
- Bio::PhyloXML::Events
- Defined in:
- lib/bio-phyloxml/phyloxml_elements.rb
Overview
Description
Events at the root node of a clade (e.g. one gene duplication).
Instance Attribute Summary collapse
-
#confidence ⇒ Object
Confidence object.
-
#duplications ⇒ Object
Integer.
-
#losses ⇒ Object
Integer.
-
#speciations ⇒ Object
Integer.
-
#type ⇒ Object
value comes from list: transfer, fusion, speciation_or_duplication, other, mixed, unassigned.
Instance Method Summary collapse
-
#to_xml ⇒ Object
Converts elements to xml representation.
Instance Attribute Details
#confidence ⇒ Object
Confidence object
319 320 321 |
# File 'lib/bio-phyloxml/phyloxml_elements.rb', line 319 def confidence @confidence end |
#duplications ⇒ Object
Integer
316 317 318 |
# File 'lib/bio-phyloxml/phyloxml_elements.rb', line 316 def duplications @duplications end |
#losses ⇒ Object
Integer
316 317 318 |
# File 'lib/bio-phyloxml/phyloxml_elements.rb', line 316 def losses @losses end |
#speciations ⇒ Object
Integer
316 317 318 |
# File 'lib/bio-phyloxml/phyloxml_elements.rb', line 316 def speciations @speciations end |
#type ⇒ Object
value comes from list: transfer, fusion, speciation_or_duplication, other, mixed, unassigned
313 314 315 |
# File 'lib/bio-phyloxml/phyloxml_elements.rb', line 313 def type @type end |
Instance Method Details
#to_xml ⇒ Object
Converts elements to xml representation. Called by PhyloXML::Writer class.
357 358 359 360 361 362 363 364 365 366 367 |
# File 'lib/bio-phyloxml/phyloxml_elements.rb', line 357 def to_xml #@todo add unit test events = LibXML::XML::Node.new('events') PhyloXML::Writer.generate_xml(events, self, [ [:simple, 'type', (defined? @type) ? @type : nil], [:simple, 'duplications', (defined? @duplications) ? @duplications : nil], [:simple, 'speciations', (defined? @speciations) ? @speciations : nil], [:simple, 'losses', (defined? @losses) ? @losses : nil], [:complex, 'confidence', (defined? @confidence) ? @confidence : nil]]) return events end |