pub fn decode(
ebuf: &[u64],
n_bases: usize,
dbuf: &mut Vec<u8>,
) -> Result<(), NucleotideError>Expand description
Unpacks a 2-bit packed sequence into a nucleotide sequence.
The sequence is a collection of u64 values, where each u64 contains up to 32 nucleotides.
It is expected that the sequence is packed fully (32bp) until the final u64, which may contain fewer than 32 nucleotides.
§Arguments
ebuf- The buffer containing the packed nucleotides.n_bases- The number of nucleotides to unpack.dbuf- The buffer to write the unpacked nucleotides to.
§Errors
If the sequence cannot be unpacked, an error is returned.