Trait bio_seq::codec::Complement

source ·
pub trait Complement {
    // Required method
    fn comp(self) -> Self;
}
Expand description

Nucleotide alphabets that can be complemented implement Complement

use bio_seq::prelude::{Dna, Complement};
assert_eq!(Dna::A.comp(), Dna::T);

Required Methods§

source

fn comp(self) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Complement for bio_seq::codec::dna::Dna

source§

impl Complement for bio_seq::codec::text::Dna

source§

impl<const K: usize> Complement for Kmer<Dna, K>

Bitwise negation results in the complement of a base. This can be used to efficiently complement a bit-packed sequence of Dna.