Class: Bio::FinishM::HybridGraph::LazyShortReadArray

Inherits:
Object
  • Object
show all
Defined in:
lib/assembly/hybrid_velvet_graph.rb

Overview

Hold pointers to short reads, but don’t actually create them until required. Utilizes method_missing to pick up calls made to the underlying object

Instance Method Summary collapse

Constructor Details

#initialize(node) ⇒ LazyShortReadArray

Returns a new instance of LazyShortReadArray.



65
66
67
# File 'lib/assembly/hybrid_velvet_graph.rb', line 65

def initialize(node)
  @parent_node = node
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args, &block) ⇒ Object



57
58
59
# File 'lib/assembly/hybrid_velvet_graph.rb', line 57

def method_missing(m, *args, &block)
  read_short_reads.send(m, *args, &block)
end

Instance Method Details

#read_short_readsObject



61
62
63
# File 'lib/assembly/hybrid_velvet_graph.rb', line 61

def read_short_reads
  @short_reads ||= @parent_node.short_reads
end