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

#include <OutputHandlerCsv.h>

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

Public Types

enum  ColType {
  id1 = 0 , id2 , seq1 , seq2 ,
  subseq1 , subseq2 , subseqDP , subseqDB ,
  start1 , end1 , start2 , end2 ,
  hybridDP , hybridDB , hybridDPfull , hybridDBfull ,
  bpList , E , Etotal , ED1 ,
  ED2 , Pu1 , Pu2 , E_init ,
  E_loops , E_dangleL , E_dangleR , E_endL ,
  E_endR , E_hybrid , E_norm , E_hybridNorm ,
  E_add , seedStart1 , seedEnd1 , seedStart2 ,
  seedEnd2 , seedE , seedED1 , seedED2 ,
  seedPu1 , seedPu2 , w , Eall ,
  Eall1 , Eall2 , Zall , Zall1 ,
  Zall2 , EallTotal , P_E , RT ,
  ColTypeNumber
}
 the column types supported More...
 
typedef std::list< ColType > ColTypeList
 list of ColTypes
 

Public Member Functions

 OutputHandlerCsv (const OutputConstraint &outConstraint, std::ostream &out, const InteractionEnergy &energy, const ColTypeList columns, const std::string &colSep=";", const bool printHeader=false, const std::string &listSep=":")
 
virtual ~OutputHandlerCsv ()
 
virtual void add (const Interaction &interaction)
 
- Public Member Functions inherited from IntaRNA::OutputHandler
 OutputHandler (const OutputConstraint &outConstraint)
 
virtual ~OutputHandler ()
 
virtual size_t reported () const
 
virtual void incrementZ (const Z_type subZ)
 
virtual Z_type getZ () const
 
const OutputConstraint & getOutputConstraint () const
 

Static Public Member Functions

static const std::map< ColType, std::string > & getColType2string ()
 
static std::string list2string (const ColTypeList &colTypes, const std::string &sep)
 
static ColTypeList string2list (const std::string &listString)
 
static bool needsZall (const ColTypeList &colTypes)
 
static bool needBPs (const ColTypeList &colTypes)
 
static std::string getHeader (const ColTypeList &colTypes, const std::string &colSep)
 
- Static Public Member Functions inherited from IntaRNA::OutputHandler
static std::string reverse (const std::string &str)
 

Static Public Attributes

static const std::string notAvailable
 string to encode not available values
 
static const ColTypeList colTypeNumericSort
 list of ColTypes that have to be sorted numerically
 

Static Protected Member Functions

static void initColType2string ()
 

Protected Attributes

std::ostream & out
 the output stream to write to
 
const InteractionEnergy & energy
 the interaction energy function used for interaction computation
 
const std::list< ColType > columns
 the sequence of columns to be reported
 
std::string colSep
 the column separator to be used
 
std::string listSep
 the list separator to be used within single columns
 
Z_type Z
 overall partition function (if set)
 
- Protected Attributes inherited from IntaRNA::OutputHandler
const OutputConstraint outConstraint
 the output constraints to be applied
 
size_t reportedInteractions
 number of reported interactions
 
Z_type Z
 overall partition function for the sequences provided in Z_energy
 

Static Protected Attributes

static std::map< ColType, std::string > colType2string
 mapping of ColTypes to according strings
 

Detailed Description

OutputHandler that stores interactions in CSV stream output.

Member Typedef Documentation

◆ ColTypeList

list of ColTypes

Member Enumeration Documentation

◆ ColType

the column types supported

Enumerator
id1 

id of first sequence

id2 

id of second sequence

seq1 

full first sequence

seq2 

full second sequence

subseq1 

interacting subsequence of first sequence

subseq2 

interacting subsequence of second sequence

subseqDP 

hybrid subsequences compatible with hybridDP

subseqDB 

hybrid subsequences compatible with hybridDB

start1 

start index of hybrid in seq1

end1 

end index of hybrid in seq1

start2 

start index of hybrid in seq2

end2 

end index of hybrid in seq2

hybridDP 

hybrid in VRNA dot-bracket notation

hybridDB 

hybrid in dot-bar notation

hybridDPfull 

hybrid in VRNA dot-bracket notation for full sequence lengths

hybridDBfull 

hybrid in dot-bar notation for full sequence lengths

bpList 

list of hybrid base pairs like (1,3),(4,2),...

E 

overall interaction energy

Etotal 

overall energy of the interaction including the intra-molecular ensemble energies (E+Eall1+Eall2)

ED1 

ED value of seq1.

ED2 

ED value of seq2.

Pu1 

probability to be accessible for seq1

Pu2 

probability to be accessible for seq2

E_init 

initiation energy

E_loops 

sum of loop energies (excluding E_init)

E_dangleL 

dangling end contribution of base pair (start1,end2)

E_dangleR 

dangling end contribution of base pair (end1,start2)

E_endL 

penalty of closing base pair (start1,end2)

E_endR 

penalty of closing base pair (end1,start2)

E_hybrid 

energy of hybridization only = E - ED1 - ED2

E_norm 

length normalized energy = E/ln(length(seq1)*length(seq2))

E_hybridNorm 

length normalized energy of hybridization only = E_hybrid / ln(length(seq1)*length(seq2))

E_add 

user provided energy shift

seedStart1 

start index of the seed in seq1

seedEnd1 

end index of the seed in seq1

seedStart2 

start index of the seed in seq2

seedEnd2 

end index of the seed in seq2

seedE 

overall energy of the seed only (including accessibility etc)

