X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=code_ruby%2Flib%2Fmaasha%2Fseq.rb;h=2788e5dcc02d78cdb9e3fd38ef83749bad158b79;hb=381ac0da9f2a23e39e5fe3708b120cea3530b8d6;hp=d8a73d31ba8d660fa08bb6aac9c0c24f91137151;hpb=351549b36ba20cf06daf9cf0e14273d84ae1f83e;p=biopieces.git diff --git a/code_ruby/lib/maasha/seq.rb b/code_ruby/lib/maasha/seq.rb index d8a73d3..2788e5d 100644 --- a/code_ruby/lib/maasha/seq.rb +++ b/code_ruby/lib/maasha/seq.rb @@ -27,8 +27,9 @@ require 'maasha/seq/digest' require 'maasha/seq/trim' require 'narray' -autoload :BackTrack, 'maasha/seq/backtrack.rb' -autoload :Dynamic, 'maasha/seq/dynamic.rb' +autoload :BackTrack, 'maasha/seq/backtrack.rb' +autoload :Dynamic, 'maasha/seq/dynamic.rb' +autoload :Homopolymer, 'maasha/seq/homopolymer.rb' # Residue alphabets DNA = %w[a t c g] @@ -515,23 +516,6 @@ class Seq comp end - # Method that returns the length of the longest homopolymeric stretch - # found in a sequence. - def homopol_max(min = 1) - return 0 if self.seq.nil? or self.seq.empty? - - found = false - - self.seq.upcase.scan(/A{#{min},}|T{#{min},}|G{#{min},}|C{#{min},}|N{#{min},}/) do |match| - found = true - min = match.size > min ? match.size : min - end - - return 0 unless found - - min - end - # Method that returns the percentage of hard masked residues # or N's in a sequence. def hard_mask