pub fn edges(&self, aln: Alignment) -> Vec<usize> {
        let mut path: Vec<usize> = vec![];
        let mut prev: NodeIndex<usize> = NodeIndex::new(0);
        let mut _i: usize = 0;
        for op in aln.operations {
            match op {
                AlignmentOperation::Match(None) => {
                    _i += 1;
                }
                AlignmentOperation::Match(Some((_, p))) => {
                    let node = NodeIndex::new(p);
                    let edge = self.graph.find_edge(prev, node).unwrap();
                    path.push(edge.index());
                    prev = NodeIndex::new(p);
                    _i += 1;
                }
                AlignmentOperation::Ins(None) => {}
                AlignmentOperation::Ins(Some(_)) => {}
                AlignmentOperation::Del(_) => {}
            }
        }
        path
    }
/// Experimental: return sequence of traversed edges
///
/// Only supports alignments for sequences that have already been added,
/// so all operations must be Match.
return sequence of traversed edges
Only supports alignments for sequences that have already been added,
so all operations must be Match.
return sequence of traversed edges Only supports alignments for sequences that have already been added so all operations must be Match .
pub fn edges(&self, aln: Alignment) -> Vec<usize> {
        let mut path: Vec<usize> = vec![];
        let mut prev: NodeIndex<usize> = NodeIndex::new(0);
        let mut _i: usize = 0;
        for op in aln.operations {
            match op {
                AlignmentOperation::Match(None) => {
                    _i += 1;
                }
                AlignmentOperation::Match(Some((_, p))) => {
                    let node = NodeIndex::new(p);
                    let edge = self.graph.find_edge(prev, node).unwrap();
                    path.push(edge.index());
                    prev = NodeIndex::new(p);
                    _i += 1;
                }
                AlignmentOperation::Ins(None) => {}
                AlignmentOperation::Ins(Some(_)) => {}
                AlignmentOperation::Del(_) => {}
            }
        }
        path
    }
pub fn edges ( & self , aln : Alignment ) -> Vec < usize > { let mut path : Vec < usize > = vec ! [ ] ; let mut prev : NodeIndex < usize > = NodeIndex :: new ( 0 ) ; let mut _i : usize = 0 ; for op in aln . operations { match op { AlignmentOperation :: Match ( None ) => { _i += 1 ; } AlignmentOperation :: Match ( Some ( ( _ , p ) ) ) => { let node = NodeIndex :: new ( p ) ; let edge = self . graph . find_edge ( prev , node ) . unwrap ( ) ; path . push ( edge . index ( ) ) ; prev = NodeIndex :: new ( p ) ; _i += 1 ; } AlignmentOperation :: Ins ( None ) => { } AlignmentOperation :: Ins ( Some ( _ ) ) => { } AlignmentOperation :: Del ( _ ) => { } } } path }
Experimental: return sequence of traversed edges
Only supports alignments for sequences that have already been added,
so all operations must be Match.
Experimental : return sequence of traversed edges Only supports alignments for sequences that have already been added so all operations must be Match .
&self
aln
Alignment
&self
aln
Alignment