seedED1 

ED value of seq1 of the seed only (excluding rest)

seedED2 

ED value of seq2 of the seed only (excluding rest)

seedPu1 

probability of seed region to be accessible for seq1

seedPu2 

probability of seed region to be accessible for seq2

w 

Boltzmann weight of the interaction energy.

Eall 

ensemble energy of all interactions (outConstraint.needZall)

Eall1 

ensemble energy of all intra-molecular structures of seq1

Eall2 

ensemble energy of all intra-molecular structures of seq2

Zall 

partition function of all interactions (outConstraint.needZall)

Zall1 

partition function of all intra-molecular structures of seq1

Zall2 

partition function of all intra-molecular structures of seq2

EallTotal 

total ensemble energy (Eall+Eall1+Eall2) of all interactions including the intra-molecular ensemble energies (outConstraint.needZall)

P_E 

probability of mfe within interaction ensemble (outConstraint.needZall)

RT 

the scaled temperature used for Boltzmann weight computation

ColTypeNumber 

number of column types

Constructor & Destructor Documentation

◆ OutputHandlerCsv()

IntaRNA::OutputHandlerCsv::OutputHandlerCsv ( const OutputConstraint &  outConstraint,
std::ostream &  out,
const InteractionEnergy &  energy,
const ColTypeList  columns,
const std::string &  colSep = ";",
const bool  printHeader = false,
const std::string &  listSep = ":" 
)

Construct a CSV table output handler for interaction reporting.

Parameters
outConstraintthe output constraint applied to find the reported interaction
outthe stream to write to
energythe interaction energy object used for computation
columnsthe order and list of columns to be printed
colSepthe column separator to be used in CSV output
printHeaderwhether or not to print header information = col names
listSepif multiple entries have to be printed per column, this separator is used between values

◆ ~OutputHandlerCsv()

virtual IntaRNA::OutputHandlerCsv::~OutputHandlerCsv ( )
virtual

destruction

Member Function Documentation

◆ add()

virtual void IntaRNA::OutputHandlerCsv::add ( const Interaction &  interaction)
virtual

Write a given RNA-RNA interaction in simple text format to the output stream.

Parameters
interactionthe interaction to output

Implements IntaRNA::OutputHandler.

◆ getColType2string()

const std::map< OutputHandlerCsv::ColType, std::string > & IntaRNA::OutputHandlerCsv::getColType2string ( )
inlinestatic

Access to the mapping of ColTypes to according strings

◆ getHeader()

std::string IntaRNA::OutputHandlerCsv::getHeader ( const ColTypeList &  colTypes,
const std::string &  colSep 
)
inlinestatic

Generates the header line for a given list of columns

Parameters
colTypesthe list of column types to consider
colSepthe column separator to be used
Returns
the header line of the CSV output

◆ initColType2string()

static void IntaRNA::OutputHandlerCsv::initColType2string ( )
inlinestaticprotected

initializes the mapping of ColType elements to respective strings

◆ list2string()

std::string IntaRNA::OutputHandlerCsv::list2string ( const ColTypeList &  colTypes,
const std::string &  sep 
)
inlinestatic

Converts a list of Coltypes to their string representation.

Parameters
colTypesthe list to convert
septhe separator to use
Returns
the string representation of the list

◆ needBPs()

bool IntaRNA::OutputHandlerCsv::needBPs ( const ColTypeList &  colTypes)
inlinestatic

Checks whether or not interaction base pairs are needed to generate all colTypes

Parameters
colTypesthe list of column types to consider
Returns
true if one of the colTypes requires Zall computation; false otherwise.

◆ needsZall()

bool IntaRNA::OutputHandlerCsv::needsZall ( const ColTypeList &  colTypes)
inlinestatic

Checks whether or not Zall needs to be computed to generate all colTypes

Parameters
colTypesthe list of column types to consider
Returns
true if one of the colTypes requires Zall computation; false otherwise.

◆ string2list()

OutputHandlerCsv::ColTypeList IntaRNA::OutputHandlerCsv::string2list ( const std::string &  listString)
inlinestatic

Converts string representation of a list of Coltypes to the respective list.

If the provided string encoding is empty or equals '*', all available columns are returned

Parameters
listStringthe string representation of the list
Returns
the parsed list
Exceptions
std::runtime_errorin case of parsing problems

Member Data Documentation

◆ colSep

std::string IntaRNA::OutputHandlerCsv::colSep
protected

the column separator to be used

◆ colType2string

std::map<ColType,std::string> IntaRNA::OutputHandlerCsv::colType2string
staticprotected

mapping of ColTypes to according strings

◆ colTypeNumericSort

const ColTypeList IntaRNA::OutputHandlerCsv::colTypeNumericSort
static

list of ColTypes that have to be sorted numerically

◆ columns

const std::list< ColType > IntaRNA::OutputHandlerCsv::columns
protected

the sequence of columns to be reported

◆ energy

const InteractionEnergy& IntaRNA::OutputHandlerCsv::energy
protected

the interaction energy function used for interaction computation

◆ listSep

std::string IntaRNA::OutputHandlerCsv::listSep
protected

the list separator to be used within single columns

◆ notAvailable

const std::string IntaRNA::OutputHandlerCsv::notAvailable
static

string to encode not available values

◆ out

std::ostream& IntaRNA::OutputHandlerCsv::out
protected

the output stream to write to

◆ Z

Z_type IntaRNA::OutputHandler::Z
protected

overall partition function (if set)


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