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

#include <PredictorMfeEns.h>

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

Classes

struct  ZPartition
 data container to encode a site with respective partition function More...
 

Public Member Functions

 PredictorMfeEns (const InteractionEnergy &energy, OutputHandler &output, PredictionTracker *predTracker)
 
virtual ~PredictorMfeEns ()
 
- Public Member Functions inherited from IntaRNA::PredictorMfe
 PredictorMfe (const InteractionEnergy &energy, OutputHandler &output, PredictionTracker *predTracker)
 
virtual ~PredictorMfe ()
 
- Public Member Functions inherited from IntaRNA::Predictor
 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
 

Protected Member Functions

virtual void initZ ()
 
virtual void updateZ (const size_t i1, const size_t j1, const size_t i2, const size_t j2, const Z_type partFunct, const bool isHybridZ)
 
void updateCompleteZ (const size_t i1, const size_t j1, const size_t i2, const size_t j2, const Z_type partFunct, const bool isHybridZ)
 
virtual void reportOptima ()
 
virtual void traceBack (Interaction &interaction)
 
- Protected Member Functions inherited from IntaRNA::PredictorMfe
virtual void initOptima ()
 
bool isValidOutputSite (const size_t i1, const size_t j1, const size_t i2, const size_t j2) const
 
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)
 
virtual void getNextBest (Interaction &curBest)
 
virtual void updateMfe4leftEnd (const size_t i1, const size_t j1, const size_t i2, const size_t j2, const Interaction &curInteraction)
 
- Protected Member Functions inherited from IntaRNA::Predictor
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)
 
void incrementZall (const Z_type partZ)
 

Protected Attributes

std::unordered_map< Interaction::Boundary, Z_type, Interaction::Boundary::Hash > Z_partition
 map storing the partition of Zall for all considered interaction sites
 
bool updateZisComplete
 whether updateZ() currently receives one complete boundary partition
 
InteractionEnergyIdxOffset energy
 access to the interaction energy handler of the super class
 
OutputHandler & output
 access to the output handler of the super class
 
PredictionTracker * predTracker
 access to the prediction tracker of the super class
 
- Protected Attributes inherited from IntaRNA::PredictorMfe
InteractionList mfeInteractions
 mfe interaction boundaries
 
HashIdx2E mfe4leftEnd
 
std::pair< IndexRangeList, IndexRangeList > reportedInteractions
 
InteractionEnergyIdxOffset energy
 access to the interaction energy handler of the super class
 
OutputHandler & output
 access to the output handler of the super class
 
PredictionTracker * predTracker
 access to the prediction tracker of the super class
 
- Protected Attributes inherited from IntaRNA::Predictor
InteractionEnergyIdxOffset energy
 energy computation handler
 
OutputHandler & output
 interaction output handler
 
PredictionTracker * predTracker
 prediction tracker to be used
 
Z_type Zall
 

Additional Inherited Members

- Static Public Member Functions inherited from IntaRNA::Predictor
static size_t getMaxInteractionWidth (const size_t w, const size_t maxLoopSize)
 
- Protected Types inherited from IntaRNA::PredictorMfe
typedef BestInteraction< E_type > BestInteractionE
 BestInteraction that stores an energy value.
 
typedef BestInteraction< Z_type > BestInteractionZ
 BestInteraction that stores a partition function value.
 
typedef std::list< Interaction > InteractionList
 list of interactions
 
typedef boost::unordered_map< Interaction::BasePair, BestInteractionE, Interaction::BasePair::Hash > HashIdx2E
 hash to map index pairs to BestInteractionE entries
 

Detailed Description

Generic Predictor interface for ensemble-based MFE interaction computation

Author
Martin Raden

Constructor & Destructor Documentation

◆ PredictorMfeEns()

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

Construction call the super constructor

Parameters
energythe interaction energy handler
outputthe output handler to report optimal interactions to
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.

◆ ~PredictorMfeEns()

virtual IntaRNA::PredictorMfeEns::~PredictorMfeEns ( )
virtual

Member Function Documentation

◆ initZ()

virtual void IntaRNA::PredictorMfeEns::initZ ( )
protectedvirtual

Initializes the hybridization partition functions. Will be called by predict().

◆ reportOptima()

virtual void IntaRNA::PredictorMfeEns::reportOptima ( )
protectedvirtual

Calls for the stored Z_partition information updateOptima() before calling reportOptima() from its super class.

Reimplemented from IntaRNA::PredictorMfe.

◆ traceBack()

virtual void IntaRNA::PredictorMfeEns::traceBack ( Interaction &  interaction)
protectedvirtual

Reports interaction boundaries only (no base pair tracking)

Parameters
interactionthe interaction to be traced

Implements IntaRNA::PredictorMfe.

Reimplemented in IntaRNA::PredictorMfeEns2dSeedExtension, and IntaRNA::PredictorMfeEnsSeedOnly.

◆ updateCompleteZ()

void IntaRNA::PredictorMfeEns::updateCompleteZ ( const size_t  i1,
const size_t  j1,
const size_t  i2,
const size_t  j2,
const Z_type  partFunct,
const bool  isHybridZ 
)
protected

Consumes a complete partition for one interaction boundary. Exact 2D prediction finalizes each boundary once and therefore does not need to retain it until reportOptima(). The virtual updateZ() hook is called so subclasses can observe or alter the update; overrides that delegate to the base implementation inherit streaming. Tracker-enabled predictions retain the partition so their established callback timing and ordering stay intact.

◆ updateZ()

virtual void IntaRNA::PredictorMfeEns::updateZ ( const size_t  i1,
const size_t  j1,
const size_t  i2,
const size_t  j2,
const Z_type  partFunct,
const bool  isHybridZ 
)
protectedvirtual

Updates the local hybridization partition functions as well as Zall.

Note: avoid other Zall updates via updateOptima(.., incrementZall=false)!

Note: if called multiple time for the same boundaries then the reported partition functions have to represent disjoint interaction sets!

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
partFunctthe partition function of the interaction
isHybridZwhether or not the given Z is only covering hybridization energy terms (init+loops) or the total interaction energy

Member Data Documentation

◆ energy

InteractionEnergyIdxOffset IntaRNA::Predictor::energy
protected

access to the interaction energy handler of the super class

◆ output

OutputHandler& IntaRNA::Predictor::output
protected

access to the output handler of the super class

◆ predTracker

PredictionTracker* IntaRNA::Predictor::predTracker
protected

access to the prediction tracker of the super class

◆ updateZisComplete

bool IntaRNA::PredictorMfeEns::updateZisComplete
protected

whether updateZ() currently receives one complete boundary partition

◆ Z_partition

std::unordered_map<Interaction::Boundary, Z_type, Interaction::Boundary::Hash> IntaRNA::PredictorMfeEns::Z_partition
protected

map storing the partition of Zall for all considered interaction sites


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