basebits 1.2.0

A library for encoding DNA into u64 to allow for constant time hamming distance calculations.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
extern crate basebits;
use basebits::{hamming_dist_nany, BaseBits};

fn main() {
    let string1 = b"ACTGACTG";
    let string2 = b"ACTTACTG";

    let string1 = BaseBits::new(string1).unwrap();
    let string2 = BaseBits::new(string2).unwrap();

    assert_eq!(hamming_dist_nany(&string1, &string2), 1);
}