fn determine_gap_penalty(&self, traceback_cell : &TracebackCell, current_op: AlignmentOperation) -> i32
    {
        match traceback_cell.op {
            AlignmentOperation::Match(None) => {
                self.scoring.gap_open
            }
            AlignmentOperation::Match(Some((_, _p))) => {
                self.scoring.gap_open
            }
            AlignmentOperation::Ins(None) => {
                match current_op
                {
                    AlignmentOperation::Ins(None) =>  {
                        self.scoring.gap_extend
                    },
                     AlignmentOperation::Ins(Some(_)) => {
                        self.scoring.gap_extend
                    },
                    _ => {
                        self.scoring.gap_open
                    }
                }
            }
            AlignmentOperation::Ins(Some(_)) => {
                match current_op
                {
                    AlignmentOperation::Ins(None) =>  {
                        self.scoring.gap_extend
                    },
                     AlignmentOperation::Ins(Some(_)) => {
                        self.scoring.gap_extend
                    },
                    _ => {
                        self.scoring.gap_open
                    }
                }
            }
            AlignmentOperation::Del(_) => {
                match current_op
                {
                    AlignmentOperation::Del(None) =>  {
                        self.scoring.gap_extend
                    },
                    _ => {
                        self.scoring.gap_open
                    }
                }
            }
        }
    }
/// determine whether the gap penalty is an open or an extend based on previous cell
determine whether the gap penalty is an open or an extend based on previous cell
determine whether the gap penalty is an open or an extend based on previous cell
fn determine_gap_penalty(&self, traceback_cell : &TracebackCell, current_op: AlignmentOperation) -> i32
    {
        match traceback_cell.op {
            AlignmentOperation::Match(None) => {
                self.scoring.gap_open
            }
            AlignmentOperation::Match(Some((_, _p))) => {
                self.scoring.gap_open
            }
            AlignmentOperation::Ins(None) => {
                match current_op
                {
                    AlignmentOperation::Ins(None) =>  {
                        self.scoring.gap_extend
                    },
                     AlignmentOperation::Ins(Some(_)) => {
                        self.scoring.gap_extend
                    },
                    _ => {
                        self.scoring.gap_open
                    }
                }
            }
            AlignmentOperation::Ins(Some(_)) => {
                match current_op
                {
                    AlignmentOperation::Ins(None) =>  {
                        self.scoring.gap_extend
                    },
                     AlignmentOperation::Ins(Some(_)) => {
                        self.scoring.gap_extend
                    },
                    _ => {
                        self.scoring.gap_open
                    }
                }
            }
            AlignmentOperation::Del(_) => {
                match current_op
                {
                    AlignmentOperation::Del(None) =>  {
                        self.scoring.gap_extend
                    },
                    _ => {
                        self.scoring.gap_open
                    }
                }
            }
        }
    }
fn determine_gap_penalty ( & self , traceback_cell : & TracebackCell , current_op : AlignmentOperation ) -> i32 { match traceback_cell . op { AlignmentOperation :: Match ( None ) => { self . scoring . gap_open } AlignmentOperation :: Match ( Some ( ( _ , _p ) ) ) => { self . scoring . gap_open } AlignmentOperation :: Ins ( None ) => { match current_op { AlignmentOperation :: Ins ( None ) => { self . scoring . gap_extend } , AlignmentOperation :: Ins ( Some ( _ ) ) => { self . scoring . gap_extend } , _ => { self . scoring . gap_open } } } AlignmentOperation :: Ins ( Some ( _ ) ) => { match current_op { AlignmentOperation :: Ins ( None ) => { self . scoring . gap_extend } , AlignmentOperation :: Ins ( Some ( _ ) ) => { self . scoring . gap_extend } , _ => { self . scoring . gap_open } } } AlignmentOperation :: Del ( _ ) => { match current_op { AlignmentOperation :: Del ( None ) => { self . scoring . gap_extend } , _ => { self . scoring . gap_open } } } } }
determine whether the gap penalty is an open or an extend based on previous cell
determine whether the gap penalty is an open or an extend based on previous cell
&self
traceback_cell
&TracebackCell
current_op
AlignmentOperation
&self
traceback_cell
&TracebackCell
current_op
AlignmentOperation