Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output|
input.each do |record|
Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output|
input.each do |record|
- if record[:SEQ] and record[:SEQ].length > 0
entry = Seq.new_bp(record)
entry = Seq.new_bp(record)
+ if options[:forward] and record[:SEQ].length >= options[:forward].length
if m = entry.patmatch(options[:forward], 0, fmis, fins, fdel)
record[:ADAPTOR_POS_LEFT] = m.pos
record[:ADAPTOR_LEN_LEFT] = m.length
if m = entry.patmatch(options[:forward], 0, fmis, fins, fdel)
record[:ADAPTOR_POS_LEFT] = m.pos
record[:ADAPTOR_LEN_LEFT] = m.length
+ if options[:reverse] and record[:SEQ].length >= options[:reverse].length
if m = entry.patmatch(options[:reverse], 0, rmis, rins, rdel)
record[:ADAPTOR_POS_RIGHT] = m.pos
record[:ADAPTOR_LEN_RIGHT] = m.length
if m = entry.patmatch(options[:reverse], 0, rmis, rins, rdel)
record[:ADAPTOR_POS_RIGHT] = m.pos
record[:ADAPTOR_LEN_RIGHT] = m.length