Skip to main content

Crate onehot_dna

Crate onehot_dna 

Source
Expand description

Fixed-length one-hot DNA encoding for small barcode/primer matching.

Encoding:

  • A = 0001
  • C = 0010
  • G = 0100
  • T = 1000
  • anything else, including N, becomes 0000

This means unknown bases match nothing and count as mismatches. That is usually what you want for barcode correction.

OneHot<N> stores N bases in a u128, using four bits per base. Therefore N <= 32.

Structs§

OneHot
Fixed-length one-hot DNA sequence.
OneHotSet

Enums§

OneHotError
Error returned when constructing a OneHot sequence.

Type Aliases§

OneHot9
Convenience alias for BD Rhapsody C1/C2/C3 9 bp blocks.