Class: GFA::RecordSet::SegmentSet

Inherits:
GFA::RecordSet show all
Defined in:
lib/gfa/record_set/segment_set.rb

Constant Summary collapse

CODE =
:S
INDEX_FIELD =

Name: Segment name

2

Constants inherited from GFA::RecordSet

TYPES

Instance Attribute Summary

Attributes inherited from GFA::RecordSet

#gfa, #index, #position, #set

Instance Method Summary collapse

Methods inherited from GFA::RecordSet

#<<, #[], #code, code_class, #eql?, #find_index, #index!, #index_field, #index_id, #indexed?, #initialize, #merge!, name_class, #rebuild_index!, #save_index, #to_s, #type

Constructor Details

This class inherits a constructor from GFA::RecordSet

Instance Method Details

#total_lengthObject

Computes the sum of all individual segment lengths



7
8
9
# File 'lib/gfa/record_set/segment_set.rb', line 7

def total_length
  set.map(&:length).reduce(0, :+)
end