From: martinahansen Date: Wed, 23 May 2012 09:54:00 +0000 (+0000) Subject: refactored argument precise to realign X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=0da08a8f8d8b0c642acca385bd807adb5369c6e1;p=biopieces.git refactored argument precise to realign git-svn-id: http://biopieces.googlecode.com/svn/trunk@1820 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/code_ruby/lib/maasha/findsim.rb b/code_ruby/lib/maasha/findsim.rb index 25f135c..6b1ad23 100644 --- a/code_ruby/lib/maasha/findsim.rb +++ b/code_ruby/lib/maasha/findsim.rb @@ -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