X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Ffind_adaptor;h=2fd757aa09dfcf39e02be9037e5b9b1f372c6b6b;hb=db7133fb8a5c6ed7dadf271912d66e2b9a7be207;hp=c4df418f571556bf663c89cf3ab0f23f2f6074b5;hpb=9e9c2a1c2e56f8a0b38e274411d76c89478bef42;p=biopieces.git diff --git a/bp_bin/find_adaptor b/bp_bin/find_adaptor index c4df418..2fd757a 100755 --- a/bp_bin/find_adaptor +++ b/bp_bin/find_adaptor @@ -92,7 +92,7 @@ Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output| 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) + if m = entry.patmatch(options[:forward], max_mismatches: fmis, max_insertions: fins, max_deletions: fdel) record[:ADAPTOR_POS_LEFT] = m.pos record[:ADAPTOR_LEN_LEFT] = m.length record[:ADAPTOR_PAT_LEFT] = m.match @@ -107,7 +107,7 @@ Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output| pat = pat[1 ... pat.length] - if m = entry.patmatch(pat, [0, len], fmis, fins, fdel) + if m = entry.patmatch(pat, start: 0, stop: len, max_mismatches: fmis, max_insertions: fins, max_deletions: fdel) record[:ADAPTOR_POS_LEFT] = m.pos record[:ADAPTOR_LEN_LEFT] = m.length record[:ADAPTOR_PAT_LEFT] = m.match @@ -121,7 +121,7 @@ Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output| end if options[:reverse] and record[:SEQ].length >= options[:reverse].length - if m = entry.patmatch(options[:reverse], 0, rmis, rins, rdel) + if m = entry.patmatch(options[:reverse], max_mismatches: rmis, max_insertions: rins, max_deletions: rdel) record[:ADAPTOR_POS_RIGHT] = m.pos record[:ADAPTOR_LEN_RIGHT] = m.length record[:ADAPTOR_PAT_RIGHT] = m.match @@ -136,7 +136,7 @@ Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output| pat = pat[0 ... pat.length - 1] - if m = entry.patmatch(pat, entry.length - len, rmis, rins, rdel) + if m = entry.patmatch(pat, start: entry.length - len, max_mismatches: rmis, max_insertions: rins, max_deletions: rdel) record[:ADAPTOR_POS_RIGHT] = m.pos record[:ADAPTOR_LEN_RIGHT] = m.length record[:ADAPTOR_PAT_RIGHT] = m.match