compact-genome 0.1.0-alpha.3

Representation of genomes
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
pub trait Genome<'a>: From<&'a [u8]> + Into<Vec<u8>> + std::fmt::Display {
    fn reverse_complement(&self) -> Self;
}

pub fn ascii_complement(char: u8) -> Option<u8> {
    match char {
        b'A' => Some(b'T'),
        b'T' => Some(b'A'),
        b'G' => Some(b'C'),
        b'C' => Some(b'G'),
        _ => None,
    }
}