rgfa 1.2.1 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f8b7edb6df7ada4a6f53db674a3b306e00e2861
4
- data.tar.gz: 87d224980a807f6b8e98917b845d48a12ec11e4b
3
+ metadata.gz: 492cbcdfb283859725e35bc0586bbdebe1db4efb
4
+ data.tar.gz: 1a23616c8b8c3f00384fac70c2d147cfa84ba6d7
5
5
  SHA512:
6
- metadata.gz: c38a9ef751a5220dd59991a4b0788d8860d66ead6880c03de53ab047970cb3ad4719b23c4dd1b7b1d262dfe29cc84b82e105d10e938e83231ad3969efdf86edd
7
- data.tar.gz: b87e1dcd4f7ddccb77bdb03edad2a52ae23e8b5c9f22629f4aa57206c75306b7e7f813e5154c76245de14113d532e983795957721bd0ecce9d772a7e95ee6259
6
+ metadata.gz: f4498bd2b97520366f5bfa537cce2874ec0ccceb72ee3222fcddcdda1de4899ffd14397ae0ac2a9a0ac9b2bb3df9951519f3c57e8e8e183f01c9a09e9216749f
7
+ data.tar.gz: c955e4647ecc1b250f62bf2f1d5246a48fcd097b6cf0d6ce76426971701643143e7a7dd78ba2ecf4f303132b939596433632493cd4dbbb32032c831b7010a113
File without changes
@@ -4,11 +4,11 @@ require_relative "error.rb"
4
4
  # Represents the contents of a CIGAR string.
5
5
  class RGFA::CIGAR < Array
6
6
 
7
- # Compute the CIGAR for the segments in reverse direction.
7
+ # Compute the CIGAR for the segments when these are switched.
8
8
  #
9
- # @example Reversing a CIGAR
9
+ # @example Computing the complement CIGAR
10
10
  #
11
- # RGFA::CIGAR.from_string("2M1D3M").reverse.to_s
11
+ # RGFA::CIGAR.from_string("2M1D3M").complement.to_s
12
12
  # # => "3M1I2M"
13
13
  #
14
14
  # # S1 + S2 + 2M1D3M
@@ -22,8 +22,8 @@ class RGFA::CIGAR < Array
22
22
  # # S2 - S1 - 3M1I2M
23
23
  #
24
24
  # @return [RGFA::CIGAR] (empty if CIGAR string is *)
25
- def reverse
26
- super.map do |op|
25
+ def complement
26
+ reverse.map do |op|
27
27
  if op.code == :I
28
28
  op.code = :D
29
29
  elsif op.code == :D
@@ -19,11 +19,17 @@ module RGFA::FieldParser
19
19
  fieldname: nil,
20
20
  frozen: false)
21
21
  case datatype
22
+ when :cmt
23
+ return self
22
24
  when :A, :Z, :seq
23
25
  validate_gfa_field!(datatype, fieldname: fieldname) if validate_strings
24
26
  self.freeze if frozen
25
27
  return self
26
- when :lbl, :orn
28
+ when :lbl
29
+ validate_segment_name!
30
+ validate_gfa_field!(datatype, fieldname: fieldname) if validate_strings
31
+ return to_sym.freeze
32
+ when :orn
27
33
  validate_gfa_field!(datatype, fieldname: fieldname) if validate_strings
28
34
  return to_sym.freeze
29
35
  when :i
@@ -27,6 +27,7 @@ module RGFA::FieldValidator
27
27
  :cig => /^(\*|(([0-9]+[MIDNSHPX=])+))$/, # CIGAR string
28
28
  :cgs => /^(\*|(([0-9]+[MIDNSHPX=])+))(,(\*|(([0-9]+[MIDNSHPX=])+)))*$/,
29
29
  # multiple CIGARs, comma-sep
30
+ :cmt => /.*/, # content of comment line, everything is allowed
30
31
  }
31
32
 
32
33
  # Validates the string according to the provided datatype
@@ -49,6 +50,19 @@ module RGFA::FieldValidator
49
50
  end
50
51
  end
51
52
 
53
+ # Validates segment names, to check that they do not contain + or -
54
+ # followed by comma
55
+ # @raise [RGFA::FieldParser::FormatError] if the segment name is invalid
56
+ # @return [void]
57
+ # @api private
58
+ def validate_segment_name!
59
+ if self =~ /.*[+-],.*/
60
+ raise RGFA::FieldParser::FormatError,
61
+ "Segment names are not allowed to contain +/- followed by comma "+
62
+ "(found: #{self})"
63
+ end
64
+ end
65
+
52
66
  end
53
67
 
54
68
  class String
@@ -126,6 +126,7 @@ class RGFA::Line
126
126
  when :L then RGFA::Line::Link
127
127
  when :C then RGFA::Line::Containment
128
128
  when :P then RGFA::Line::Path
129
+ when :"#" then RGFA::Line::Comment
129
130
  else
130
131
  raise RGFA::Line::UnknownRecordTypeError,
131
132
  "Record type unknown: '#{record_type}'"
@@ -684,6 +685,7 @@ require_relative "line/segment.rb"
684
685
  require_relative "line/path.rb"
685
686
  require_relative "line/link.rb"
686
687
  require_relative "line/containment.rb"
688
+ require_relative "line/comment.rb"
687
689
 
688
690
  # Extensions to the String core class.
689
691
  #
@@ -696,7 +698,11 @@ class String
696
698
  # @param validate [Integer] <i>(defaults to: 2)</i>
697
699
  # see RGFA::Line#initialize
698
700
  def to_rgfa_line(validate: 2)
699
- split(RGFA::Line::SEPARATOR).to_rgfa_line(validate: validate)
701
+ if self[0] == "#"
702
+ return RGFA::Line::Comment.new([self[1..-1]], validate: 0)
703
+ else
704
+ split(RGFA::Line::SEPARATOR).to_rgfa_line(validate: validate)
705
+ end
700
706
  end
701
707
 
702
708
  end
@@ -0,0 +1,13 @@
1
+ # A comment line of a RGFA file
2
+ class RGFA::Line::Comment < RGFA::Line
3
+
4
+ RECORD_TYPE = :"#"
5
+ REQFIELDS = [:content]
6
+ PREDEFINED_OPTFIELDS = []
7
+ DATATYPE = {
8
+ :content => :cmt,
9
+ }
10
+
11
+ define_field_methods!
12
+
13
+ end
@@ -56,11 +56,15 @@ class RGFA::Line::Containment < RGFA::Line
56
56
  return rpos
57
57
  end
58
58
 
59
- # Returns true if the containment is normal, false otherwise
59
+ # Returns true if the containment is canonical, false otherwise
60
60
  #
61
- # <b> Definition of normal containment </b>
61
+ # == Definition of canonical containment
62
62
  #
63
- # Each containment has an equivalent reverse containment.
63
+ # A containment is canonical if the from orientation is +
64
+ #
65
+ # === Details
66
+ #
67
+ # Each containment has an equivalent complement containment.
64
68
  # Consider a containment of B (length:8) in A (length:100) at position 9 of A
65
69
  # with a cigar 1M1I2M3D4M (i.e. rpos = 19).
66
70
  #
@@ -69,18 +73,18 @@ class RGFA::Line::Containment < RGFA::Line
69
73
  # A- B+ 1M1I2M3D4M 9 == A+ B- 4M3D2M1I1M 80
70
74
  # A- B- 1M1I2M3D4M 9 == A+ B+ 4M3D2M1I1M 80
71
75
  #
72
- # Pos in the reverse is equal to the length of A minus the right pos
76
+ # Pos in the complement is equal to the length of A minus the right pos
73
77
  # of B before reversing.
74
78
  #
75
79
  # We require here that A != B as A == B makes no sense for containments.
76
80
  # Thus it is always possible to express the containment using a positive
77
81
  # from orientation.
78
82
  #
79
- # For this reason the normality is simply defined as + from orientation.
83
+ # For this reason the canon is simply defined as + from orientation.
80
84
  #
81
85
  # @return [Boolean]
82
86
  #
83
- def normal?
87
+ def canonical?
84
88
  from_orient == :+
85
89
  end
86
90
 
@@ -112,108 +112,99 @@ class RGFA::Line::Link < RGFA::Line
112
112
  to.to_sym
113
113
  end
114
114
 
115
- # Returns true if the link is normal, false otherwise
115
+ # Returns true if the link is canonical, false otherwise
116
116
  #
117
- # == Definition of normal link
117
+ # == Definition of canonical link
118
118
  #
119
- # Each link has an equivalent reverse link. Consider a link of A to B
120
- # with a overlap 1M1I2M:
119
+ # A link if canonical if:
120
+ # - from != to and from < to (lexicographically); or
121
+ # - from == to and at least one of from_orient or to_orient is +
121
122
  #
122
- # from+ to to+ (1M1I2M) == to- to from- (2M1D1M)
123
- # from- to to- (1M1I2M) == to+ to from+ (2M1D1M)
124
- # from+ to to- (1M1I2M) == to+ to from- (2M1D1M)
125
- # from- to to+ (1M1I2M) == to- to from+ (2M1D1M)
123
+ # === Details
126
124
  #
127
- # Consider also the special case, where from == to and the overlap is not
128
- # specified, or equal to its reverse:
125
+ # In the special case in which from == to (== s) we have the
126
+ # following equivalences:
129
127
  #
130
- # from+ to from+ (*) == from- to from- (*) # left has a +; right has no +
131
- # from- to from- (*) == from+ to from+ (*) # left has no +; right has a +
132
- # from+ to from- (*) == from+ to from- (*) # left == right
133
- # from- to from+ (*) == from- to from+ (*) # left == right
128
+ # s + s + == s - s -
129
+ # s - s - == s + s + (same as previous case)
130
+ # s + s - == s + s - (equivalent to itself)
131
+ # s - s + == s - s + (equivalent to itself)
134
132
  #
135
- # Thus we define a link as normal if:
136
- # - from < to (lexicographical comparison of segments)
137
- # - from == to and overlap.to_s < reverse_overlap.to_s
138
- # - from == to, overlap == reverse_overlap and at least one orientation is +
133
+ # Considering the values on the left, the first one can be taken as
134
+ # canonical, the second not, because it can be transformed in the first
135
+ # one; the other two values are canonical, as they are only equivalent
136
+ # to themselves.
139
137
  #
140
138
  # @return [Boolean]
141
139
  #
142
- def normal?
140
+ def canonical?
143
141
  if from_name < to_name
144
142
  return true
145
143
  elsif from_name > to_name
146
144
  return false
147
145
  else
148
- overlap_s = overlap.to_s
149
- reverse_overlap_s = reverse_overlap.to_s
150
- if overlap_s < reverse_overlap_s
151
- return true
152
- elsif overlap_s > reverse_overlap_s
153
- return false
154
- else
155
- return [from_orient, to_orient].include?(:+)
156
- end
146
+ return [from_orient, to_orient].include?(:+)
157
147
  end
158
148
  end
159
149
 
160
- # Returns the unchanged link if the link is normal,
161
- # otherwise reverses the link and returns it.
150
+ # Returns the unchanged link if the link is canonical,
151
+ # otherwise complements the link and returns it.
162
152
  #
163
153
  # @note The path references are not corrected by this method; therefore
164
154
  # the method shall be used before the link is embedded in a graph.
165
155
  #
166
156
  # @return [RGFA::Line::Link] self
167
- def normalize!
168
- reverse! if !normal?
157
+ def canonicize!
158
+ complement! if !canonical?
169
159
  end
170
160
 
171
- # Creates a link with both strands of the sequences inverted.
161
+ # Creates the equivalent link with from/to inverted.
162
+ #
172
163
  # The CIGAR operations (order/type) are inverted as well.
173
164
  # Optional fields are left unchanged.
174
165
  #
175
- # @note The path references are not copied to the reverse link.
166
+ # @note The path references are not copied to the complement link.
176
167
  #
177
168
  # @note This method shall be overridden if custom optional fields
178
- # are defined, which have a ``reverse'' operation which determines
179
- # their value in the equivalent but reverse link.
169
+ # are defined, which have a ``complementation'' operation which determines
170
+ # their value in the equivalent complement link.
180
171
  #
181
172
  # @return [RGFA::Line::Link] the inverted link.
182
- def reverse
173
+ def complement
183
174
  l = self.clone
184
175
  l.from = to
185
176
  l.from_orient = (to_orient == :+ ? :- : :+)
186
177
  l.to = from
187
178
  l.to_orient = (from_orient == :+ ? :- : :+)
188
- l.overlap = reverse_overlap
179
+ l.overlap = complement_overlap
189
180
  l
190
181
  end
191
182
 
192
- # Reverses the link inplace, i.e. sets:
183
+ # Complements the link inplace, i.e. sets:
193
184
  # from = to
194
185
  # from_orient = other_orient(to_orient)
195
186
  # to = from
196
187
  # to_orient = other_orient(from_orient)
197
- # overlap = reverse_overlap.
188
+ # overlap = complement_overlap.
198
189
  #
199
190
  # The optional fields are left unchanged.
200
191
  #
201
- # @note The path references are not reversed by this method; therefore
192
+ # @note The path references are not complemented by this method; therefore
202
193
  # the method shall be used before the link is embedded in a graph.
203
194
  #
204
195
  # @note This method shall be overridden if custom optional fields
205
- # are defined, which have a ``reverse'' operation which determines
206
- # their value in the equivalent but reverse link.
196
+ # are defined, which have a ``complementation'' operation which determines
197
+ # their value in the complement link.
207
198
  #
208
199
  # @return [RGFA::Line::Link] self
209
- def reverse!
200
+ def complement!
210
201
  tmp = self.from
211
202
  self.from = self.to
212
203
  self.to = tmp
213
204
  tmp = self.from_orient
214
205
  self.from_orient = (self.to_orient == :+) ? :- : :+
215
206
  self.to_orient = (tmp == :+) ? :- : :+
216
- self.overlap = self.reverse_overlap
207
+ self.overlap = self.complement_overlap
217
208
  return self
218
209
  end
219
210
 
@@ -224,7 +215,7 @@ class RGFA::Line::Link < RGFA::Line
224
215
  #
225
216
  # Otherwise, an array of tuples path/boolean is returned.
226
217
  # The boolean value tells
227
- # if the link is used in direct (true) or reverse direction (false)
218
+ # if the link is used (true) or its complement (false)
228
219
  # in the path.
229
220
  # @return [Array<Array<(RGFA::Line::Path, Boolean)>>]
230
221
  def paths
@@ -235,8 +226,8 @@ class RGFA::Line::Link < RGFA::Line
235
226
  # Compute the overlap when the strand of both sequences is inverted.
236
227
  #
237
228
  # @return [RGFA::CIGAR]
238
- def reverse_overlap
239
- self.overlap.reverse
229
+ def complement_overlap
230
+ self.overlap.to_cigar.complement
240
231
  end
241
232
 
242
233
  #
@@ -244,23 +235,23 @@ class RGFA::Line::Link < RGFA::Line
244
235
  # Thereby, optional fields are not considered.
245
236
  #
246
237
  # @note Inverting the strand of both links and reversing
247
- # the CIGAR operations (order/type), one obtains a
248
- # reverse but equivalent link.
238
+ # the CIGAR operations (order/type), one obtains an
239
+ # equivalent complement link.
249
240
  #
250
241
  # @param other [RGFA::Line::Link] a link
251
242
  # @return [Boolean] are self and other equivalent?
252
243
  # @see #==
253
244
  # @see #same?
254
- # @see #reverse?
245
+ # @see #complement?
255
246
  def eql?(other)
256
- same?(other) or reverse?(other)
247
+ same?(other) or complement?(other)
257
248
  end
258
249
 
259
250
  # Compares the optional fields of two links.
260
251
  #
261
252
  # @note This method shall be overridden if custom optional fields
262
- # are defined, which have a ``reverse'' operation which determines
263
- # their value in the equivalent but reverse link.
253
+ # are defined, which have a ``complementation'' operation which determines
254
+ # their value in the equivalent but complement link.
264
255
  #
265
256
  # @param other [RGFA::Line::Link] a link
266
257
  # @return [Boolean] are self and other equivalent?
@@ -291,7 +282,7 @@ class RGFA::Line::Link < RGFA::Line
291
282
  # @param other [RGFA::Line::Link] a link
292
283
  # @return [Boolean] are self and other equivalent?
293
284
  # @see #eql?
294
- # @see #reverse?
285
+ # @see #complement?
295
286
  # @see #==
296
287
  def same?(other)
297
288
  (from_end == other.from_end and
@@ -299,37 +290,37 @@ class RGFA::Line::Link < RGFA::Line
299
290
  overlap == other.overlap)
300
291
  end
301
292
 
302
- # Compares the reverse of the link to another link
293
+ # Compares the link to the complement of another link
303
294
  # and determine their equivalence.
304
295
  # Thereby, optional fields are not considered.
305
296
  #
306
297
  # @param other [RGFA::Line::Link] the other link
307
- # @return [Boolean] are the reverse of self and other equivalent?
298
+ # @return [Boolean] are self and the complement of other equivalent?
308
299
  # @see #eql?
309
300
  # @see #same?
310
301
  # @see #==
311
- def reverse?(other)
302
+ def complement?(other)
312
303
  (from_end == other.to_end and
313
304
  to_end == other.from_end and
314
- overlap == other.reverse_overlap)
305
+ overlap == other.complement_overlap)
315
306
  end
316
307
 
317
308
  # Computes an hash for including a link in an Hash tables,
318
- # so that the hash of a link and its reverse is the same.
309
+ # so that the hash of a link and its complement is the same.
319
310
  # Thereby, optional fields are not considered.
320
311
  # @see #eql?
321
312
  def hash
322
- from_end.hash + to_end.hash + overlap.hash + reverse_overlap.to_s.hash
313
+ from_end.hash + to_end.hash + overlap.hash + complement_overlap.to_s.hash
323
314
  end
324
315
 
325
- # Compares a link and optionally the reverse link,
316
+ # Compares a link and optionally the complement link,
326
317
  # with two oriented_segments and optionally an overlap.
327
318
  # @param [RGFA::OrientedSegment] other_oriented_from
328
319
  # @param [RGFA::OrientedSegment] other_oriented_to
329
- # @param equivalent [Boolean] shall the reverse link also be considered?
320
+ # @param equivalent [Boolean] shall the complement link also be considered?
330
321
  # @param [RGFA::CIGAR] other_overlap compared only if not empty
331
322
  # @return [Boolean] does the link or, if +equivalent+,
332
- # the reverse link go from the first
323
+ # the complement link go from the first
333
324
  # oriented segment to the second with an overlap equal to the provided one
334
325
  # (if not empty)?
335
326
  def compatible?(other_oriented_from, other_oriented_to, other_overlap = [],
@@ -340,7 +331,7 @@ class RGFA::Line::Link < RGFA::Line
340
331
  if is_direct
341
332
  return true
342
333
  elsif equivalent
343
- return compatible_reverse?(other_oriented_from, other_oriented_to,
334
+ return compatible_complement?(other_oriented_from, other_oriented_to,
344
335
  other_overlap)
345
336
  else
346
337
  return false
@@ -361,15 +352,15 @@ class RGFA::Line::Link < RGFA::Line
361
352
  (overlap.empty? or other_overlap.empty? or (overlap == other_overlap))
362
353
  end
363
354
 
364
- # Compares the reverse link with two oriented segments and optionally an
355
+ # Compares the complement link with two oriented segments and optionally an
365
356
  # overlap.
366
357
  # @param [RGFA::OrientedSegment] other_oriented_from
367
358
  # @param [RGFA::OrientedSegment] other_oriented_to
368
359
  # @param [RGFA::CIGAR] other_overlap compared only if not empty
369
- # @return [Boolean] does the reverse link go from the first
360
+ # @return [Boolean] does the complement link go from the first
370
361
  # oriented segment to the second with an overlap equal to the provided one
371
362
  # (if not empty)?
372
- def compatible_reverse?(other_oriented_from, other_oriented_to,
363
+ def compatible_complement?(other_oriented_from, other_oriented_to,
373
364
  other_overlap = [])
374
365
  (oriented_to == other_oriented_from.invert_orient and
375
366
  oriented_from == other_oriented_to.invert_orient) and
@@ -2,12 +2,12 @@
2
2
  class RGFA::Line::Path < RGFA::Line
3
3
 
4
4
  RECORD_TYPE = :P
5
- REQFIELDS = [:path_name, :segment_names, :cigars]
5
+ REQFIELDS = [:path_name, :segment_names, :overlaps]
6
6
  PREDEFINED_OPTFIELDS = []
7
7
  DATATYPE = {
8
8
  :path_name => :lbl,
9
9
  :segment_names => :lbs,
10
- :cigars => :cgs,
10
+ :overlaps => :cgs,
11
11
  }
12
12
 
13
13
  define_field_methods!
@@ -30,7 +30,7 @@ class RGFA::Line::Path < RGFA::Line
30
30
  # equal to the number of segments.
31
31
  # @return [Boolean]
32
32
  def circular?
33
- self.cigars.size == self.segment_names.size
33
+ self.overlaps.size == self.segment_names.size
34
34
  end
35
35
 
36
36
  # Is the path linear? This is the case when the number of CIGARs
@@ -40,11 +40,11 @@ class RGFA::Line::Path < RGFA::Line
40
40
  !circular?
41
41
  end
42
42
 
43
- # Are the cigars a single "*"? This is a compact representation of
43
+ # Are the overlaps a single "*"? This is a compact representation of
44
44
  # a linear path where all CIGARs are "*"
45
45
  # @return [Boolean]
46
- def undef_cigars?
47
- self.cigars.size == 1 and self.cigars[0].empty?
46
+ def undef_overlaps?
47
+ self.overlaps.size == 1 and self.overlaps[0].empty?
48
48
  end
49
49
 
50
50
  # The links to which the path refers; it can be an empty array
@@ -62,14 +62,14 @@ class RGFA::Line::Path < RGFA::Line
62
62
  # an array, which elements are 3-tuples (from oriented segment,
63
63
  # to oriented segment, cigar)
64
64
  def required_links
65
- has_undef_cigars = self.undef_cigars?
65
+ has_undef_overlaps = self.undef_overlaps?
66
66
  retval = []
67
67
  self.segment_names.size.times do |i|
68
68
  j = i+1
69
69
  if j == self.segment_names.size
70
70
  circular? ? j = 0 : break
71
71
  end
72
- cigar = has_undef_cigars ? [] : self.cigars[i]
72
+ cigar = has_undef_overlaps ? [] : self.overlaps[i]
73
73
  retval << [self.segment_names[i], self.segment_names[j], cigar]
74
74
  end
75
75
  retval
@@ -78,20 +78,20 @@ class RGFA::Line::Path < RGFA::Line
78
78
  private
79
79
 
80
80
  def validate_lists_size!
81
- n_cigars = self.cigars.size
81
+ n_overlaps = self.overlaps.size
82
82
  n_segments = self.segment_names.size
83
- if n_cigars == n_segments - 1
83
+ if n_overlaps == n_segments - 1
84
84
  # case 1: linear path
85
85
  return true
86
- elsif n_cigars == 1 and self.cigars[0].empty?
87
- # case 2: linear path, single "*" to represent cigars which are all "*"
86
+ elsif n_overlaps == 1 and self.overlaps[0].empty?
87
+ # case 2: linear path, single "*" to represent overlaps which are all "*"
88
88
  return true
89
- elsif n_cigars == n_segments
89
+ elsif n_overlaps == n_segments
90
90
  # case 3: circular path
91
91
  else
92
92
  raise RGFA::Line::Path::ListLengthsError,
93
93
  "Path has #{n_segments} oriented segments, "+
94
- "but #{n_cigars} CIGARs"
94
+ "but #{n_overlaps} overlaps"
95
95
  end
96
96
  end
97
97
 
@@ -102,5 +102,5 @@ class RGFA::Line::Path < RGFA::Line
102
102
 
103
103
  end
104
104
 
105
- # Error raised if number of segments and cigars are not consistent
105
+ # Error raised if number of segments and overlaps are not consistent
106
106
  class RGFA::Line::Path::ListLengthsError < RGFA::Error; end
@@ -28,6 +28,9 @@ module RGFA::Lines
28
28
  add_containment(gfa_line)
29
29
  when :P
30
30
  add_path(gfa_line)
31
+ when :"#"
32
+ # do nothing, as the spec says these shall be ignored
33
+ # maybe we want to store them and output them again in a future version
31
34
  else
32
35
  raise # this never happens, as already catched by gfa_line init
33
36
  end
@@ -7,7 +7,7 @@ module RGFA::Links
7
7
 
8
8
  def add_link(gfa_line)
9
9
  gfa_line = gfa_line.to_rgfa_line(validate: @validate)
10
- gfa_line.normalize!
10
+ gfa_line.canonicize!
11
11
  l = nil
12
12
  if segment(gfa_line.from) and segment(gfa_line.to)
13
13
  l = link_from_to(gfa_line.oriented_from,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rgfa
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giorgio Gonnella
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-21 00:00:00.000000000 Z
11
+ date: 2016-09-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  The Graphical Fragment Assembly (GFA) is a proposed format which allow
@@ -39,6 +39,7 @@ files:
39
39
  - lib/rgfa/field_parser.rb
40
40
  - lib/rgfa/field_validator.rb
41
41
  - lib/rgfa/headers.rb
42
+ - lib/rgfa/line/comment.rb
42
43
  - lib/rgfa/line/containment.rb
43
44
  - lib/rgfa/line/header.rb
44
45
  - lib/rgfa/line/link.rb
@@ -65,10 +66,10 @@ files:
65
66
  - lib/rgfatools/superfluous_links.rb
66
67
  - lib/rgfatools/linear_paths.rb
67
68
  - lib/rgfatools/p_bubbles.rb
68
- - bin/gfadiff.rb
69
- - bin/rgfa-mergelinear.rb
70
- - bin/rgfa-simdebruijn.rb
71
- - bin/rgfa-findcrisprs.rb
69
+ - bin/gfadiff
70
+ - bin/rgfa-mergelinear
71
+ - bin/rgfa-simdebruijn
72
+ - bin/rgfa-findcrisprs
72
73
  homepage: http://github.com/ggonnella/rgfa
73
74
  licenses:
74
75
  - CC-BY-SA