Class: GFA::Record::Containment
- Inherits:
-
GFA::Record
- Object
- GFA::Record
- GFA::Record::Containment
- Defined in:
- lib/gfa/record/containment.rb
Constant Summary collapse
- CODE =
:C- REQ_FIELDS =
%i[from from_orient to to_orient pos overlap]
- OPT_FIELDS =
{ RC: :i, # Read coverage NM: :i, # Number of mismatches/gaps ID: :Z # Edge identifier }
Constants inherited from GFA::Record
Instance Attribute Summary
Attributes inherited from GFA::Record
Instance Method Summary collapse
-
#initialize(from, from_orient, to, to_orient, pos, overlap, *opt_fields) ⇒ Containment
constructor
A new instance of Containment.
Methods inherited from GFA::Record
#[], [], #code, code_class, #empty?, #eql?, #hash, name_class, #to_s, #type
Constructor Details
#initialize(from, from_orient, to, to_orient, pos, overlap, *opt_fields) ⇒ Containment
Returns a new instance of Containment.
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/gfa/record/containment.rb', line 20 def initialize(from, from_orient, to, to_orient, pos, overlap, *opt_fields) @fields = {} add_field(2, :Z, from, /[!-)+-<>-~][!-~]*/) add_field(3, :Z, from_orient, /[+-]/) add_field(4, :Z, to, /[!-)+-<>-~][!-~]*/) add_field(5, :Z, to_orient, /[+-]/) add_field(6, :i, pos, /[0-9]*/) add_field(7, :Z, overlap, /\*|([0-9]+[MIDNSHPX=])+/) opt_fields.each { |f| add_opt_field(f, OPT_FIELDS) } end |