Class: Bio::AssemblyGraphAlgorithms::HeightFinder::CyclicTraversalNode::CyclePath

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#closedObject

Returns the value of attribute closed.



199
200
201
# File 'lib/assembly/height_finder.rb', line 199

def closed
  @closed
end

#onodesObject

Returns the value of attribute onodes.



199
200
201
# File 'lib/assembly/height_finder.rb', line 199

def onodes
  @onodes
end

Instance Method Details

#closed?Boolean

Returns:

  • (Boolean)


201
202
203
# File 'lib/assembly/height_finder.rb', line 201

def closed?
  return @closed == true
end

#copyObject



205
206
207
208
209
210
# File 'lib/assembly/height_finder.rb', line 205

def copy
  cycle = CyclePath.new
  cycle.onodes = @onodes[0..-1]
  cycle.closed = @closed
  cycle
end

#to_settableObject



212
213
214
215
216
217
218
219
220
221
# File 'lib/assembly/height_finder.rb', line 212

def to_settable
  # return sorted list of onode settables
  @onodes.collect{|onode| onode.to_settable}.sort do |a, b|
    result = a[0] <=> b[0]
    if result == 0
      result = a[1] == Bio::Velvet::Graph::OrientedNodeTrail::OrientedNode::START_IS_FIRST ? -1 : 1
    end
    result
  end
end