bitnuc-mismatch
Create unambiguous one-off mismatch hash tables from bitnuc scalars.
This library adapts my work in disambiseq to operating in 2-bit space.
Note that this is for sequences that are represented as bitnuc scalars.
By definition this limits the sequences to a maximum length of 32 nucleotides.
Future work will include support for longer sequences.
Usage
This is a library for generating unambiguous one-off mismatches for bitnuc scalars. The library provides a function to generate all possible one-off mismatches for a given bitnuc scalar. It also provides a function to build a mismatch table, which maps mismatches to their parent sequences. The library is designed to be used in the context of generating mismatches for a set of parent sequences while avoiding ambiguous mismatches. Ambiguous mismatches are mismatches that are within the one-off distance of multiple parent sequences.
This builds on the bitnuc library, which provides functions for converting nucleotide sequences to bitnuc scalars.
Example
use build_mismatch_table;
// Define a set of parent sequences
let parent_sequences = vec!;
// Convert the parent sequences to bitnuc scalars
let parent_scalars: = parent_sequences
.into_iter
.map
.collect;
// Build a mismatch table
let mismatch_table = build_mismatch_table.unwrap;
// Test some expected mismatches
let gcta = as_2bit.unwrap;
assert_eq!;
// Validate that unexpected mismatches are not present
let acgg = as_2bit.unwrap;
assert!;