From f2150ffc73e38e4c8441b421a6dd88ab3aea1c46 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Tue, 19 Apr 2011 08:35:40 +0000 Subject: [PATCH] added cache option to find_adaptor git-svn-id: http://biopieces.googlecode.com/svn/trunk@1344 74ccb610-7750-0410-82ae-013aeee3265d --- bp_bin/find_adaptor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bp_bin/find_adaptor b/bp_bin/find_adaptor index 9086654..d68414c 100755 --- a/bp_bin/find_adaptor +++ b/bp_bin/find_adaptor @@ -150,12 +150,12 @@ bp.each_record do |record| if record.has_key? :SEQ entry = Seq.new(record[:SEQ_NAME], record[:SEQ], "dna", record[:SCORES]) - if cache[entry.seq.upcase] and options[:cache] + if cache[entry.seq.upcase.to_sym] and options[:cache] match = cache[entry.seq.upcase] else match = entry.adaptor_find(adaptor, adaptor_disamb, pos, options[:edit_distance]) - cache[entry.seq.upcase] = match if match and options[:cache] + cache[entry.seq.upcase.to_sym] = match if match and options[:cache] end if match -- 2.39.5