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

#include <Predictor.h>

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

Public Member Functions

 Predictor (const InteractionEnergy &energy, OutputHandler &output, PredictionTracker *predTracker)
 
virtual ~Predictor ()
 
virtual void predict (const IndexRange &r1=IndexRange(0, RnaSequence::lastPos), const IndexRange &r2=IndexRange(0, RnaSequence::lastPos))=0
 
Z_type getZall () const
 

Static Public Member Functions

static size_t getMaxInteractionWidth (const size_t w, const size_t maxLoopSize)
 

Protected Member Functions

virtual void initOptima ()=0
 
virtual void updateOptima (const size_t i1, const size_t j1, const size_t i2, const size_t j2, const E_type energy, const bool isHybridE, const bool incrementZall)=0
 
virtual void updateZall (const size_t i1, const size_t j1, const size_t i2, const size_t j2, const E_type energy, const bool isHybridE)
 
virtual void reportOptima ()=0
 
void incrementZall (const Z_type partZ)
 

Protected Attributes

InteractionEnergyIdxOffset energy
 energy computation handler
 
OutputHandler & output
 interaction output handler
 
PredictionTracker * predTracker
 prediction tracker to be used
 
Z_type Zall
 

Detailed Description

RNA-RNA interaction prediction handler interface.

Author
Martin Mann 2014

Constructor & Destructor Documentation

◆ Predictor()

IntaRNA::Predictor::Predictor ( const InteractionEnergy &  energy,
OutputHandler &  output,
PredictionTracker *  predTracker 
)
inline

Constructs an RNA-RNA interaction prediction handler and sets the central data members.

Parameters
energythe handler for interaction energy computation
outputthe output handler for identified interactions
predTrackerthe prediction tracker to be used or NULL if no tracking is to be done; if non-NULL, the tracker gets deleted on this->destruction.

◆ ~Predictor()

IntaRNA::Predictor::~Predictor ( )
inlinevirtual

destruction

Member Function Documentation

◆ getMaxInteractionWidth()

size_t IntaRNA::Predictor::getMaxInteractionWidth ( const size_t  w,
const size_t  maxLoopSize 
)
inlinestatic

Computes the maximal width of an interaction for a given site width and maximal size of interaction loops.

Parameters
wthe width to compute the maximal interacting width for
maxLoopSizethe maximal size of loops within interactions
Returns
1 + (w-1)*(maxLoopSize+1): if w>0; 0 otherwise

◆ getZall()

Z_type IntaRNA::Predictor::getZall ( ) const
inline

Access to the current overall partition function covering all interactions of the last predict() call.

Returns
the overall hybridization partition function

◆ incrementZall()

void IntaRNA::Predictor::incrementZall ( const Z_type  partZ)
inlineprotected

Increments the overall partition function Zall with the given value

Parameters
partZthe increment for Zall

◆ initOptima()

virtual void IntaRNA::Predictor::initOptima ( )
protectedpure virtual

Initializes the list of best solutions to be filled by updateOptima()

Implemented in IntaRNA::PredictorMfe, and IntaRNA::PredictorEvalOnly.

◆ predict()

virtual void IntaRNA::Predictor::predict ( const IndexRange &  r1 = IndexRange(0, RnaSequence::lastPos),
const IndexRange &  r2 = IndexRange(0, RnaSequence::lastPos) 
)
pure virtual

◆ reportOptima()

virtual void IntaRNA::Predictor::reportOptima ( )
protectedpure virtual

Pushes the optimal and suboptimal solutions to the output handler.

Implemented in IntaRNA::PredictorMfe, IntaRNA::PredictorMfeEns, and IntaRNA::PredictorEvalOnly.

◆ updateOptima()

virtual void IntaRNA::Predictor::updateOptima ( const size_t  i1,
const size_t  j1,
const size_t  i2,
const size_t  j2,
const E_type  energy,
const bool  isHybridE,
const bool  incrementZall 
)
protectedpure virtual

Updates the global the list of best solutions found so far

Parameters
i1the index of the first sequence interacting with i2
j1the index of the first sequence interacting with j2
i2the index of the second sequence interacting with i1
j2the index of the second sequence interacting with j1
energythe energy of the interaction site
isHybridEwhether or not the given energy is only the hybridization energy (init+loops) or the total interaction energy
incrementZallwhether or not Zall is to be incremented (if needed)

Implemented in IntaRNA::PredictorMfe, and IntaRNA::PredictorEvalOnly.

◆ updateZall()

void IntaRNA::Predictor::updateZall ( const size_t  i1,
const size_t  j1,
const size_t  i2,
const size_t  j2,
const E_type  energy,
const bool  isHybridE 
)
inlineprotectedvirtual

Updates the global Zall partition function.

Note: should not be called for interactions for which updateOptima(..,incrementZall=true) is called. Otherwise, these interactions are considered multiple times.

Parameters
i1the index of the first sequence interacting with i2
j1the index of the first sequence interacting with j2
i2the index of the second sequence interacting with i1
j2the index of the second sequence interacting with j1
energythe energy of the interaction site
isHybridEwhether or not the given energy is only the hybridization energy (init+loops) or the total interaction energy
incrementZallwhether or not Zall is to be incremented (if needed)

Member Data Documentation

◆ energy

InteractionEnergyIdxOffset IntaRNA::Predictor::energy
protected

energy computation handler

◆ output

OutputHandler& IntaRNA::Predictor::output
protected

interaction output handler

◆ predTracker

PredictionTracker* IntaRNA::Predictor::predTracker
protected

prediction tracker to be used

◆ Zall

Z_type IntaRNA::Predictor::Zall
protected

the overall partition function since initZ() was last called. its value is updated by updateZ()


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