]> git.donarmstrong.com Git - biopieces.git/commitdiff
refactored argument precise to realign
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Wed, 23 May 2012 09:54:00 +0000 (09:54 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Wed, 23 May 2012 09:54:00 +0000 (09:54 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@1820 74ccb610-7750-0410-82ae-013aeee3265d

code_ruby/lib/maasha/findsim.rb

index 25f135c99cae8f63248e5bb58bb7c8ca77429732..6b1ad23552ed1c434cfa161f042229102c7d8709 100644 (file)
@@ -75,7 +75,7 @@ class FindSim
     Fasta.open(file, 'r') do |ios|
       ios.each do |entry|
         @q_ids     << entry.seq_name if @opt_hash[:query_ids]
-        @q_entries << entry          if @opt_hash[:precise]
+        @q_entries << entry          if @opt_hash[:realign]
 
         oligos = str_to_oligo_rb_ary_c(entry.seq, @opt_hash[:kmer], 1).uniq.sort
 
@@ -108,7 +108,7 @@ class FindSim
     Fasta.open(file, 'r') do |ios|
       ios.each_with_index do |entry, s_index|
         @s_ids     << entry.seq_name if @opt_hash[:subject_ids]
-        @s_entries << entry          if @opt_hash[:precise]
+        @s_entries << entry          if @opt_hash[:realign]
 
         zero_ary_c(oligo_ary,  (4 ** @opt_hash[:kmer]) * BYTES_IN_INT)
         zero_ary_c(shared_ary, @q_size                 * BYTES_IN_INT)
@@ -154,7 +154,7 @@ class FindSim
         q_id = @opt_hash[:query_ids]   ? @q_ids[q_index] : q_index
         s_id = @opt_hash[:subject_ids] ? @s_ids[s_index] : s_index
 
-        if @opt_hash[:precise]
+        if @opt_hash[:realign]
           new_score = Align.muscle([@q_entries[q_index], @s_entries[s_index]]).identity
           score     = new_score if new_score > score
         end