LocARNA-1.9.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Public Attributes
LocARNA::RnaEnsembleImpl Class Reference

Implementation of RnaEnsemble. More...

#include <rna_ensemble_impl.hh>

List of all members.

Public Member Functions

 RnaEnsembleImpl (const MultipleAlignment &sequence, const PFoldParams &pfparams, bool inLoopProbs, bool use_alifold)
 Construct from sequence or multiple alignment.
 ~RnaEnsembleImpl ()
 Destructor.
int ptype_of_admissible_basepair (size_type i, size_type j) const
 Pair type of an admissible basepair.
void compute_ensemble_probs (const PFoldParams &params, bool inLoopProbs, bool use_alifold)
 (re)compute the pair probabilities
double arc_2_prob_noali (size_type i, size_type j) const
 Get joint probability of stacked arcs.
double arc_2_prob_ali (size_type i, size_type j) const
 Get joint probability of stacked arcs (alifold version)
double unpaired_in_loop_prob_ali (size_type k, size_type i, size_type j) const
 Unpaired probabilty of base in a specified loop (alifold)
double unpaired_in_loop_prob_noali (size_type k, size_type i, size_type j) const
 Unpaired probabilty of base in a specified loop (no alifold)
double arc_in_loop_prob_ali (size_type ip, size_type jp, size_type i, size_type j) const
 Probabilty of base pair in a specified loop (alifold)
double arc_in_loop_prob_noali (size_type ip, size_type jp, size_type i, size_type j) const
 Probabilty of base pair in a specified loop.
void compute_Qm2 ()
 Computes the Qm2 matrix.
void compute_Qm2_ali ()
 Computes the Qm2 matrix (alifold)
void compute_McCaskill_matrices (const PFoldParams &params, bool inLoopProbs)
 Computes the McCaskill matrices and keeps them accessible.
void compute_McCaskill_alifold_matrices (const PFoldParams &params, bool inLoopProbs)
 Computes the McCaskill matrices and keeps them accessible (alifold)

Public Attributes

MultipleAlignment sequence_
 the sequence
bool pair_probs_available_
 whether pair probabilities are availabe
bool stacking_probs_available_
 whether stacking probabilities are available
bool in_loop_probs_available_
 whether "in loop" probabilities are availabe
std::vector< FLT_OR_DBL > qm2_
 matrix qm2_ (stored VRNA-style in a vector)
std::vector< FLT_OR_DBL > expMLbase_
 table for precomputed multi loop terms
McC_matrices_baseMcCmat_
bool used_alifold_
 whether alifold was used to compute the McCaskill matrices
double min_free_energy_
 minimum free energy (if computed anyway)
std::string min_free_energy_structure_

Detailed Description

Implementation of RnaEnsemble.


Constructor & Destructor Documentation

LocARNA::RnaEnsembleImpl::RnaEnsembleImpl ( const MultipleAlignment sequence,
const PFoldParams pfparams,
bool  inLoopProbs,
bool  use_alifold = true 
)

Construct from sequence or multiple alignment.

Parameters:
sequencesequence or multiple alignment
pfparamspartition folding parameters
inLoopProbswhether to compute in loop probabilities
use_alifoldwhether to use alifold (required unless sequence is a single sequence)

Destructor.

Free McCaskill DP matrices


Member Function Documentation

double LocARNA::RnaEnsembleImpl::arc_2_prob_ali ( size_type  i,
size_type  j 
) const

Get joint probability of stacked arcs (alifold version)

Parameters:
ileft sequence position
jright sequence position
Returns:
probability of basepairs (i,j) and (i+1,j-1) occuring simultaneously
double LocARNA::RnaEnsembleImpl::arc_2_prob_noali ( size_type  i,
size_type  j 
) const

Get joint probability of stacked arcs.

Parameters:
ileft sequence position
jright sequence position
Returns:
probability of basepairs (i,j) and (i+1,j-1) occuring simultaneously
double LocARNA::RnaEnsembleImpl::arc_in_loop_prob_ali ( size_type  ip,
size_type  jp,
size_type  i,
size_type  j 
) const

Probabilty of base pair in a specified loop (alifold)

`alifold-specific code

Parameters:
ipleft end of inner base pair
jpright end of inner base pair
ileft end of loop enclosing base pair
jright end of loop enclosing base pair
Returns:
probability that (ip,jp) is inner base pair in the loop closed by i and j
See also:
prob_basepair_in_loop()
Note:
pre: loop probs available, alifold used
double LocARNA::RnaEnsembleImpl::arc_in_loop_prob_noali ( size_type  ip,
size_type  jp,
size_type  i,
size_type  j 
) const

Probabilty of base pair in a specified loop.

`single sequence folding-specific code

Parameters:
ipleft end of inner base pair
jpright end of inner base pair
ileft end of loop enclosing base pair
jright end of loop enclosing base pair
Returns:
probability that (ip,jp) is inner base pair in the loop closed by i and j
See also:
prob_basepair_in_loop()
Note:
pre: loop probs available, alifold not used
void LocARNA::RnaEnsembleImpl::compute_ensemble_probs ( const PFoldParams params,
bool  inLoopProbs,
bool  use_alifold 
)

(re)compute the pair probabilities

Parameters:
paramspfolding parameters
inLoopProbswhether in loop probabilities should be made available
use_alifoldwhether alifold should be used
Precondition:
unless use_alifold, sequence row number has to be 1
void LocARNA::RnaEnsembleImpl::compute_McCaskill_alifold_matrices ( const PFoldParams params,
bool  inLoopProbs 
)

Computes the McCaskill matrices and keeps them accessible (alifold)

Allocates and fills the McCaskill alifold matrices.

Parameters:
paramsparameters for partition folding
inLoopProbswhether to compute and keep information for in loop probablities
void LocARNA::RnaEnsembleImpl::compute_McCaskill_matrices ( const PFoldParams params,
bool  inLoopProbs 
)

Computes the McCaskill matrices and keeps them accessible.

Allocates and fills the McCaskill matrices.

Precondition:
sequence_ has exactly one row
Parameters:
paramsparameters for partition folding
inLoopProbswhether to compute information for in loop probablities

Computes the Qm2 matrix.

The method creates and fills the Qm2 matrix needed for prob_unpaired_in_loop().

Precondition:
McCaskill matrices are computed and accessible.

Computes the Qm2 matrix (alifold)

The method creates and fills the Qm2 matrix needed for prob_unpaired_in_loop() if alifold is used.

Precondition:
McCaskill alifold matrices are computed and accessible.
int LocARNA::RnaEnsembleImpl::ptype_of_admissible_basepair ( size_type  i,
size_type  j 
) const

Pair type of an admissible basepair.

Parameters:
ileft end of base pair
jright end of base pair
Returns:
pair type unless the base pair is not admissible, i.e. it is not complementary or has probability 0.0. Then return 0.
double LocARNA::RnaEnsembleImpl::unpaired_in_loop_prob_ali ( size_type  k,
size_type  i,
size_type  j 
) const

Unpaired probabilty of base in a specified loop (alifold)

alifold-specific version of prob_unpaired_in_loop()

Parameters:
kunpaired sequence position
ileft end of loop enclosing base pair
jright end of loop enclosing base pair
Returns:
probability that k is unpaired in the loop closed by i and j
See also:
prob_unpaired_in_loop()
Note:
pre: loop probs available, alifold used
double LocARNA::RnaEnsembleImpl::unpaired_in_loop_prob_noali ( size_type  k,
size_type  i,
size_type  j 
) const

Unpaired probabilty of base in a specified loop (no alifold)

single sequence folding-specific version of prob_unpaired_in_loop()

Parameters:
kunpaired sequence position
ileft end of loop enclosing base pair
jright end of loop enclosing base pair
Returns:
probability that k is unpaired in the loop closed by i and j
See also:
prob_unpaired_in_loop()
Note:
pre: in loop probs are available, alifold not used

Member Data Documentation

DP matrix data structures of VRNA's McCaskill algorithm

minimum free energy structure (if computed)


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends