pub struct Path { /* private fields */ }Expand description
A path thought a BaseGraph
class to keep track of paths
Implementations§
Source§impl Path
impl Path
Sourcepub fn new(last_vertex: NodeIndex, edges_in_order: Vec<EdgeIndex>) -> Self
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
Sourcepub fn new_add_edge<V: BaseVertex, E: BaseEdge>(
&self,
edge: EdgeIndex,
graph: &BaseGraph<V, E>,
) -> Path
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}.
Sourcepub fn new_prepend_edge<V: BaseVertex, E: BaseEdge>(
&self,
edge: EdgeIndex,
graph: &BaseGraph<V, E>,
) -> Path
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
Sourcepub fn new_add_edges<V: BaseVertex, E: BaseEdge>(
&self,
edges: Vec<EdgeIndex>,
graph: &BaseGraph<V, E>,
) -> Path
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}.
Sourcepub fn contains_vertex<V: BaseVertex, E: BaseEdge>(
&self,
v: NodeIndex,
graph: &BaseGraph<V, E>,
) -> bool
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
pub fn to_string<V: BaseVertex, E: BaseEdge>( &self, graph: &BaseGraph<V, E>, ) -> String
Sourcepub fn get_edges(&self) -> &Vec<EdgeIndex>
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
pub fn get_last_edge(&self) -> EdgeIndex
Sourcepub fn get_vertices<V: BaseVertex, E: BaseEdge>(
&self,
graph: &BaseGraph<V, E>,
) -> Vec<NodeIndex>
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
Sourcepub fn get_first_vertex<V: BaseVertex, E: BaseEdge>(
&self,
graph: &BaseGraph<V, E>,
) -> NodeIndex
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
Sourcepub fn get_last_vertex(&self) -> NodeIndex
pub fn get_last_vertex(&self) -> NodeIndex
Get the final vertex of the path @return a non-null vertex
Sourcepub fn get_bases<V: BaseVertex, E: BaseEdge>(
&self,
graph: &BaseGraph<V, E>,
) -> Vec<u8> ⓘ
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
pub fn get_max_multiplicity<V: BaseVertex, E: BaseEdge>( &self, graph: &BaseGraph<V, E>, ) -> usize
Sourcepub fn calculate_cigar<V: BaseVertex, E: BaseEdge>(
&self,
ref_seq: &[u8],
graph: &BaseGraph<V, E>,
avx_mode: AVXMode,
) -> CigarString
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
Trait Implementations§
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> 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
Source§impl<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.