LocARNA-2.0.0
|
Provide Gotoh partition functions. More...
#include <edge_probs.hh>
Public Types | |
using | size_type = size_t |
size | |
Public Member Functions | |
PFGotoh (const RnaData &rnaA, const RnaData &rnaB, const TraceController &trace_controller, const Matrix< double > &sim_mat, const Alphabet< char, 4 > &alphabet, double gap_opening, double gap_extension, double pf_struct_weight, double temp, const FreeEndgaps &free_endgaps, bool flag_local) | |
Construct to provide partial partition functions from Gotoh-like matrices. More... | |
const pf_score_t & | z () const |
Get the partition function. More... | |
Protected Member Functions | |
void | pf_gotoh (Matrix< pf_score_t > &zM, Matrix< pf_score_t > &zA, Matrix< pf_score_t > &zB, const TraceController &trace_controller, const StralScore &score, const FreeEndgaps &free_endgaps) |
perform the partition version of Gotoh's algorithm More... | |
bool | fail () const |
Protected Attributes | |
size_type | lenA_ |
size_type | lenB_ |
double | temp_ |
bool | flag_local_ |
pf_score_t | z_ |
Matrix< pf_score_t > | zM_ |
pfs over alignments ending in match i~j | |
Matrix< pf_score_t > | zA_ |
pfs over alignments ending w/ gap in A | |
Matrix< pf_score_t > | zB_ |
pfs over alignments ending w/ gap in B | |
Matrix< pf_score_t > | zMr_ |
reverse zM_ | |
Matrix< pf_score_t > | zAr_ |
reverse zA_ | |
Matrix< pf_score_t > | zBr_ |
reverse zB_ | |
Provide Gotoh partition functions.
Implements a partition function variant of the Gotoh algorithm
In contrast to the standard Gotoh algorithm, we need to make the algorithm non-ambiguous. This means that ZM is only for alignments that do not end in gaps. We achieve this by reducing ZM_ij to ZM_i-1,j-1, ZA_i-1,j-1, and ZB_i-1,j-1
The matrices ZA and ZB represent alignments that end in a gap in seqA or seqB, resp.
LocARNA::PFGotoh< pf_score_t >::PFGotoh | ( | const RnaData & | rnaA, |
const RnaData & | rnaB, | ||
const TraceController & | trace_controller, | ||
const Matrix< double > & | sim_mat, | ||
const Alphabet< char, 4 > & | alphabet, | ||
double | gap_opening, | ||
double | gap_extension, | ||
double | pf_struct_weight, | ||
double | temp, | ||
const FreeEndgaps & | free_endgaps, | ||
bool | flag_local | ||
) |
Construct to provide partial partition functions from Gotoh-like matrices.
Runs the Gotoh partition function variant
rnaA | RnaData of RNA A |
rnaB | RnaData of RNA B |
trace_controller | controller limiting possible traces |
sim_mat | similarity matrix for scoring base matches; e.g. |
alphabet | the alphabet of the similiarity matrix |
gap_opening | score for opening a gap |
gap_extension | score for extending a gap |
pf_struct_weight | weight of structure (vs. sequence) |
temp | temperature for computing the Boltzmann weights |
free_endgaps | which end gaps should be cost free |
flag_local | whether to run local alignment |
|
protected |
perform the partition version of Gotoh's algorithm
[out] | zM | matrix for alignments ending in match |
[out] | zA | matrix for alignments ending with gapped pos in sequence A |
[out] | zB | matrix for alignments ending with gapped pos in sequence B @score stral scoring object |
free_endgaps | which end gaps should be cost free |
this method does not use sequence objects; the sequence information is provided by the scoring object
|
inline |
Get the partition function.