require 'maasha/biopieces'
require 'maasha/seq'
+include BackTrack
+
casts = []
casts << {:long=>'forward', :short=>'f', :type=>'string', :mandatory=>true, :default=>nil, :allowed=>nil, :disallowed=>nil}
casts << {:long=>'reverse', :short=>'r', :type=>'string', :mandatory=>true, :default=>nil, :allowed=>nil, :disallowed=>nil}
matches = []
while result = track_C(self.seq, self.length, pattern, offset, max_mismatches, max_insertions, max_deletions)
- match = Match.new(result[0], result[1], result[2], result[3], result[4], self.seq[result[0] ... result[0] + result[1]])
+ pos, length, mis, ins, del = result
+
+ match = Match.new(pos, length, mis, ins, del, self.seq[pos ... pos + length])
if block_given?
yield match
else
matches << match
end
+
offset = match.pos + 1
end