LocARNA-2.0.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LocARNA::PFGotoh< pf_score_t > Class Template Reference

Provide Gotoh partition functions. More...

#include <edge_probs.hh>

Inheritance diagram for LocARNA::PFGotoh< pf_score_t >:
Inheritance graph
[legend]
Collaboration diagram for LocARNA::PFGotoh< pf_score_t >:
Collaboration graph
[legend]

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_
 

Detailed Description

template<class pf_score_t>
class LocARNA::PFGotoh< pf_score_t >

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.

Constructor & Destructor Documentation

◆ PFGotoh()

template<class pf_score_t >
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

Parameters
rnaARnaData of RNA A
rnaBRnaData of RNA B
trace_controllercontroller limiting possible traces
sim_matsimilarity matrix for scoring base matches; e.g.
See also
Ribosum::get_basematch_scores()
Parameters
alphabetthe alphabet of the similiarity matrix
gap_openingscore for opening a gap
gap_extensionscore for extending a gap
pf_struct_weightweight of structure (vs. sequence)
temptemperature for computing the Boltzmann weights
free_endgapswhich end gaps should be cost free
flag_localwhether to run local alignment

Member Function Documentation

◆ pf_gotoh()

template<class pf_score_t >
void LocARNA::PFGotoh< pf_score_t >::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 
)
protected

perform the partition version of Gotoh's algorithm

Parameters
[out]zMmatrix for alignments ending in match
[out]zAmatrix for alignments ending with gapped pos in sequence A
[out]zBmatrix for alignments ending with gapped pos in sequence B @score stral scoring object
free_endgapswhich end gaps should be cost free

this method does not use sequence objects; the sequence information is provided by the scoring object

◆ z()

template<class pf_score_t >
const pf_score_t& LocARNA::PFGotoh< pf_score_t >::z ( ) const
inline

Get the partition function.

Returns
partition function

The documentation for this class was generated from the following file: