IntaRNA 3.4.1
RNA-RNA interaction prediction | C++ API
Loading...
Searching...
No Matches
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
IntaRNA::InteractionEnergyVrna Class Reference

#include <InteractionEnergyVrna.h>

Inheritance diagram for IntaRNA::InteractionEnergyVrna:
Inheritance graph
[legend]
Collaboration diagram for IntaRNA::InteractionEnergyVrna:
Collaboration graph
[legend]

Public Member Functions

 InteractionEnergyVrna (const Accessibility &accS1, const ReverseAccessibility &accS2, VrnaHandler &vrnaHandler, const size_t maxInternalLoopSize1=16, const size_t maxInternalLoopSize2=16, const bool initES=false, const E_type energyAdd=Ekcal_2_E(0.0), const bool energyWithDangles=true, const bool internalLoopGU=true)
 
virtual ~InteractionEnergyVrna ()
 
virtual E_type getES1 (const size_t i1, const size_t j1) const
 
virtual E_type getES2 (const size_t i2, const size_t j2) const
 
virtual E_type getE_multiUnpaired (const size_t numUnpaired) const
 
virtual E_type getE_multiHelix (const size_t j1, const size_t j2) const
 
virtual E_type getE_multiClosing () const
 
virtual E_type getE_init () const
 
virtual E_type getE_interLeft (const size_t i1, const size_t j1, const size_t i2, const size_t j2) const
 
virtual E_type getE_danglingLeft (const size_t i1, const size_t i2) const
 
virtual E_type getE_danglingRight (const size_t j1, const size_t j2) const
 
virtual E_type getE_endLeft (const size_t i1, const size_t i2) const
 
virtual E_type getE_endRight (const size_t j1, const size_t j2) const
 
virtual E_type getEall1 () const
 
virtual E_type getEall2 () const
 
virtual Z_type getRT () const
 
- Public Member Functions inherited from IntaRNA::InteractionEnergy
 InteractionEnergy (const Accessibility &accS1, const ReverseAccessibility &accS2, const size_t maxInternalLoopSize1, const size_t maxInternalLoopSize2, const E_type energyAdd, const bool energyWithDangle, const bool internalLoopGU)
 
virtual ~InteractionEnergy ()
 
virtual E_type getE (const size_t i1, const size_t j1, const size_t i2, const size_t j2, const E_type hybridE) const
 
virtual E_type getE (const Z_type Z) const
 
virtual EnergyContributions getE_contributions (const Interaction &interaction) const
 
virtual bool areComplementary (const size_t i1, const size_t i2) const
 
virtual bool isGU (const size_t i1, const size_t i2) const
 
virtual size_t size1 () const
 
virtual size_t size2 () const
 
virtual E_type getED1 (const size_t i1, const size_t j1) const
 
virtual E_type getED2 (const size_t i2, const size_t j2) const
 
virtual bool isAccessible1 (const size_t i) const
 
virtual bool isAccessible2 (const size_t i) const
 
virtual E_type getE_multi (const size_t i1, const size_t j1, const size_t i2, const size_t j2, const ES_multi_mode ES_mode) const
 
virtual Z_type getPr_danglingLeft (const size_t i1, const size_t j1, const size_t i2, const size_t j2) const
 
virtual Z_type getPr_danglingRight (const size_t i1, const size_t j1, const size_t i2, const size_t j2) const
 
virtual const Accessibility & getAccessibility1 () const
 
virtual const ReverseAccessibility & getAccessibility2 () const
 
const size_t getMaxInternalLoopSize1 () const
 
const size_t getMaxInternalLoopSize2 () const
 
virtual Z_type getBoltzmannWeight (const E_type energy) const
 
virtual Z_type getBoltzmannWeight (const Z_type energy) const
 
virtual Interaction::BasePair getBasePair (const size_t i1, const size_t i2) const
 
virtual size_t getIndex1 (const Interaction::BasePair &bp) const
 
virtual size_t getIndex2 (const Interaction::BasePair &bp) const
 
virtual E_type getEnergyAdd () const
 
virtual bool isValidInternalLoop (const size_t i1, const size_t j1, const size_t i2, const size_t j2) const
 
bool isInternalLoopGUallowed () const
 

Protected Types

typedef UpperTriangularMatrix< E_type > EsMatrix
 matrix to store ES values (upper triangular matrix)
 

Protected Member Functions

bool isGC (const size_t i1, const size_t i2) const
 
void computeES (const Accessibility &acc, EsMatrix &esToFill)
 
E_type computeIntraEall (const Accessibility &acc) const
 

Protected Attributes

vrna_md_t foldModel
 Vienna RNA package : folding model to be used for the energy computation.
 
vrna_param_t * foldParams
 
Z_type RT
 the RT constant to be used for Boltzmann weight computations
 
const int bpCG
 base pair code for (C,G)
 
const int bpGC
 base pair code for (G,C)
 
EsMatrix * esValues1
 the ES values for seq1 if computed (otherwise NULL)
 
EsMatrix * esValues2
 the ES values for seq2 if computed (otherwise NULL)
 
E_type Eall1
 ensemble energy of intra-molecular structures of seq1
 
E_type Eall2
 ensemble energy of intra-molecular structures of seq2
 
- Protected Attributes inherited from IntaRNA::InteractionEnergy
const Accessibility & accS1
 accessibility values for sequence S1
 
const ReverseAccessibility & accS2
 accessibility values for sequence S2 (reversed index order)
 
const size_t maxInternalLoopSize1
 
const size_t maxInternalLoopSize2
 
const E_type energyAdd
 user defined shift of the energy spectrum
 
const bool energyWithDangles
 whether or not dangling end energy contributions are to be added
 
const bool internalLoopGU
 whether or not GU base pairs allowed in internal loops
 

Additional Inherited Members

- Public Types inherited from IntaRNA::InteractionEnergy
enum  ES_multi_mode { ES_multi_1only , ES_multi_2only , ES_multi_both }
 
- Static Protected Member Functions inherited from IntaRNA::InteractionEnergy
static bool isAllowedLoopRegion (const RnaSequence &seq, const size_t i, const size_t j, const size_t maxInternalLoopSize)
 

Detailed Description

Implements an energy interface based on free energy estimates computed with the Vienna RNA package.

Author
Martin Mann 2014

Member Typedef Documentation

◆ EsMatrix

matrix to store ES values (upper triangular matrix)

Constructor & Destructor Documentation

◆ InteractionEnergyVrna()

IntaRNA::InteractionEnergyVrna::InteractionEnergyVrna ( const Accessibility &  accS1,
const ReverseAccessibility &  accS2,
VrnaHandler &  vrnaHandler,
const size_t  maxInternalLoopSize1 = 16,
const size_t  maxInternalLoopSize2 = 16,
const bool  initES = false,
const E_type  energyAdd = Ekcal_2_E(0.0),
const bool  energyWithDangles = true,
const bool  internalLoopGU = true 
)

Construct energy utility object given the accessibility ED values for two sequences.

Parameters
accS1accessibility of the first sequence
accS2accessibility of the second sequence
vrnaHandlerthe VRNA parameter handler to be used
maxInternalLoopSize1maximal number of enclosed unpaired positions between two intermolecular base pairs in sequence 1, ie it holds for an intermolecular loop closed by base pairs (i1,i2) and (j1,j2) : (j1-i1+1) <= maxInternalLoopSize
maxInternalLoopSize2maximal number of enclosed unpaired positions between two intermolecular base pairs in sequence 2, ie it holds for an intermolecular loop closed by base pairs (i1,i2) and (j1,j2) : (j2-i2+1) <= maxInternalLoopSize
initESwhether or not ES values are to be computed
energyAddwhen computing the overall energy via getE(), this term is always added; thus it defines a shift of the energy spectrum as e.g. needed when computing predictions with accessibility constraints
energyWithDangleswhether or not dangling end contributions are considered within overall energies
internalLoopGUwhether or not GU base pairs are allowed within internal loops

◆ ~InteractionEnergyVrna()

virtual IntaRNA::InteractionEnergyVrna::~InteractionEnergyVrna ( )
virtual

Member Function Documentation

◆ computeES()

void IntaRNA::InteractionEnergyVrna::computeES ( const Accessibility &  acc,
EsMatrix &  esToFill 
)
protected

Computes the ES values and fills esValues container

Parameters
accthe accessibility object for the sequence to compute the ES values for
esToFillthe container to write the ES values to

◆ computeIntraEall()

E_type IntaRNA::InteractionEnergyVrna::computeIntraEall ( const Accessibility &  acc) const
protected

Computes the ensemble energy of all intra-molecular structures that are conform to the accessibility constraints

