Skip to main content

Node

Struct Node 

Source
pub struct Node<'a, K: Kmer + 'a, D: 'a> {
    pub node_id: usize,
    pub graph: &'a DebruijnGraph<K, D>,
}
Expand description

Unbranched sequence in the DeBruijn graph

Fields§

§node_id: usize§graph: &'a DebruijnGraph<K, D>

Implementations§

Source§

impl<'a, K: Kmer, D: Debug> Node<'a, K, D>

Source

pub fn len(&self) -> usize

Length of the sequence of this node

Source

pub fn is_empty(&self) -> bool

Source

pub fn sequence(&self) -> DnaStringSlice<'a>

Sequence of the node

Source

pub fn data(&self) -> &'a D

Reference to auxiliarly data associated with the node

Source

pub fn exts(&self) -> Exts

Extension bases from this node

Source

pub fn l_edges(&self) -> SmallVec<[(u8, usize, Dir, bool); 4]>

Edges leaving the left side of the node in the format (base, target_node id, incoming side of target node, whether target node is flipped)

Source

pub fn r_edges(&self) -> SmallVec<[(u8, usize, Dir, bool); 4]>

Edges leaving the right side of the node in the format (base, target_node id, incoming side of target node, whether target node is flipped)

Source

pub fn edges(&self, dir: Dir) -> SmallVec<[(u8, usize, Dir, bool); 4]>

Edges leaving the ‘dir’ side of the node in the format (base, target_node id, incoming side of target node, whether target node is flipped)

Source§

impl<K: Kmer, SD: Debug> Node<'_, K, SD>

Source

pub fn edge_dot_default<DI>( &self, colors: &Colors<'_, SD, DI>, base: u8, incoming_dir: Dir, flipped: bool, ) -> String
where SD: SummaryData<DI>,

get default format for dot edges based on node data

Source

pub fn node_dot_default<DI>( &self, colors: &Colors<'_, SD, DI>, config: &SummaryConfig, translator: &Translator, outline: bool, translate_id_groups: bool, ) -> String
where SD: SummaryData<DI>,

get default format for dot nodes, based on node data

Source

pub fn edge_json_default<DI>( &self, target_node_id: usize, base: u8, incoming_dir: Dir, flipped: bool, ) -> String
where SD: SummaryData<DI>,

Source

pub fn node_json_default<DI>( &self, colors: &Colors<'_, SD, DI>, config: &SummaryConfig, translator: &Translator, translate_id_groups: bool, ) -> String
where SD: SummaryData<DI>,

get default properties for json nodes, based on node data

Trait Implementations§

Source§

impl<K: Kmer, D> Debug for Node<'_, K, D>
where D: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, K, D> Freeze for Node<'a, K, D>

§

impl<'a, K, D> RefUnwindSafe for Node<'a, K, D>

§

impl<'a, K, D> Send for Node<'a, K, D>
where K: Sync, D: Sync,

§

impl<'a, K, D> Sync for Node<'a, K, D>
where K: Sync, D: Sync,

§

impl<'a, K, D> Unpin for Node<'a, K, D>

§

impl<'a, K, D> UnsafeUnpin for Node<'a, K, D>

§

impl<'a, K, D> UnwindSafe for Node<'a, K, D>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

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

Checks if self is actually part of its subset T (and can be converted to it).
§

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

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,