class String
Public Instance Methods
count_ambiguities()
click to toggle source
Monkey patching to count how many ambiguity codes are present in the string, for Nucleic Acids
# File lib/bio/BIOExtensions.rb, line 139 def count_ambiguities snps=0 for i in (0..self.size-1) snps += 1 if !Bio::NucleicAcid.is_unambiguous(self[i]) end snps end
upper_case_count()
click to toggle source
Counts how many bases are uppercase
# File lib/bio/BIOExtensions.rb, line 150 def upper_case_count match(/[^A-Z]*/).to_s.size end