class Bio::Sequence

Monkey patching to Bio::Sequence to find snps between sequences. It assumes the sequences are already aligned and doesn't check if a base on the first sequence is valid on the second.

Public Class Methods

snps_between(seq1, seq2) click to toggle source
# File lib/bio/BIOExtensions.rb, line 128
def self.snps_between(seq1, seq2)
  snps=0
  for i in (0..seq1.size-1)
    snps += 1 if seq1[i] != seq2[i] 
  end
  snps
end