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

#include <PredictionTrackerProfileSpotProb.h>

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

Public Member Functions

 PredictionTrackerProfileSpotProb (const InteractionEnergy &energy, const std::string &seq1streamName, const std::string &seq2streamName, const std::string &NA_string="NA", const std::string &sep=";")
 
 PredictionTrackerProfileSpotProb (const InteractionEnergy &energy, std::ostream *seq1stream, std::ostream *seq2stream, const std::string &NA_string="NA", const std::string &sep=";")
 
virtual ~PredictionTrackerProfileSpotProb ()
 
virtual void updateOptimumCalled (const size_t i1, const size_t j1, const size_t i2, const size_t j2, const E_type energy)
 
- Public Member Functions inherited from IntaRNA::PredictionTracker
 PredictionTracker ()
 
virtual ~PredictionTracker ()
 

Protected Types

typedef std::vector< Z_type > ZProfile
 container definition for partition function profile data
 

Static Protected Member Functions

static void updateProfile (ZProfile &profile, const size_t i, const size_t j, const Z_type boltzmannWeight)
 
template<typename ZProfileIterator >
static void writeProfile (std::ostream &out, const ZProfileIterator &begin, const ZProfileIterator &end, const Z_type overallZ, const RnaSequence &rna, const std::string &NA_string, const std::string &sep)
 

Protected Attributes

const InteractionEnergy & energy
 energy handler used for predictions
 
const bool deleteStreamsOnDestruction
 whether or not the streams are to be deleted on destruction
 
std::ostream * seq1stream
 if non-NULL, the stream to write the spotProb-profile for seq1 to
 
std::ostream * seq2stream
 if non-NULL, the stream to write the spotProb-profile for seq2 to
 
const std::string NA_string
 the output string representation if a value is not available for profile output
 
const std::string sep
 the output string representation of a column separator
 
ZProfile seq1Z
 the position-wise partition function values for seq1
 
ZProfile seq2Z
 the position-wise partition function values for seq2
 
Z_type overallZ
 the overall partition function to be used for normalization
 

Detailed Description

Collects for each sequence position the partition function of any interaction enclosing this position.

The profile(s) of this information (normalized by the overall partitions function; ie the spot interaction probability) is written to stream on destruction.

Member Typedef Documentation

◆ ZProfile

container definition for partition function profile data

Constructor & Destructor Documentation

◆ PredictionTrackerProfileSpotProb() [1/2]

IntaRNA::PredictionTrackerProfileSpotProb::PredictionTrackerProfileSpotProb ( const InteractionEnergy &  energy,
const std::string &  seq1streamName,
const std::string &  seq2streamName,
const std::string &  NA_string = "NA",
const std::string &  sep = ";" 
)

Constructs a PredictionTracker that collects for each positions of a sequence the partition function and thus spot probability of any interaction enclosing this position.

Parameters
energythe energy function used for energy calculation
seq1streamNamethe stream name where the profile data for seq1 is to be written to. use STDOUT/STDERR for the respective stream. Otherwise, an according file is created; if empty, no data for seq1 is collected
seq2streamNamethe stream name where the profile data for seq2 is to be written to. use STDOUT/STDERR for the respective stream. Otherwise, an according file is created; if empty, no data for seq2 is collected
NA_stringthe output string representation if a value is not available for profile output
septhe column separator to be used in profile output

◆ PredictionTrackerProfileSpotProb() [2/2]

IntaRNA::PredictionTrackerProfileSpotProb::PredictionTrackerProfileSpotProb ( const InteractionEnergy &  energy,
std::ostream *  seq1stream,
std::ostream *  seq2stream,
const std::string &  NA_string = "NA",
const std::string &  sep = ";" 
)

Constructs an PredictionTracker that collected for each positions of a sequence the partition function and thus spot probability of any interaction covering this position.

Parameters
energythe energy function used
seq1streamif non-NULL, the stream where the profile data for seq1 is to be written to; if NULL, no data for seq1 is collected
seq2streamif non-NULL, the stream where the profile data for seq2 is to be written to; if NULL, no data for seq2 is collected
NA_stringthe output string representation if a value is not available for profile output
septhe column separator to be used in profile output

◆ ~PredictionTrackerProfileSpotProb()

virtual IntaRNA::PredictionTrackerProfileSpotProb::~PredictionTrackerProfileSpotProb ( )
virtual

destruction: write the profile(s) to the according streams.

Member Function Documentation

◆ updateOptimumCalled()

virtual void IntaRNA::PredictionTrackerProfileSpotProb::updateOptimumCalled ( const size_t  i1,
const size_t  j1,
const size_t  i2,
const size_t  j2,
const E_type  energy 
)
virtual

Updates the profile information for each Predictor.updateOptima() call.

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 overall energy of the interaction site

Implements IntaRNA::PredictionTracker.

◆ updateProfile()

static void IntaRNA::PredictionTrackerProfileSpotProb::updateProfile ( ZProfile &  profile,
const size_t  i,
const size_t  j,
const Z_type  boltzmannWeight 
)
staticprotected

Updates a given partition function profile if not empty.

Parameters
profilethe partition function profile to update
ithe first index to update (inclusive)
jthe last index to update (inclusive)
boltzmannWeightthe Boltzmann weight to be used for the update

◆ writeProfile()

template<typename ZProfileIterator >
void IntaRNA::PredictionTrackerProfileSpotProb::writeProfile ( std::ostream &  out,
const ZProfileIterator &  begin,
const ZProfileIterator &  end,
const Z_type  overallZ,
const RnaSequence &  rna,
const std::string &  NA_string,
const std::string &  sep 
)
inlinestaticprotected

Writes profile data to stream.

Parameters
outthe output stream to write to
beginthe begin iterator of the partition function data to write
endthe end iterator (exclusive) of the Z data to write
overallZthe overall partition function to be used for normalization
rnathe RNA the data is about
NA_stringthe string to be used for missing entries
septhe column separator to be used in profile output

Member Data Documentation

◆ deleteStreamsOnDestruction

const bool IntaRNA::PredictionTrackerProfileSpotProb::deleteStreamsOnDestruction
protected

whether or not the streams are to be deleted on destruction

◆ energy

const InteractionEnergy& IntaRNA::PredictionTrackerProfileSpotProb::energy
protected

energy handler used for predictions

◆ NA_string

const std::string IntaRNA::PredictionTrackerProfileSpotProb::NA_string
protected

the output string representation if a value is not available for profile output

◆ overallZ

Z_type IntaRNA::PredictionTrackerProfileSpotProb::overallZ
protected

the overall partition function to be used for normalization

◆ sep

const std::string IntaRNA::PredictionTrackerProfileSpotProb::sep
protected

the output string representation of a column separator

◆ seq1stream

std::ostream* IntaRNA::PredictionTrackerProfileSpotProb::seq1stream
protected

if non-NULL, the stream to write the spotProb-profile for seq1 to

◆ seq1Z

ZProfile IntaRNA::PredictionTrackerProfileSpotProb::seq1Z
protected

the position-wise partition function values for seq1

◆ seq2stream

std::ostream* IntaRNA::PredictionTrackerProfileSpotProb::seq2stream
protected

if non-NULL, the stream to write the spotProb-profile for seq2 to

◆ seq2Z

ZProfile IntaRNA::PredictionTrackerProfileSpotProb::seq2Z
protected

the position-wise partition function values for seq2


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