]> git.donarmstrong.com Git - biopieces.git/commitdiff
added cache option to find_adaptor
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 19 Apr 2011 08:35:40 +0000 (08:35 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 19 Apr 2011 08:35:40 +0000 (08:35 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@1344 74ccb610-7750-0410-82ae-013aeee3265d

bp_bin/find_adaptor

index 908665486c4da40cd90be2d2b786b73bb3464b1e..d68414c7247600e7f0e0f415afe50fbb78f66684 100755 (executable)
@@ -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