Class: GFA::Record::Path

Inherits:
GFA::Record show all
Defined in:
lib/gfa/record/path.rb

Constant Summary collapse

CODE =
:P
REQ_FIELDS =
i[path_name segment_name overlaps]
OPT_FIELDS =
{}

Constants inherited from GFA::Record

CODES, TYPES

Instance Attribute Summary

Attributes inherited from GFA::Record

#fields

Instance Method Summary collapse

Methods inherited from GFA::Record

#[], [], #code, code_class, #empty?, #eql?, #hash, name_class, #to_s, #type

Constructor Details

#initialize(path_name, segment_name, overlaps, *opt_fields) ⇒ Path



12
13
14
15
16
17
18
# File 'lib/gfa/record/path.rb', line 12

def initialize(path_name, segment_name, overlaps, *opt_fields)
  @fields = {}
  add_field(2, :Z, path_name,    /[!-)+-<>-~][!-~]*/)
  add_field(3, :Z, segment_name, /[!-)+-<>-~][!-~]*/)
  add_field(4, :Z, overlaps,     /\*|([0-9]+[MIDNSHPX=]|[-+]?[0-9]+J|.)+/)
  opt_fields.each { |f| add_opt_field(f, OPT_FIELDS) }
end