Path

Struct Path 

Source
pub struct Path { /* private fields */ }
Expand description

A path thought a BaseGraph

class to keep track of paths

Implementations§

Source§

impl Path

Source

pub fn new(last_vertex: NodeIndex, edges_in_order: Vec<EdgeIndex>) -> Self

Create a new Path containing no edges and starting at initialVertex @param initialVertex the starting vertex of the path @param graph the graph this path will follow through

Source

pub fn new_add_edge<V: BaseVertex, E: BaseEdge>( &self, edge: EdgeIndex, graph: &BaseGraph<V, E>, ) -> Path

Create a new Path extending p with edge

@param p the path to extend. @param edge the edge to extend path with.

@throws IllegalArgumentException if {@code p} or {@code edge} are {@code null}, or {@code edge} is not part of {@code p}’s graph, or {@code edge} does not have as a source the last vertex in {@code p}.

Source

pub fn new_prepend_edge<V: BaseVertex, E: BaseEdge>( &self, edge: EdgeIndex, graph: &BaseGraph<V, E>, ) -> Path

Creates a new path continuing on from #self that prepends the given edge index to the beginning of the path, checking that the edge is contiguous with the rest of the path

Source

pub fn new_add_edges<V: BaseVertex, E: BaseEdge>( &self, edges: Vec<EdgeIndex>, graph: &BaseGraph<V, E>, ) -> Path

Create a new Path extending p with edge

@param p the path to extend. @param edges list of edges to extend. Does not check arguments’ validity i.e. doesn’t check that edges are in order

@throws IllegalArgumentException if {@code p} or {@code edges} are {@code null} or empty, or {@code edges} is not part of {@code p}’s graph, or {@code edges} does not have as a source the last vertex in {@code p}.

Source

pub fn contains_vertex<V: BaseVertex, E: BaseEdge>( &self, v: NodeIndex, graph: &BaseGraph<V, E>, ) -> bool

Does this path contain the given vertex?

@param v a non-null vertex @return true if v occurs within this path, false otherwise

Source

pub fn to_string<V: BaseVertex, E: BaseEdge>( &self, graph: &BaseGraph<V, E>, ) -> String

Source

pub fn get_edges(&self) -> &Vec<EdgeIndex>

Get the edges of this path in order. Returns an unmodifiable view of the underlying list @return a non-null list of edges

Source

pub fn get_last_edge(&self) -> EdgeIndex

Source

pub fn get_vertices<V: BaseVertex, E: BaseEdge>( &self, graph: &BaseGraph<V, E>, ) -> Vec<NodeIndex>

Get the list of vertices in this path in order defined by the edges of the path @return a non-null, non-empty list of vertices

Source

pub fn get_first_vertex<V: BaseVertex, E: BaseEdge>( &self, graph: &BaseGraph<V, E>, ) -> NodeIndex

Get the first vertex in this path @return a non-null vertex

Source

pub fn get_last_vertex(&self) -> NodeIndex

Get the final vertex of the path @return a non-null vertex

Source

pub fn get_bases<V: BaseVertex, E: BaseEdge>( &self, graph: &BaseGraph<V, E>, ) -> Vec<u8>

The base sequence for this path. Pull the full sequence for source nodes and then the suffix for all subsequent nodes @return non-null sequence of bases corresponding to this path

Source

pub fn get_max_multiplicity<V: BaseVertex, E: BaseEdge>( &self, graph: &BaseGraph<V, E>, ) -> usize

Source

pub fn calculate_cigar<V: BaseVertex, E: BaseEdge>( &self, ref_seq: &[u8], graph: &BaseGraph<V, E>, avx_mode: AVXMode, ) -> CigarString

Calculate the cigar elements for this path against the reference sequence

@param refSeq the reference sequence that all of the bases in this path should align to @param aligner @return a Cigar mapping this path to refSeq, or null if no reasonable alignment could be found

Source

pub fn len(&self) -> usize

Length of the path in edges.

@return {@code 0} or greater.

Trait Implementations§

Source§

impl Clone for Path

Source§

fn clone(&self) -> Path

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Path

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Hash for Path

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Path

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Path

Auto Trait Implementations§

§

impl Freeze for Path

§

impl RefUnwindSafe for Path

§

impl Send for Path

§

impl Sync for Path

§

impl Unpin for Path

§

impl UnwindSafe for Path

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> CallHasher for T
where T: Hash + ?Sized,

Source§

default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64
where H: Hash + ?Sized, B: BuildHasher,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

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

Initializes a with the given initializer. Read more
Source§

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

Dereferences the given pointer. Read more
Source§

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

Mutably dereferences the given pointer. Read more
Source§

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

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

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

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

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

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

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

Source§

impl<T> Ungil for T
where T: Send,