Parameters
accthe Accessibility object to access sequence and constraints
Returns
the computed ensemble energy

◆ getE_danglingLeft()

E_type IntaRNA::InteractionEnergyVrna::getE_danglingLeft ( const size_t  i1,
const size_t  i2 
) const
inlinevirtual

Computes the dangling end energy penalties for the left side (i1-1 and i2-1) of the interaction closed by the intermolecular base pair (i1,i2).

Parameters
i1the index of the first sequence interacting with i2
i2the index of the second sequence interacting with i1
Returns
the dangling end penalty for the left side of the interaction

Implements IntaRNA::InteractionEnergy.

◆ getE_danglingRight()

E_type IntaRNA::InteractionEnergyVrna::getE_danglingRight ( const size_t  j1,
const size_t  j2 
) const
inlinevirtual

Computes the dangling end energy penalties for the right side (j1+1 and j2+1) of the interaction closed by the intermolecular base pair (j1,j2).

Parameters
j1the index of the first sequence interacting with j2
j2the index of the second sequence interacting with j1
Returns
the dangling end penalty for the right side of the interaction

Implements IntaRNA::InteractionEnergy.

◆ getE_endLeft()

E_type IntaRNA::InteractionEnergyVrna::getE_endLeft ( const size_t  i1,
const size_t  i2 
) const
inlinevirtual

