Class: GFA::Record::Walk
- Inherits:
-
GFA::Record
- Object
- GFA::Record
- GFA::Record::Walk
- Defined in:
- lib/gfa/record/walk.rb
Constant Summary collapse
- CODE =
:W
- REQ_FIELDS =
%i[sample_id hap_index seq_id seq_start seq_end walk]
- OPT_FIELDS =
{}
Constants inherited from GFA::Record
Instance Attribute Summary
Attributes inherited from GFA::Record
Instance Method Summary collapse
-
#initialize(sample_id, hap_index, seq_id, seq_start, seq_end, walk, *opt_fields) ⇒ Walk
constructor
A new instance of Walk.
Methods inherited from GFA::Record
#[], [], #code, code_class, #dup, #empty?, #eql?, #hash, name_class, #to_s, #type
Constructor Details
#initialize(sample_id, hap_index, seq_id, seq_start, seq_end, walk, *opt_fields) ⇒ Walk
Returns a new instance of Walk.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/gfa/record/walk.rb', line 10 def initialize(sample_id, hap_index, seq_id, seq_start, seq_end, walk, *opt_fields) @fields = {} add_field(2, :Z, sample_id, /[!-)+-<>-~][!-~]*/) add_field(3, :i, hap_index, /[0-9]+/) add_field(4, :Z, seq_id, /[!-)+-<>-~][!-~]*/) add_field(5, :i, seq_start, /\*|[0-9]+/) add_field(6, :i, seq_end, /\*|[0-9]+/) add_field(7, :Z, walk, /([><][!-;=?-~]+)+/) opt_fields.each { |f| add_opt_field(f, OPT_FIELDS) } end |