X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=code_ruby%2Flib%2Fmaasha%2Falign%2Fmatch.rb;h=47a5fbd523aecba4ab81b51394a656eb4362c770;hb=723c21eda3eccc2af806d925ac57bf5fb367e6c6;hp=784a2d12f2a1916adb8a216c821769683697a19a;hpb=172f31c83a6de7f5af893cae7fe5d39714d50ff7;p=biopieces.git diff --git a/code_ruby/lib/maasha/align/match.rb b/code_ruby/lib/maasha/align/match.rb index 784a2d1..47a5fbd 100644 --- a/code_ruby/lib/maasha/align/match.rb +++ b/code_ruby/lib/maasha/align/match.rb @@ -23,7 +23,6 @@ # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< require 'inline' -require 'maasha/math_aux' # Class for describing a match between two sequences q and s. class Match @@ -58,20 +57,8 @@ class Match self end - def redundant?(matches) - # Speed-up with binary search - - matches.each do |m| - if Math.dist_point2line(self.q_beg, self.s_beg, m.q_beg, m.s_beg, m.q_end, m.s_end) == 0 - return true - end - end - - false - end - def to_s(seq = nil) - s = "q: #{@q_beg}, s: #{@s_beg}, l: #{@length}, s: #{@score}" + s = "q: #{@q_beg} #{self.q_end} s: #{@s_beg} #{self.s_end} l: #{@length} s: #{@score}" s << " #{seq[@q_beg .. q_end]}" if seq s