Class: Bio::NeXML::IntNetwork

Inherits:
Network show all
Defined in:
lib/bio/db/nexml/trees.rb

Instance Attribute Summary

Attributes inherited from Tree

#id, #label, #rootedge

Instance Method Summary collapse

Methods inherited from Network

#to_xml

Methods inherited from Tree

#<<, #[], #__add_edge__, #__add_node__, #add_node, #add_rootedge, #ancestors, #children, #create_node, #create_rootedge, #descendents, #each_node, #get_edge_by_id, #get_node_by_id, #has_edge?, #has_node?, #include?, #lowest_common_ancestor, #parent, #remove_edge, #remove_node, #roots, #to_xml

Methods included from Mapper

#properties

Constructor Details

#initialize(id, options = {}, &block) ⇒ IntNetwork

Returns a new instance of IntNetwork.



498
499
500
# File 'lib/bio/db/nexml/trees.rb', line 498

def initialize( id, options = {}, &block )
  super
end

Instance Method Details

#add_edge(edge) ⇒ Object



502
503
504
505
# File 'lib/bio/db/nexml/trees.rb', line 502

def add_edge( edge )
  edge.length = edge.length.to_i
  super
end

#create_edge(options = {}) ⇒ Object



507
508
509
510
511
# File 'lib/bio/db/nexml/trees.rb', line 507

def create_edge( options = {} )
  edge = IntEdge.new( Bio::NeXML.generate_id( IntEdge ), options )
  self << edge
  edge        
end