autoload :Dynamic, 'maasha/seq/dynamic'
autoload :Homopolymer, 'maasha/seq/homopolymer'
autoload :Levenshtein, 'maasha/seq/levenshtein'
+autoload :Ambiguity, 'maasha/seq/ambiguity'
# Residue alphabets
DNA = %w[a t c g]
# Method to determine the Hamming Distance between
# two Sequence objects (case insensitive).
- def hamming_distance(entry)
- self.seq.upcase.hamming_distance(entry.seq.upcase)
+ def hamming_distance(entry, options = nil)
+ if options and options[:ambiguity]
+ Ambiguity.hamming_distance(self.seq, entry.seq)
+ else
+ self.seq.upcase.hamming_distance(entry.seq.upcase)
+ end
end
# Method to determine the Edit Distance between