Provides the penalty for closing an interaction with the given base pair on the "left side" (i1 = 5' end of seq1 of the interaction)

Parameters
i1the index of the first sequence interacting with i2
i2the index of the second sequence interacting with i1
Returns
the loop closure penalty for the left side of the interaction

Implements IntaRNA::InteractionEnergy.

◆ getE_endRight()

E_type IntaRNA::InteractionEnergyVrna::getE_endRight ( const size_t  j1,
const size_t  j2 
) const
inlinevirtual

Provides the penalty for closing an interaction with the given base pair on the "right side" (j1 = 3' end of seq1 of the interaction)

Parameters
j1the index of the first sequence interacting with j2
j2the index of the second sequence interacting with j1
Returns
the loop closure penalty for the right side of the interaction

Implements IntaRNA::InteractionEnergy.

◆ getE_init()

E_type IntaRNA::InteractionEnergyVrna::getE_init ( ) const
inlinevirtual

Provides the duplex initiation energy.

Returns
the energy for duplex initiation

Implements IntaRNA::InteractionEnergy.

◆ getE_interLeft()

E_type IntaRNA::InteractionEnergyVrna::getE_interLeft ( const size_t  i1,
const size_t  j1,
const size_t  i2,
const size_t  j2 
) const
inlinevirtual

Computes the energy estimate for the interaction loop region closed by the intermolecular base pairs (i1,i2) and (j1,j2) where the regions [i1,j1] and [i2,j2] are considered unpaired. The energy estimate is derived via the Vienna RNA package loop energies or is E_INF if the internal loop size exceeds the allowed maximum (see constructor).

Parameters
i1the index of the first sequence (<j1) interacting with i2
j1the index of the first sequence (>i1) interacting with j2
i2the index of the second sequence (<j2) interacting with i1
j2the index of the second sequence (>i2) interacting with j1
Returns
energy in kcal/mol for the loop closed by (i1,i2) or E_INF if the allowed loop size is exceeded or no valid internal loop boundaries

Implements IntaRNA::InteractionEnergy.

◆ getE_multiClosing()

E_type IntaRNA::InteractionEnergyVrna::getE_multiClosing ( ) const
inlinevirtual

Provides the energy contribution/penalty for closing an intermolecular multiloop on the left of a multi-site gap.

Returns
the energy contribution/penalty of the intermolecular helix within an intramolecular multiloop

Implements IntaRNA::InteractionEnergy.

◆ getE_multiHelix()

E_type IntaRNA::InteractionEnergyVrna::getE_multiHelix ( const size_t  j1,
const size_t  j2 
) const
inlinevirtual

Provides the energy contribution/penalty of the helix repesented by the interaction right of a multi-site gap starting with base pair (j1,j2)

Parameters
j1the end of the gap in seq1, ie the first base paired in the interaction site to the right of the gap
j2the end of the gap in seq2, ie the first base paired in the interaction site to the right of the gap
Returns
the energy contribution/penalty of the intermolecular helix within an intramolecular multiloop

Implements IntaRNA::InteractionEnergy.

◆ getE_multiUnpaired()

E_type IntaRNA::InteractionEnergyVrna::getE_multiUnpaired ( const size_t  numUnpaired) const
inlinevirtual

Provides the energy contribution for a given number of unpaired nucleotides under the assumption that the region is part of an (intermolecular) multiloop.

Parameters
numUnpairedthe number of unpaired bases
Returns
the energy contribution of the given number of unpaired bases within an intramolecular multiloop

Implements IntaRNA::InteractionEnergy.

◆ getEall1()

E_type IntaRNA::InteractionEnergyVrna::getEall1 ( ) const
inlinevirtual

Provides the overall ensemble energy for sequence 1 given its accessibility constraints

Returns
Eall(constraint-conform intra-molecular structures for seq1)

Implements IntaRNA::InteractionEnergy.

◆ getEall2()

E_type IntaRNA::InteractionEnergyVrna::getEall2 ( ) const
inlinevirtual

Provides the overall ensemble energy for sequence 2 given its accessibility constraints

Returns
Eall(constraint-conform intra-molecular structures for seq2)

Implements IntaRNA::InteractionEnergy.

◆ getES1()

E_type IntaRNA::InteractionEnergyVrna::getES1 ( const size_t  i1,
const size_t  j1 
) const
inlinevirtual

Provides the ensemble energy (ES) of all intramolecular substructures that can be formed within a given region of sequence 1 under the assumption that the region is part of an (intermolecular) multiloop, i.e. at least one base pair is formed by each substructure.

If no structure can be formed within the region, E_INF is returned.

Parameters
i1the start of the structured region of seq1
j1the end of the structured region of seq1
Returns
the ES value for [i1,j1] or E_INF if no intramolecular structure can be formed

Implements IntaRNA::InteractionEnergy.

◆ getES2()

E_type IntaRNA::InteractionEnergyVrna::getES2 ( const size_t  i2,
const size_t  j2 
) const
inlinevirtual

Provides the ensemble energy (ES) of all intramolecular substructures that can be formed within a given region of sequence 2 under the assumption that the region is part of an (intermolecular) multiloop, i.e. at least one base pair is formed by each substructure.

If no structure can be formed within the region, E_INF is returned.

Parameters
i2the start of the structured region of seq2
j2the end of the structured region of seq2
Returns
the ES value for [i2,j2] or E_INF if no intramolecular structure can be formed

Implements IntaRNA::InteractionEnergy.

◆ getRT()

Z_type IntaRNA::InteractionEnergyVrna::getRT ( ) const
inlinevirtual

Provides the overall partition function for sequence 2 given its accessibility constraints

Returns
Z(constraint-conform intra-molecular structures for seq2)

Implements IntaRNA::InteractionEnergy.

◆ isGC()

bool IntaRNA::InteractionEnergyVrna::isGC ( const size_t  i1,
const size_t  i2 
) const
inlineprotected

Checks whether or not a given base pair is a GC base pair

Parameters
i1the index in the first sequence
i2the index in the second sequence
Returns
true if (seq1(i1),seq2(i2)) is (G,C) or (C,G)

Member Data Documentation

◆ bpCG

const int IntaRNA::InteractionEnergyVrna::bpCG
protected

base pair code for (C,G)

◆ bpGC

const int IntaRNA::InteractionEnergyVrna::bpGC
protected

base pair code for (G,C)

◆ Eall1

E_type IntaRNA::InteractionEnergyVrna::Eall1
mutableprotected

ensemble energy of intra-molecular structures of seq1

◆ Eall2

E_type IntaRNA::InteractionEnergyVrna::Eall2
mutableprotected

ensemble energy of intra-molecular structures of seq2

◆ esValues1

EsMatrix* IntaRNA::InteractionEnergyVrna::esValues1
protected

the ES values for seq1 if computed (otherwise NULL)

◆ esValues2

EsMatrix* IntaRNA::InteractionEnergyVrna::esValues2
protected

the ES values for seq2 if computed (otherwise NULL)

◆ foldModel

vrna_md_t IntaRNA::InteractionEnergyVrna::foldModel
protected

Vienna RNA package : folding model to be used for the energy computation.

◆ foldParams

vrna_param_t* IntaRNA::InteractionEnergyVrna::foldParams
protected

Vienna RNA package : folding parameters to be used for the energy computation

◆ RT

Z_type IntaRNA::InteractionEnergyVrna::RT
protected

the RT constant to be used for Boltzmann weight computations


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