![]() |
Bsoft 2.1.4
Bernard's software package
|
Library functions for dynamic programming. More...
Functions | |
long | dp_matrix_scoring (Matrix mat, double gapopen, double gapextend) |
Calculates the scoring matrix in dynamic programming. More... | |
int * | dp_matrix_backtrace (Matrix mat, double gapopen, double gapextend, long &length) |
Backtraces the scoring matrix in dynamic programming. More... | |
Variables | |
int | verbose |
Library functions for dynamic programming.
int * dp_matrix_backtrace | ( | Matrix | mat, |
double | gapopen, | ||
double | gapextend, | ||
long & | length | ||
) |
Backtraces the scoring matrix in dynamic programming.
mat | matrix. |
gapopen | gap opening penalty. |
gapextend | gap extension penalty. |
*length | length of alignment. |
Implementation of the Needleman-Wunsch algorithm. The scoring matrix for dynamic programming is backtraced into an integer array holding the indices from the corresponding sequences, or -1 for gaps. The array is double the length of the alignment and holds two sets of indices, the first in the first half and the second in last half. The length of the alignment is returned in the pointer of the last argument.
long dp_matrix_scoring | ( | Matrix | mat, |
double | gapopen, | ||
double | gapextend | ||
) |
Calculates the scoring matrix in dynamic programming.
mat | matrix. |
gapopen | gap opening penalty. |
gapextend | gap extension penalty. |
Implementation of the Needleman-Wunsch algorithm. The input matrix can be any form of similarity or coincidence matrix, and is modified by dynamic programming in preparation for backtracing.
|
extern |