From: martinahansen Date: Tue, 29 Mar 2011 08:24:17 +0000 (+0000) Subject: removed amatch dependency in ruby code X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=271efcabb086730777e8abb8bdb13a5dc0689795;p=biopieces.git removed amatch dependency in ruby code git-svn-id: http://biopieces.googlecode.com/svn/trunk@1307 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/code_ruby/Maasha/lib/digest.rb b/code_ruby/Maasha/lib/digest.rb index 3268a9d..727e51c 100644 --- a/code_ruby/Maasha/lib/digest.rb +++ b/code_ruby/Maasha/lib/digest.rb @@ -22,8 +22,6 @@ # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -require 'seq' - # Error class for all exceptions to do with Digest. class DigestError < StandardError; end diff --git a/code_ruby/Maasha/lib/seq.rb b/code_ruby/Maasha/lib/seq.rb index 30b4c59..18a0958 100644 --- a/code_ruby/Maasha/lib/seq.rb +++ b/code_ruby/Maasha/lib/seq.rb @@ -22,7 +22,6 @@ # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -require 'amatch' require 'digest' require 'patternmatcher' @@ -40,7 +39,6 @@ SCORE_ILLUMINA = 64 class SeqError < StandardError; end class Seq - include Amatch include PatternMatcher attr_accessor :seq_name, :seq, :type, :qual @@ -325,8 +323,6 @@ class Seq len = self.length - pos subseq = self.seq[pos ... pos + len].upcase subadaptor = adaptor[0 ... len].upcase - m = Hamming.new(subseq) - hamming_dist = m.match(subadaptor) hamming_max = (len * hd_percent * 0.01).round return pos if hamming_dist <= hamming_max @@ -349,8 +345,6 @@ class Seq len = pos subseq = self.seq[0 ... len].upcase subadaptor = adaptor[adaptor.length - len ... adaptor.length].upcase - m = Hamming.new(subseq) - hamming_dist = m.match(subadaptor) hamming_max = (len * hd_percent * 0.01).round pos -= 1