pub struct Exts {
pub val: u8,
}Expand description
Store single-base extensions for a DNA Debruijn graph.
8 bits, 4 higher order ones represent extensions to the right, 4 lower order ones represent extensions to the left. For each direction the bits (from lower order to higher order) represent whether there exists an extension with each of the letters A, C, G, T. So overall the bits are: right left T G C A T G C A
Fields§
§val: u8Implementations§
Source§impl Exts
impl Exts
pub fn new(val: u8) -> Self
pub fn empty() -> Exts
pub fn from_single_dirs(left: Exts, right: Exts) -> Exts
pub fn merge(left: Exts, right: Exts) -> Exts
pub fn add(&self, v: Exts) -> Exts
pub fn set(&self, dir: Dir, pos: u8) -> Exts
pub fn remove(&self, dir: Dir, pos: u8) -> Exts
pub fn get(&self, dir: Dir) -> Vec<u8> ⓘ
pub fn has_ext(&self, dir: Dir, base: u8) -> bool
pub fn from_slice_bounds(src: &[u8], start: usize, length: usize) -> Exts
pub fn from_dna_string(src: &DnaString, start: usize, length: usize) -> Exts
pub fn num_exts_l(&self) -> u8
pub fn num_exts_r(&self) -> u8
pub fn num_ext_dir(&self, dir: Dir) -> u8
pub fn mk_left(base: u8) -> Exts
pub fn mk_right(base: u8) -> Exts
pub fn mk(left_base: u8, right_base: u8) -> Exts
pub fn get_unique_extension(&self, dir: Dir) -> Option<u8>
pub fn single_dir(&self, dir: Dir) -> Exts
Sourcepub fn complement(&self) -> Exts
pub fn complement(&self) -> Exts
Complement the extension bases for each direction
pub fn reverse(&self) -> Exts
pub fn rc(&self) -> Exts
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Exts
impl<'de> Deserialize<'de> for Exts
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Exts
impl Ord for Exts
Source§impl PartialOrd for Exts
impl PartialOrd for Exts
impl Copy for Exts
impl Eq for Exts
impl StructuralPartialEq for Exts
Auto Trait Implementations§
impl Freeze for Exts
impl RefUnwindSafe for Exts
impl Send for Exts
impl Sync for Exts
impl Unpin for Exts
impl UnsafeUnpin for Exts
impl UnwindSafe for Exts
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.