]> git.donarmstrong.com Git - biopieces.git/blobdiff - code_ruby/lib/maasha/seq/patscan.rb
refactoring of ruby code converting sequences types to symbols
[biopieces.git] / code_ruby / lib / maasha / seq / patscan.rb
index 4e313980f0e195f3490646368b03b5d6d2f951e4..8cdfa8ec0cc54c6046940b6c1093189f16730d55 100644 (file)
@@ -153,13 +153,13 @@ module Patscan
 
   def pattern_disambiguate
     case self.type
-    when 'protein'
+    when :protein
       @pattern.gsub!('J', '[IFVLWMAGCY]')
       @pattern.gsub!('O', '[TSHEDQNKR]')
       @pattern.gsub!('B', '[DN]')
       @pattern.gsub!('Z', '[EQ]')
       @pattern.gsub!('X', '.')
-    when 'dna'
+    when :dna
       @pattern.gsub!('R', '[AG]')
       @pattern.gsub!('Y', '[CT]')
       @pattern.gsub!('S', '[GC]')
@@ -171,7 +171,7 @@ module Patscan
       @pattern.gsub!('D', '[AGT]')
       @pattern.gsub!('B', '[CGT]')
       @pattern.gsub!('N', '.')
-    when 'rna'
+    when :rna
     else
       raise SeqError "unknown sequence type: #{self.type}"
     end