Skip to main content

Module encoding

Module encoding 

Source

Functionsยง

decode_dna_2bit
Unpacks a 2-bit-per-base integer back into length DNA bases, the inverse of encode_dna_2bit. Bits above 2 * length are ignored.
encode_dna_2bit
Packs a DNA sequence into a 2-bit-per-base integer in little-endian symbol order (the first base occupies the lowest bits). Panics on non-ACGT input.
encode_dna_2bit_rc
Encodes the reverse complement of a DNA sequence directly, without building an intermediate buffer. Panics on non-ACGT input.