From: martinahansen Date: Tue, 9 Oct 2012 09:16:17 +0000 (+0000) Subject: cleanup of findsim.rb X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=fdb3089210033ae28e747ee527df73cc7fe9b11e;p=biopieces.git cleanup of findsim.rb git-svn-id: http://biopieces.googlecode.com/svn/trunk@1953 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/code_ruby/lib/maasha/findsim.rb b/code_ruby/lib/maasha/findsim.rb index c1da3d4..49cf132 100644 --- a/code_ruby/lib/maasha/findsim.rb +++ b/code_ruby/lib/maasha/findsim.rb @@ -161,7 +161,7 @@ class FindSim if @opt_hash[:max_diversity] best_score = score if i == 0 - break if best_score - score > (@opt_hash[:max_diversity] / 100) + break if best_score - score >= (@opt_hash[:max_diversity] / 100) end yield Hit.new(q_id, s_id, score) @@ -351,7 +351,7 @@ class FindSim VALUE _step // Step size for overlapping kmers. ) { - unsigned char *str = StringValuePtr(_str); + char *str = StringValuePtr(_str); unsigned int str_size = FIX2UINT(_str_size); unsigned int *ary = (unsigned int *) StringValuePtr(_ary); unsigned int kmer = FIX2UINT(_kmer);