From 78e39d1bb54d2b67d68e81fcf29ca2177dfb6831 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Wed, 20 Feb 2013 10:07:15 +0000 Subject: [PATCH] made find_adaptor ignore too short sequences git-svn-id: http://biopieces.googlecode.com/svn/trunk@2096 74ccb610-7750-0410-82ae-013aeee3265d --- bp_bin/find_adaptor | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bp_bin/find_adaptor b/bp_bin/find_adaptor index 0534572..4fd559d 100755 --- a/bp_bin/find_adaptor +++ b/bp_bin/find_adaptor @@ -88,10 +88,10 @@ end Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output| input.each do |record| - if record[:SEQ] and record[:SEQ].length > 0 + if record[:SEQ] entry = Seq.new_bp(record) - if options[:forward] + 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 @@ -120,7 +120,7 @@ Biopieces.open(options[:stream_in], options[:stream_out]) do |input, output| end end - if options[:reverse] + 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 -- 2.39.2