/// Create a new POA graph from an initial reference sequence and alignment penalties.
///
/// # Arguments
///
/// * `scoring` - the score struct
/// * `reference` - a reference TextSlice to populate the initial reference graph
Create a new POA graph from an initial reference sequence and alignment penalties.
Create a new POA graph from an initial reference sequence and alignment penalties .
pub fn from_string(scoring: Scoring<F>, seq: TextSlice) -> Self {
        let mut graph: Graph<u8, i32, Directed, usize> =
            Graph::with_capacity(seq.len(), seq.len() - 1);
        let mut prev: NodeIndex<usize> = graph.add_node(seq[0]);
        let mut node: NodeIndex<usize>;
        for base in seq.iter().skip(1) {
            node = graph.add_node(*base);
            graph.add_edge(prev, node, 1);
            prev = node;
        }
        Poa { scoring, graph }
    }
pub fn from_string ( scoring : Scoring < F > , seq : TextSlice ) -> Self { let mut graph : Graph < u8 , i32 , Directed , usize > = Graph :: with_capacity ( seq . len ( ) , seq . len ( ) - 1 ) ; let mut prev : NodeIndex < usize > = graph . add_node ( seq [ 0 ] ) ; let mut node : NodeIndex < usize > ; for base in seq . iter ( ) . skip ( 1 ) { node = graph . add_node ( * base ) ; graph . add_edge ( prev , node , 1 ) ; prev = node ; } Poa { scoring , graph } }
Create a new POA graph from an initial reference sequence and alignment penalties.
Create a new POA graph from an initial reference sequence and alignment penalties .
scoring
Scoring<F>
seq
TextSlice