libuproc
1.2.0
|
Array of matrices of amino acid distances. More...
Data Structures | |
struct | uproc_substmat |
Array of matrices of amino acid distances. More... | |
Functions | |
uproc_substmat * | uproc_substmat_create (void) |
Create substmat object. More... | |
void | uproc_substmat_destroy (uproc_substmat *mat) |
Destroy substmat object. More... | |
double | uproc_substmat_get (const uproc_substmat *mat, unsigned pos, uproc_amino x, uproc_amino y) |
Get distance of two amino acids. More... | |
void | uproc_substmat_set (uproc_substmat *mat, unsigned pos, uproc_amino x, uproc_amino y, double dist) |
Set distance of two amino acids. More... | |
void | uproc_substmat_align_suffixes (const uproc_substmat *mat, uproc_suffix s1, uproc_suffix s2, double *dist) |
Look up all distances between amino acids in a suffix. More... | |
uproc_substmat * | uproc_substmat_load (enum uproc_io_type iotype, const char *pathfmt,...) |
Load substmat from file. More... | |
uproc_substmat * | uproc_substmat_loadv (enum uproc_io_type iotype, const char *pathfmt, va_list ap) |
Load substmat from file. More... | |
Array of matrices of amino acid distances.
An array of UPROC_SUFFIX_LEN matrices used to obtain pairwise distances of the suffix part of two uproc_word instances.
uproc_substmat* uproc_substmat_create | ( | void | ) |
Create substmat object.
Create substitution matrix object with all entries set to 0.
void uproc_substmat_destroy | ( | uproc_substmat * | mat | ) |
Destroy substmat object.
double uproc_substmat_get | ( | const uproc_substmat * | mat, |
unsigned | pos, | ||
uproc_amino | x, | ||
uproc_amino | y | ||
) |
Get distance of two amino acids.
Retrieves distance between two amino acids x
and y
at the suffix position pos
mat | distance matrix |
pos | position (between 0 and UPROC_SUFFIX_LEN) |
x | amino acid |
y | another amino acid |
void uproc_substmat_set | ( | uproc_substmat * | mat, |
unsigned | pos, | ||
uproc_amino | x, | ||
uproc_amino | y, | ||
double | dist | ||
) |
Set distance of two amino acids.
Sets the distance between two amino acids x
and y
at the suffix position pos
to dist
.
mat | distance matrix |
pos | position (between 0 and UPROC_SUFFIX_LEN) |
x | amino acid |
y | another amino acid |
dist | distance between x and y |
void uproc_substmat_align_suffixes | ( | const uproc_substmat * | mat, |
uproc_suffix | s1, | ||
uproc_suffix | s2, | ||
double * | dist | ||
) |
Look up all distances between amino acids in a suffix.
dist
must be a pointer into an array with at least UPROC_SUFFIX_LEN elements.
mat | substitution matrix |
s1 | first suffix |
s2 | second suffix |
dist | OUT: array containing distance of each amino acid pair |
uproc_substmat* uproc_substmat_load | ( | enum uproc_io_type | iotype, |
const char * | pathfmt, | ||
... | |||
) |
Load substmat from file.
iotype | IO type, see uproc_io_type |
pathfmt | printf format string for file path |
... | format string arguments |
uproc_substmat* uproc_substmat_loadv | ( | enum uproc_io_type | iotype, |
const char * | pathfmt, | ||
va_list | ap | ||
) |
Load substmat from file.
Like uproc_substmat_load, but with a va_list
instead of a variable number of arguments.